<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Look for system properties beginning
      "test."<br>
      <br>
      -- Jon<br>
      <br>
      <br>
      On 03/01/2013 10:48 AM, Filipp Zhinkin wrote:<br>
    </div>
    <blockquote cite="mid:5130F810.50706@oracle.com" type="cite">
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      <tt>Hi all, <br>
        <br>
        It is possible to get TESTVMOPTS value in shell-test, but are
        there any ways to get value of that variable in java-test? </tt>
      <tt><br>
        I've tried to get it simply by System.getenv("TESTVMOPTS"), but
        it doesn't work:<br>
        <br>
      </tt>
      <blockquote><tt>/*<br>
        </tt><tt>&nbsp;* @test<br>
        </tt><tt>&nbsp;* @run main/othervm Test<br>
        </tt><tt>&nbsp;*/<br>
        </tt><tt>&nbsp;public class Test {<br>
        </tt><tt>&nbsp;&nbsp; public static void main(String... args) {<br>
        </tt><tt>&nbsp;&nbsp;&nbsp;&nbsp; String vmOpts = </tt><tt>System.getenv("TESTVMOPTS");<br>
          &nbsp;&nbsp;&nbsp;&nbsp; if (vmOpts == null) {<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; throw new RuntimeException("Can't get TESTVMOPTS");<br>
          &nbsp;&nbsp;&nbsp;&nbsp; } else {<br>
        </tt><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println("TESTVMOPTS are: " + vmOpts);<br>
          &nbsp;&nbsp;&nbsp;&nbsp; }<br>
        </tt><tt>&nbsp;&nbsp; }<br>
        </tt><tt>&nbsp;}</tt><br>
      </blockquote>
      <tt><br>
        Thanks, </tt> <tt><br>
        Filipp. </tt> </blockquote>
    <br>
  </body>
</html>