Updating Eclipse Projects From Java 1.5 to Java 1.6
When you are updating from jdk 1.5 to jdk 1.6 in Eclipse 3.5, make sure you hit all of these touchpoints:
- On your machine, install jdk 1.6 and change your environment path variables to point to the 1.6 directories.
- In Eclipse, Under Windows->Preferences->Java->Installed JREs make sure jdk 1.6 is added, and select it.
- In Eclipse, Under Windows->Preferences->Java->Build Path->Classpath Variables make sure jdk 1.6 is added for JRE_LIB and JRE_SRC.
- In Eclipse, Under Windows->Preferences->Java->Compiler set compliance level to 1.6.
- In Eclipse, Under Windows->Preferences->Ant->Runtime set classpath variables 1.6.
- Update your JBoss server/web server to use the 1.6 runtime.
- In each project, change the compiler, the classpaths, the facets, and the runtimes for your servers (as applicable) to use jdk 1.6.
Then you should be good to go. Build using both the Eclipse and the Ant methods to test . . . remember, the Hudson build server (or any build process) uses the ant scripts so if you check in the app with broken scripts you’ve checked in a bug!