Some CDS tests need to start a JVM process with an empty classpath. However, ProcessTools would always add "-cp" to the command-line
http://hg.openjdk.java.net/jdk/jdk/file/1ec56532ae0c/test/lib/jdk/test/lib/process/ProcessTools.java#l288
When running jtreg, the above line will always add a non-empty classpath to the JVM process's command-line.
To counteract this, the CDS tests would add this to the command-line arguments:
"-cp", "\"\"",
However, while this would set the -cp to the empty string on Windows, on other platforms, the -cp ends up being a string with 2 double-quote characters.
The portable way to specify an empty -cp is to add the following to the command-line:
"-Djava.class.path="
http://hg.openjdk.java.net/jdk/jdk/file/1ec56532ae0c/test/lib/jdk/test/lib/process/ProcessTools.java#l288
When running jtreg, the above line will always add a non-empty classpath to the JVM process's command-line.
To counteract this, the CDS tests would add this to the command-line arguments:
"-cp", "\"\"",
However, while this would set the -cp to the empty string on Windows, on other platforms, the -cp ends up being a string with 2 double-quote characters.
The portable way to specify an empty -cp is to add the following to the command-line:
"-Djava.class.path="