8211033: Clean up the processing -classpath argument not to set LM_CLASS
Reviewed-by: alanb
This commit is contained in:
parent
7b0f273e37
commit
ca69a53b76
@ -1198,9 +1198,6 @@ ParseArguments(int *pargc, char ***pargv,
|
||||
JLI_StrCmp(arg, "-cp") == 0) {
|
||||
REPORT_ERROR (has_arg_any_len, ARG_ERROR1, arg);
|
||||
SetClassPath(value);
|
||||
if (mode != LM_SOURCE) {
|
||||
mode = LM_CLASS;
|
||||
}
|
||||
} else if (JLI_StrCmp(arg, "--list-modules") == 0) {
|
||||
listModules = JNI_TRUE;
|
||||
} else if (JLI_StrCmp(arg, "--show-resolved-modules") == 0) {
|
||||
@ -1355,11 +1352,12 @@ ParseArguments(int *pargc, char ***pargv,
|
||||
*pret = 1;
|
||||
}
|
||||
} else if (mode == LM_UNKNOWN) {
|
||||
/* default to LM_CLASS if -m, -jar and -cp options are
|
||||
* not specified */
|
||||
if (!_have_classpath) {
|
||||
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;
|
||||
} else if (mode == LM_CLASS && IsSourceFile(arg)) {
|
||||
/* override LM_CLASS mode if given a source file */
|
||||
|
Loading…
Reference in New Issue
Block a user