在 Netbeans 中哪里可以找到 Xlint 选项?
我在 Netbeans 中收到错误Recompile with -Xlint:unchecked for details.
。在哪里可以找到取消选中的选项?
I get an error Recompile with -Xlint:unchecked for details.
in Netbeans. Where can I find the option to uncheck?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您不需要“取消选中”该选项,您需要将
-Xlint:unchecked
参数添加到传递给 Java 编译器的参数中。对于基于 Ant 的项目,这是通过
Project Properties -> 完成的。构建->在对话框底部的“其他编译器选项”输入字段中进行编译(其中显示“eg: -Xlint:unchecked”)
对于 Maven 项目,请参阅此答案
You don't "uncheck" that option, you need to add the
-Xlint:unchecked
parameter to the parameters passed to the Java compiler.For Ant based projects, this is done through
Project Properties -> Build -> Compiling
in the "Additional compiler options" input field at the bottom of the dialog (where it says "e.g.: -Xlint:unchecked")For Maven projects see this answer
-Xlint
是 JVM 参数。在您的项目中,请按照以下步骤操作:在文本字段中写入
-Xlint:unchecked
-Xlint
is a JVM parameter. In your project follow this steps:And there in the text field you write
-Xlint:unchecked