Possible Duplicate:
Real differences between "java -server" and "java -client"?
what are the technical differences between starting a java program with -server and with -client flag?
Thanks!
Possible Duplicate:
Real differences between "java -server" and "java -client"?
what are the technical differences between starting a java program with -server and with -client flag?
Thanks!
from Frequently Asked Questions About the Java HotSpot VM :
These two systems are different binaries. They are essentially two different compilers (JITs)interfacing to the same runtime system. The client system is optimal for applications which need fast startup times or small footprints, the server system is optimal for applications where the overall performance is most important. In general the client system is better suited for interactive applications such as GUIs. Some of the other differences include the compilation policy,heap defaults, and inlining policy.
One difference that I know of is related to JIT (Just In Time)
compilation where JVM at runtime identifies hotspots in the code and based on that converts bytecodes into highly optimized native code.
With -client
flag, the amount of JIT'ing performed is lesser than performed with -server
flag. This is because clients are interactive apps that generally require low start-up times, and JIT'ing causes some start-up delays. You can read more about JIT here: http://en.wikipedia.org/wiki/Just-in-time_compilation
Also, I think (not very sure) that there would be some difference in Garbage Collection defaults selected with the change in these flags.