OpenJDK / jigsaw / jake / jdk
changeset 14215:fee0cf90610a
Minor clean-up of launcher patch
author | alanb |
---|---|
date | Sat, 10 Oct 2015 15:43:40 +0100 |
parents | 236a0b5f4df8 |
children | 2f2fa42c9342 |
files | src/java.base/share/classes/sun/launcher/LauncherHelper.java src/java.base/share/classes/sun/launcher/resources/launcher.properties |
diffstat | 2 files changed, 6 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/java.base/share/classes/sun/launcher/LauncherHelper.java Fri Oct 09 18:03:49 2015 +0200 +++ b/src/java.base/share/classes/sun/launcher/LauncherHelper.java Sat Oct 10 15:43:40 2015 +0100 @@ -478,8 +478,6 @@ * This method: * 1. Loads the main class from the module or class path * 2. Checks the public static void main method. - * 3. In the case of no main method and if the class extends FX Application, - * then call on FXHelper to determine the main class to launch * * @param printToStderr if set, all output will be routed to stderr * @param mode LaunchMode as determined by the arguments passed on the @@ -555,7 +553,7 @@ } if (c == null) { - abort(null, "java.launcher.cls.error6", mainClass, mainModule); + abort(null, "java.launcher.module.error2", mainClass, mainModule); } System.setProperty("jdk.module.main.class", c.getName()); @@ -569,7 +567,7 @@ */ private static Class<?> loadMainClass(int mode, String what) { // get the class name - String cn = null; + String cn; switch (mode) { case LM_CLASS: cn = what; @@ -581,7 +579,8 @@ // should never happen throw new InternalError("" + mode + ": Unknown launch mode"); } - // set to mainClass + + // load the main class cn = cn.replace('/', '.'); Class<?> mainClass = null; ClassLoader scl = ClassLoader.getSystemClassLoader();
--- a/src/java.base/share/classes/sun/launcher/resources/launcher.properties Fri Oct 09 18:03:49 2015 +0200 +++ b/src/java.base/share/classes/sun/launcher/resources/launcher.properties Sat Oct 10 15:43:40 2015 +0100 @@ -160,8 +160,6 @@ or a JavaFX application class must extend {1} java.launcher.cls.error5=\ Error: JavaFX runtime components are missing, and are required to run this application -java.launcher.cls.error6=\ - Error: Could not find or load main class {0} in module {1} java.launcher.jar.error1=\ Error: An unexpected error occurred while trying to open file {0} java.launcher.jar.error2=manifest not found in {0} @@ -172,3 +170,5 @@ must be declared static and return a value of type void java.launcher.module.error1=\ module {0} does not have a MainClass attribute, use -m <module>/<main-class> +java.launcher.module.error2=\ + Error: Could not find or load main class {0} in module {1}