Is there any real practical difference between ‘java -server’ and ‘java -client’?
All I can find on Sun’s site is a vague
‘-server starts slower but should run faster’.
What are the real differences? (Using JDK 1.6.0_07 currently.)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is really linked to HotSpot and the default option values (Java HotSpot VM Options) which differ between client and server configuration.
From Chapter 2 of the whitepaper (The Java HotSpot Performance Engine Architecture):
So the real difference is also on the compiler level:
Note: The release of jdk6 update 10 (see Update Release Notes:Changes in 1.6.0_10) tried to improve startup time, but for a different reason than the hotspot options, being packaged differently with a much smaller kernel.
G. Demecki points out in the comments that in 64-bit versions of JDK, the
-clientoption is ignored for many years.See Windows
javacommand:2022: Holger references in the comments the JavaSE6 / Server-Class Machine Detection, adding: