test/sanity/WBApi.java

changeset 3619
2d503de963b3
child 4637
1b0dc9f87e75
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/test/sanity/WBApi.java	Thu Feb 23 14:58:35 2012 +0100
     1.3 @@ -0,0 +1,13 @@
     1.4 +/*
     1.5 + * @test WBApi
     1.6 + * @summary verify that whitebox functions can be linked and executed
     1.7 + * @run compile -J-XX:+UnlockDiagnosticVMOptions -J-XX:+WhiteBoxAPI WBApi.java
     1.8 + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI WBApi
     1.9 + */
    1.10 +
    1.11 +import sun.hotspot.WhiteBox;
    1.12 +public class WBApi {
    1.13 +    public static void main(String... args) {
    1.14 +        System.out.printf("args at: %x\n",WhiteBox.getWhiteBox().getObjectAddress(args));
    1.15 +    }
    1.16 +}

mercurial