I call javac from my ant script like this:
<javac srcdir="src"
destdir="build/classes" source="1.6"
target="1.6" debug="true" encoding="Cp1252"
nowarn="true">
But it still throws compiler warnings in the output:
[javac] Compiling 73 source files to C:IKOfficeRootJavaERPFrameworkuildclasses
[javac] C:IKOfficeRootJavaERPFrameworksrcdeikofficeutilLoggerFactory.java:49: warning: sun.reflect.Reflection is Sun proprietary API and may be removed in a future release
[javac] return Logger.getLogger(Reflection.getCallerClass(2));
[javac] ^
[javac] Note: C:IKOfficeRootJavaERPFrameworksrcdeikofficedbSingleShotResultSet.java uses or overrides a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 1 warning
I also tried
<compilerarg line="-Xlint:-unchecked -Xlint:-deprecation"/>
and
<compilerarg value="-Xlint:none"/>
but this has no effect either. How to I remove the warnings?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…