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.