views:

261

answers:

2

Is it possible to suppress warnings in Eclipse for JDK1.4 project?

EDIT: Longer version. There is a project which requires JDK1.4 (no annotations). Only way of suppressing warnings I know is using annotation @SuppressWarnings - no can do in JDK1.4. Is there any way to remove some warning notifications in some specific method/class (not whole project) ?

+2  A: 

Setting the compiler to 1.4 compliance in the properties of the project should do the trick. Just right click your project and select "Properties" at the bottom and then search for "Compiler".

André
+5  A: 

If you mean that you are writing Java 1.4 code, and you are getting warnings because you aren't using generics, set your Java Compiler settings to 1.4. You can do this on a per-project basis, or for the whole workspace.

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

To disable specific warnings, such as those regarding unnecessary casts, etc., you can tailor them under the Compiler->Errors/Warnings panel. Most of these warnings, however, are not version specific, and can be quite helpful if heeded.

Workspace settings can be overridden for a project, but I don't know of a way that gives you annotation-like control over a specific class or method.

erickson