Get TESTVMOPTS value from java test
Filipp Zhinkin
filipp.zhinkin at oracle.com
Fri Mar 1 10:48:48 PST 2013
Hi all,
It is possible to get TESTVMOPTS value in shell-test, but are there any
ways to get value of that variable in java-test?
I've tried to get it simply by System.getenv("TESTVMOPTS"), but it
doesn't work:
/*
* @test
* @run main/othervm Test
*/
public class Test {
public static void main(String... args) {
String vmOpts = System.getenv("TESTVMOPTS");
if (vmOpts == null) {
throw new RuntimeException("Can't get TESTVMOPTS");
} else {
System.out.println("TESTVMOPTS are: " + vmOpts);
}
}
}
Thanks,
Filipp.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/jtreg-use/attachments/20130301/d04bdcbe/attachment.html
More information about the jtreg-use
mailing list