100 return; |
100 return; |
101 } |
101 } |
102 |
102 |
103 // All arguments arrive here must be a launcher argument, |
103 // All arguments arrive here must be a launcher argument, |
104 // ie. by now, all argfile expansions must have been performed. |
104 // ie. by now, all argfile expansions must have been performed. |
105 if (*arg++ == '-') { |
105 if (*arg == '-') { |
106 expectingNoDashArg = JNI_FALSE; |
106 expectingNoDashArg = JNI_FALSE; |
107 if (JLI_StrCmp(arg, "cp") == 0 || |
107 if (IsWhiteSpaceOption(arg)) { |
108 JLI_StrCmp(arg, "classpath") == 0 || |
108 // expect an argument |
109 JLI_StrCmp(arg, "addmods") == 0 || |
|
110 JLI_StrCmp(arg, "limitmods") == 0 || |
|
111 JLI_StrCmp(arg, "mp") == 0 || |
|
112 JLI_StrCmp(arg, "modulepath") == 0 || |
|
113 JLI_StrCmp(arg, "upgrademodulepath") == 0) { |
|
114 expectingNoDashArg = JNI_TRUE; |
109 expectingNoDashArg = JNI_TRUE; |
115 } else if (JLI_StrCmp(arg, "jar") == 0 || |
110 |
116 JLI_StrCmp(arg, "m") == 0) { |
111 if (JLI_StrCmp(arg, "-jar") == 0 || |
117 // This is tricky, we do expect NoDashArg |
112 JLI_StrCmp(arg, "-m") == 0) { |
118 // But that is considered main class to stop expansion |
113 // This is tricky, we do expect NoDashArg |
119 expectingNoDashArg = JNI_FALSE; |
114 // But that is considered main class to stop expansion |
120 // We can not just update the idx here because if -jar @file |
115 expectingNoDashArg = JNI_FALSE; |
121 // still need expansion of @file to get the argument for -jar |
116 // We can not just update the idx here because if -jar @file |
122 } else if (JLI_StrCmp(arg, "Xdisable-@files") == 0) { |
117 // still need expansion of @file to get the argument for -jar |
|
118 } |
|
119 } else if (JLI_StrCmp(arg, "-Xdisable-@files") == 0) { |
123 stopExpansion = JNI_TRUE; |
120 stopExpansion = JNI_TRUE; |
124 } |
121 } |
125 } else { |
122 } else { |
126 if (!expectingNoDashArg) { |
123 if (!expectingNoDashArg) { |
127 // this is main class, argsCount is index to next arg |
124 // this is main class, argsCount is index to next arg |