mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8211033: Clean up the processing -classpath argument not to set LM_CLASS
Reviewed-by: alanb
This commit is contained in:
parent
7b0f273e37
commit
ca69a53b76
1 changed files with 3 additions and 5 deletions
|
@ -1198,9 +1198,6 @@ ParseArguments(int *pargc, char ***pargv,
|
||||||
JLI_StrCmp(arg, "-cp") == 0) {
|
JLI_StrCmp(arg, "-cp") == 0) {
|
||||||
REPORT_ERROR (has_arg_any_len, ARG_ERROR1, arg);
|
REPORT_ERROR (has_arg_any_len, ARG_ERROR1, arg);
|
||||||
SetClassPath(value);
|
SetClassPath(value);
|
||||||
if (mode != LM_SOURCE) {
|
|
||||||
mode = LM_CLASS;
|
|
||||||
}
|
|
||||||
} else if (JLI_StrCmp(arg, "--list-modules") == 0) {
|
} else if (JLI_StrCmp(arg, "--list-modules") == 0) {
|
||||||
listModules = JNI_TRUE;
|
listModules = JNI_TRUE;
|
||||||
} else if (JLI_StrCmp(arg, "--show-resolved-modules") == 0) {
|
} else if (JLI_StrCmp(arg, "--show-resolved-modules") == 0) {
|
||||||
|
@ -1355,11 +1352,12 @@ ParseArguments(int *pargc, char ***pargv,
|
||||||
*pret = 1;
|
*pret = 1;
|
||||||
}
|
}
|
||||||
} else if (mode == LM_UNKNOWN) {
|
} else if (mode == LM_UNKNOWN) {
|
||||||
/* default to LM_CLASS if -m, -jar and -cp options are
|
|
||||||
* not specified */
|
|
||||||
if (!_have_classpath) {
|
if (!_have_classpath) {
|
||||||
SetClassPath(".");
|
SetClassPath(".");
|
||||||
}
|
}
|
||||||
|
/* If neither of -m, -jar, --source option is set, then the
|
||||||
|
* launcher mode is LM_UNKNOWN. In such cases, we determine the
|
||||||
|
* mode as LM_CLASS or LM_SOURCE per the input file. */
|
||||||
mode = IsSourceFile(arg) ? LM_SOURCE : LM_CLASS;
|
mode = IsSourceFile(arg) ? LM_SOURCE : LM_CLASS;
|
||||||
} else if (mode == LM_CLASS && IsSourceFile(arg)) {
|
} else if (mode == LM_CLASS && IsSourceFile(arg)) {
|
||||||
/* override LM_CLASS mode if given a source file */
|
/* override LM_CLASS mode if given a source file */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue