Java Custom annotation problem tracking and resolution __java

Source: Internet
Author: User
WARNING: The specified annotationprocessorfactory "Com.dusk.annoation.database.InterfaceExtractorProcessorFactory" could not be found in the search path. Warning: No annotation processor found, but annotations exist. What a depressing scene.

。

This is the scenario that happens when you use apt to handle custom annotations.

First on the solution to talk about the extension:

This is because your annotationprocessorfactory class can't be found in your virtual machine, by precompiling your custom annotation-related class and adding it to your classpath.

I wrote a batch file.

REM Project root directory
set project_root=c:\users\army_du163.com\workspaces\myeclipse 2015 Ci\thinkinjava
rem Package directory path
Set Packagepath=com\dusk\annoation\database
rem Run root path
set run_root=%project_root%\bin
rem source file directory path Set
Src_root=%project_root%\src\main\java
rem Set CLASSPATH set
classpath=.; %java_home%;%java_home%/lib/tools.jar;%run_root%

CD%src_root%\%packagepath%

apt-nocompile-factory Com.dusk.annoation.database.InterfaceExtractorProcessorFactory  Multiplier.java
Pause
The running root directory run_root=%project_root%\bin is where I myeclipse the compiled bytecode file, and if you make a jar package, this should be the path to your jar package.


Next we look at apt usage, apt-help


Glance.

Of course, APT is in jdk6,jdk7 bin directory exists, if you are using JDK8 you will find no apt.exe, then how to do it.

I can't do that, either.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.