I am trying to specify an alternative jre (my default is 1.6 and i need to run with jdk 1.4.2) in Eclipse, for an application that i shall launch from eclipse. I am not sure if I am doing the right thing in the following code:
Path jreContainerPath = new Path("/usr/lib/jvm/j2sdk1.4.2_18/");
IVMInstall jre = JavaRuntime.getVMInstall(jreContainerPath);
workingCopy.setAttribute(IJavaLaunchConfigurationConstants. ATTR_JRE_CONTAINER_PATH, jre.getName());
However, the IVMInstall jre is null. I think I am not specifying the container path right, but I am not sure. And I must do it in the program. I would gladly appreciate any help on this. Thanks in advance.