Community
Participate
Working Groups
Currently if I set compliance level to 1.4 while my default JRE is 1.6 then I get a small and easy to overlook notice in the preference window that I should also change the project's JRE accordingly. If I overlook/forget it, I'll get no further warning when I'll use an API that is not available in 1.4, for example new java.sql.SQLException(String, Throwable) (since 1.6). This may have serious consequences because when I deploy it to the target environment I'll start getting TargetInvocationException: no such method etc. (Really, I did this foolish thing already twice.) There should be only one place where you set the target JRE for a project. Currently, if I want to develop for an older JRE than the default one, I have to set the project's compiler compliance level and change the JRE on the project path to match the target one. The 2nd step is a burden because I even may not have that JRE installed. I should be well able to develop application for J2SE 1.4 using 1.5 or 1.6 JRE. One one hand Eclipse did enough by telling me that I should change the project's JRE on the other hand if there is a possibility to make a mistake, it will be made, i.e. Eclipse should be fool-proof. Best regards, Jakub
You could set up API Tooling for your bundle. It does the detection of invalid library usage according to the EE set up for the bundle.
*** Bug 222662 has been marked as a duplicate of this bug. ***