我打电话的javac从我的Ant脚本是这样的:无法从生成编译太阳专有API警告停止蚂蚁
<javac srcdir="src"
destdir="build/classes" source="1.6"
target="1.6" debug="true" encoding="Cp1252"
nowarn="true">
但它仍然抛出编译器警告输出:
[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"/>
但这也没有效果。如何删除警告?
可能重复的HTTP启用://sackoverflow.com/questions/1554538/how-can-i-suppress-javac-warnings-about-deprecated-api) – stacker 2012-03-08 06:58:10
不是一个复制!我已经知道如何摆脱弃用警告。我现在需要摆脱不安全的api警告! – Daniel 2012-03-08 11:31:59
[Suppress javac warning“...是内部专有API,可能在未来版本中删除”)的可能重复](http://stackoverflow.com/questions/13855700/suppress-javac-warning-is-internal-privacy -API和 - 可被移除,在-AF)。这一个更早,但我宁愿坚持不提蚂蚁的那个:重要的是javac – 2015-05-01 11:35:11