Community
Participate
Working Groups
The use of deprecated methods from the JDK is not being indicated as a warning even though my compiler settings have "Usage of deprecated API". Deprecated methods for external jars appear to work as expected. Changing the severity level from warning to error has no effect. e.g. new Date ().setYear ( 2005 - 1900 ); new Thread ().stop ();
Are you using a JDK or a JRE in your libraries?
Ah! Spot on. I've changed the installed JRE setting to point to the JDK and reset the libraries to use those supplied with the JDK and it works. Why does Eclipse not default to using the JDK on install? What other features are effected by running against a JRE rather than a JDK?
I don't know. The point is that the JRE doesn't contain the deprecation information. So it is impossible for the compiler to guess that a type, a method or a field is deprecated if the libraries used to compile come from a JRE. Eclipse needs a JRE to run. But it is up to the user to use a JRE or a JDK to compile. A JDK is also useful if you want to use javac in an ant script. Closing as INVALID.