Skip to content

Commit 97df414

Browse files
author
Leonid Mesnik
committedApr 12, 2023
ProcessTools updated.
1 parent 75ebbed commit 97df414

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed
 

‎test/lib/jdk/test/lib/process/ProcessTools.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ private static List<String> addMainWrapperArgs(String mainWrapper, List<String>
315315
}
316316

317317
ArrayList<String> args = new ArrayList<>();
318-
final String[] doubleWordArgs = {"-cp", "-classpath", "--add-opens", "--class-path", "--upgrade-module-path",
318+
final String[] doubleWordArgs = {"-jar", "-cp", "-classpath", "--add-opens", "--class-path", "--upgrade-module-path",
319319
"--add-modules", "-d", "--add-exports", "--patch-module", "--module-path"};
320320

321321
if (mainWrapper.equalsIgnoreCase("virtual")) {
@@ -337,9 +337,7 @@ private static List<String> addMainWrapperArgs(String mainWrapper, List<String>
337337
}
338338
for (String dWArg : doubleWordArgs) {
339339
if (cmd.equals(dWArg)) {
340-
expectSecondArg = true;
341-
args.add(cmd);
342-
break;
340+
return command;
343341
}
344342
}
345343
if (expectSecondArg) {

0 commit comments

Comments
 (0)
Please sign in to comment.