无法从编译器生成孙专有API警告停止蚂蚁 [英] Cannot stop ant from generating compiler Sun proprietary API warnings
本文介绍了无法从编译器生成孙专有API警告停止蚂蚁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我把从我的ant脚本的javac是这样的:
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:\IKOfficeRoot\Java\ERP\Framework\build\classes
[javac] C:\IKOfficeRoot\Java\ERP\Framework\src\de\ikoffice\util\LoggerFactory.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:\IKOfficeRoot\Java\ERP\Framework\src\de\ikoffice\db\SingleShotResultSet.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
我也试过
<compilerarg line="-Xlint:-unchecked -Xlint:-deprecation"/>
和
<compilerarg value="-Xlint:none"/>
但没有任何效果无论是。如何删除我的警告?
but this has no effect either. How to I remove the warnings?
推荐答案
添加 -XDignore.symbol.file
选项到的javac
命令行为我工作。
adding the -XDignore.symbol.file
option to the javac
command line worked for me.
这篇关于无法从编译器生成孙专有API警告停止蚂蚁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文