Community
Participate
Working Groups
I have few projects in the workspace, some require jdk 1.4.0 In order to compile the classes JDT uses the "default vm". Suppose it is Sun's 1.4.0 In order to run some of the projects I have to use jdk1.3.1, so I create a launch onfiguration and define it to use 1.3.1. When launching the program I get a NoSuchMethodException/AbstractMethodException, etc. Why ? Because I use JDialog.setLocationRelativeTo() method. In JDK 1.3.1 it is defined in JDialog. In JDK 1.4.0 it is defined in java.awt.Window. The 1.4 compiler links the call to Window.setLocationRelativeTo(), but java.awt.Window does not have such method in 1.3.1 What I'm trying to suggest is that a VM must be specified for each project separately, and that there should be no such thing as "default vm". (or it should be the default for new projects).
Using classpath containers you can achieve this. Have a look at the build path wizard, under the library tab -> advanced button.
do I have to remove the default jre ?
You actually would replace the JRE variable reference with a JRE container reference. Containers are slightly more evolved than single var reference, in so far as they can denote a set of JARs, and can have different a meaning on each project.
Ok to close ?
Closing.