src/share/classes/sun/launcher/LauncherHelper.java
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/classes/sun/launcher/LauncherHelper.java Sun Dec 23 06:00:43 2012
--- new/src/share/classes/sun/launcher/LauncherHelper.java Sun Dec 23 06:00:43 2012
*** 63,76 ****
--- 63,80 ----
import java.util.Set;
import java.util.TreeSet;
import java.util.jar.Attributes;
import java.util.jar.JarFile;
import java.util.jar.Manifest;
+ import sun.misc.Version;
+ import sun.misc.URLClassPath;
public enum LauncherHelper {
INSTANCE;
private static final String MAIN_CLASS = "Main-Class";
+ private static final String PROFILE = "Profile";
+
private static StringBuilder outBuf = new StringBuilder();
private static final String INDENT = " ";
private static final String VM_SETTINGS = "VM settings:";
private static final String PROP_SETTINGS = "Property settings:";
*** 407,416 ****
--- 411,439 ----
}
mainValue = mainAttrs.getValue(MAIN_CLASS);
if (mainValue == null) {
abort(null, "java.launcher.jar.error3", jarname);
}
+
+ // if this is not a full JRE then the Profile attribute must be
+ // present with the Main-Class attribute so as to indicate the minimum
+ // profile required. Note that we need to suppress checking of the Profile
+ // attribute after we detect an error. This is because the abort may
+ // need to lookup resources and this may involve opening additional JAR
+ // files that would result in errors that suppress the main error.
+ String profile = mainAttrs.getValue(PROFILE);
+ if (profile == null) {
+ if (!Version.isFullJre()) {
+ URLClassPath.suppressProfileCheckForLauncher();
+ abort(null, "java.launcher.jar.error4", jarname);
+ }
+ } else {
+ if (!Version.supportsProfile(profile)) {
+ URLClassPath.suppressProfileCheckForLauncher();
+ abort(null, "java.launcher.jar.error5", profile, jarname);
+ }
+ }
return mainValue.trim();
} catch (IOException ioe) {
abort(ioe, "java.launcher.jar.error1", jarname);
}
return null;
*** 701,706 ****
--- 724,728 ----
// launch appClass via fxLauncherMethod
fxLauncherMethod.invoke(null, new Object[] {appClass, args});
}
}
}
src/share/classes/sun/launcher/LauncherHelper.java
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File