diff --git a/src/share/classes/com/sun/javatest/regtest/exec/CompileAction.java b/src/share/classes/com/sun/javatest/regtest/exec/CompileAction.java --- a/src/share/classes/com/sun/javatest/regtest/exec/CompileAction.java +++ b/src/share/classes/com/sun/javatest/regtest/exec/CompileAction.java @@ -571,7 +571,7 @@ try (BufferedWriter w = new BufferedWriter(new FileWriter(argFile))) { for (String arg: javacArgs) { if (arg.startsWith("-J")) { - javacVMOpts.add(arg); + javacVMOpts.add(arg.substring(2)); } else { w.write(arg); w.newLine();