Why is -server option there when server VM is the default option?

  • A+
Category:Languages

The help menu for java command says that -server option is to select the "server" VM. It also states that 'server' is the default option. Why so redundant?

edit:

If it is of any help, "java -version" yields:

java version "1.8.0_191" Java(TM) SE Runtime Environment (buil 1.8.0_191-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode) 

 


I don't know your java version, IMHO, in java8 or older versions, for different platforms(different architecture and OS, or even different cup cores and memory), there are different default JVM(server or client).

This picture is taken from https://docs.oracle.com/javase/8/docs/technotes/guides/vm/server-class.html, we can see the situation for java6.

Why is -server option there when server VM is the default option?

(Note: For Java SE 6, the definition of a server-class machine is one with at least 2 CPUs and at least 2GB of physical memory. )

Update:

I can only confirm that these options are also provided by java8(1.8.0_121). Not sure for java9 or later.

Comment

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: