aperkins
aperkins

Reputation: 13114

How do I tell if the JVM is honoring the "-server" argument?

I am attempting to reproduce some behavior in one of our production environments. Although it is a bit of a longshot, I know that in our production environment the system is using the "-server" version of the JVM (as they are server boxes). I would like to validate that there is nothing weird going on there, and want to make sure my test environment is using the same flag. How can I verify that the local JVM is taking the flag - i.e. is not starting up in "-client" anyway? Is there a system property I can check? Or some behavior to look for?

Upvotes: 1

Views: 116

Answers (1)

cherouvim
cherouvim

Reputation: 31903

You could read the java.vm.name System property and it should contain something like Java HotSpot(TM) 64-Bit Server VM.

System.out.println(System.getProperty("java.vm.name"));

Upvotes: 6

Related Questions