In this article, I want to describe how we managed to switch from Java 6 to Java 7 and get rid of some issues we found along the way. We use Eclipse 4.2.2 and had to change to Java 1.7.0u21. Our system consists of more than 30 eclipse projects that are managed by OSGI.
First, we installed Java 1.7.0u21 and added the JRE to eclipse. Because we cannot be sure that all of our users have a 64 bit system, we use the jre1.7.0_21-windows-i586:
Then we switched the compiler to 1.7:
After that, we changed the setting of our projects. We used the eclipse interface to change the settings of one project and after that copy the changes to all other projects. For one project, the execution environment in the MANIFEST.MF had to be changed to JavaSE-1.7:
The classpath had to be updated via “Update the classpath settings”. Via File Search > Replace I copied the following changes to all other projects:
After a refresh to all projects and a rebuild, every project uses JavaSE-1.7. Next, we encountered several
Following this discussion at sourceforge, this could be fixed by making sure Eclipse uses the right virtual machine. This can be done by pointing to the virtual machine with the following eclipse start parameter:
Now, our system runs with Java 7.