detect server VM in reg test?

Weijun Wang at
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("");
         if (!vm.equals("Java HotSpot(TM) Server VM")) {
             System.out.println("The test only runs on server VMs");

Is there a better way to detect it?


More information about the core-libs-dev mailing list