detect server VM in reg test?

Weijun Wang weijun.wang at oracle.com
Tue Oct 11 19:15:18 UTC 2011


Hi All

I have a test consuming quite a lot of memory and seems to be only 
working on server vms. I've added

         String vm = System.getProperty("java.vm.name");
         if (!vm.equals("Java HotSpot(TM) Server VM")) {
             System.out.println("The test only runs on server VMs");
             return;
         }

Is there a better way to detect it?

Thanks
Max



More information about the core-libs-dev mailing list