简体   繁体   English

在 eclipse juno IDE 中将警告设置为错误

[英]Set warning as error in eclipse juno IDE

I want to set warning as error in my Eclipse Juno IDE.我想在我的 Eclipse Juno IDE 中将警告设置为错误。

public class Main {

    public static void main(String[] args) {
        TryRefactoring try1 = new TryRefactoring();//warning shown here
    } 
}

but I want to set this warning show me as error in my IDE ?但我想将此警告设置为在我的 IDE 中显示错误?

In eclipse if you right click on your Project in the Package Explorer, then go to properties -> Java Compiler -> Errors/Warnings.在 Eclipse 中,如果您在 Package Explorer 中右键单击您的项目,然后转到属性 -> Java 编译器 -> 错误/警告。 You can then manually change which compiler findings appear as warnings/errors/ignored etc...然后,您可以手动更改哪些编译器结果显示为警告/错误/忽略等...

I will update @Matthew Ertel's answer to April, 2021.我会将@Matthew Ertel 的回答更新到 2021 年 4 月。

Menu Window > Preferences > Java > Compiler > Error/Warnings.菜单窗口 > 首选项 > Java > 编译器 > 错误/警告。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM