mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
Merge
This commit is contained in:
commit
deba30de16
2767 changed files with 221508 additions and 36593 deletions
|
@ -609,12 +609,13 @@ public final class LauncherHelper {
|
|||
}
|
||||
|
||||
// From src/share/bin/java.c:
|
||||
// enum LaunchMode { LM_UNKNOWN = 0, LM_CLASS, LM_JAR, LM_MODULE }
|
||||
// enum LaunchMode { LM_UNKNOWN = 0, LM_CLASS, LM_JAR, LM_MODULE, LM_SOURCE }
|
||||
|
||||
private static final int LM_UNKNOWN = 0;
|
||||
private static final int LM_CLASS = 1;
|
||||
private static final int LM_JAR = 2;
|
||||
private static final int LM_MODULE = 3;
|
||||
private static final int LM_SOURCE = 4;
|
||||
|
||||
static void abort(Throwable t, String msgKey, Object... args) {
|
||||
if (msgKey != null) {
|
||||
|
@ -645,13 +646,21 @@ public final class LauncherHelper {
|
|||
*
|
||||
* @return the application's main class
|
||||
*/
|
||||
@SuppressWarnings("fallthrough")
|
||||
public static Class<?> checkAndLoadMain(boolean printToStderr,
|
||||
int mode,
|
||||
String what) {
|
||||
initOutput(printToStderr);
|
||||
|
||||
Class<?> mainClass = (mode == LM_MODULE) ? loadModuleMainClass(what)
|
||||
: loadMainClass(mode, what);
|
||||
Class<?> mainClass = null;
|
||||
switch (mode) {
|
||||
case LM_MODULE: case LM_SOURCE:
|
||||
mainClass = loadModuleMainClass(what);
|
||||
break;
|
||||
default:
|
||||
mainClass = loadMainClass(mode, what);
|
||||
break;
|
||||
}
|
||||
|
||||
// record the real main class for UI purposes
|
||||
// neither method above can return null, they will abort()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue