Community
Participate
Working Groups
Eclipse produces a launch configuration with Java 1.8 when launching an Eclipse application for a plug-in, although Java 1.8 is not installed on the PC and hence is not available for Eclipse. Tested with: Version: Luna (4.4) Build id: N20140423-2200
Reproduced. When creating a project, the default EE is based on the default JRE. // Set default EE based on strict match to default VM IVMInstall defaultVM = JavaRuntime.getDefaultVMInstall(); String[] EEChoices = fEEChoice.getItems(); for (int i = 0; i < EEChoices.length; i++) { if (!EEChoices[i].equals(NO_EXECUTION_ENVIRONMENT)) { if (VMUtil.getExecutionEnvironment(EEChoices[i]).isStrictlyCompatible(defaultVM)) { fEEChoice.select(i); break; } } } When creating the launch configuration, the default EE is based on the highest bundle required execution environment of any bundle in the launch configuration. As org.eclipse.jdt.annotation has a BREE of 1.8, 1.8 is chosen as the EE. One solution would be to skip any EE that is unbound, though that could mean setting an EE that doesn't match your plug-ins, so installing a JRE would not fix your launch configuration. Would be good to see why jdt.annotation has such a high BREE.
http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=20701afb2a9094b1fc905d295c9191bb8075a887 Fixed in master The key was not to break the feature added in Bug 344633, where we look at the plug-in list to guess what the best EE to choose is. To do this I ignore bundles that have BREEs that match unbound EEs (no compatible JRE installed). This doesn't guarantee that the launch configuration will run, but choosing an unbound EE will definitely not launch, so this is better than nothing. This problem would have become much more noticeable in 4.4 as the jdt annotations bundle in the SDK has a 1.8 BREE. You don't need to the bundle to launch, but PDE has no practical way of knowing that.
Re-tested today with "Version: Luna (4.4) Build id: N20140424-2000". Works like a charm, now. Thanks.