Community
Participate
Working Groups
//null out the vm type and jre container path to get the default vm install from JavaRuntime
copy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE, (String)null);
copy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH, (String)null);
String oldpath = copy.getAttribute(IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH, (String)null);
if(oldpath != null) {
}
IVMInstall defaultVMInstall= getDefaultVMInstall(copy);
if (defaultVMInstall != null) {
//update if required
setDefaultVMInstallAttributes(defaultVMInstall, copy);
if (copy.isDirty() && !copy.isReadOnly()) {
copy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH, oldpath);
configuration= copy.doSave();