Java – suppress jdk1 4 project warning

Can I create JDK 1.0 in eclipse 4 project prohibition warning?

Edit: longer version One project requires jdk1 4 (no notes) The only way I know to suppress warnings is to use the annotation @ suppresswarnings – in jdk1 Can't do it in 4 Is there any way to delete some warning notices in some specific methods / classes (not the whole project)?

Solution

If you mean to write java 1.4 code and receive a warning because generics are not used, set the java compiler to 1.4 You can do this on a per - project or entire workspace basis

Window-> Preferences-> Java-> Compiler-> Compiler Compliance Level = 1.4

To disable specific warnings, such as warnings about unnecessary casts, etc., you can customize them under the compiler - > errors / warnings panel However, most of these warnings are not version specific and can be very useful if noted

You can override workspace settings for projects, but I don't know a way to provide you with annotation control similar to a specific class or method

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>