I’ve installed java7 jre: java -version
java version "1.7.0_02"
Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)
I want to test if the -server option works in the JRE. That seems to be the default on my machine. I also want to check if both the -server and the -client options are supported. So I wrote the following program:
public class Info {
public static void main(String... args) {
System.out.println(System.getProperty("java.vm.name"));
System.out.println(System.getProperty("java.vm.version"));
System.out.println(System.getProperty("java.vm.info"));
}
}
If I issue the command java -client -cp e:\temp Info from the jre7\bin installation folder the program prints:
Java HotSpot(TM) 64-Bit Server VM
22.0-b10
mixed mode
It prints the same for -server.
Are -client and -server ignored in the java7 jre? Is there online documentation about this behavior?
P.S. I know that there is now tiered compilation.
This is documented in the Java command page. With the 64-bit version of Java 7, only server mode is implemented. The
-clientoption is quietly ignored. (Note that the manual says that this may change in future versions.)