Get TESTVMOPTS value from java test

Filipp Zhinkin filipp.zhinkin at
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);

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the jtreg-use mailing list