0

I defined the server as the default, as indicated in this answer. But I still get the output below when running the java -version command from the command prompt:

java version "1.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) Client VM (build 25.20-b23, mixed mode)

I'm using JDK 8 for Windows x86. Is there any way to change the default to server? Thanks for the help.

Community
  • 1
  • 1
kevin
  • 1
  • 3
  • 1
    If you use any but the 32-bit JVM for Windows it will be server by default. The 32-bit Windows has a number of limitations including a maximum heap size of 1.4 GB. – Peter Lawrey Jan 20 '15 at 21:49
  • Which particular configuration file did you edit, ( where was it located on your machine) ? – nos Jan 20 '15 at 21:52
  • I edited the configuration file jvm.cfg, It was located on : Java\jdk1.8.0_20\jre\lib\i386 – kevin Jan 20 '15 at 21:59

2 Answers2

0

If you go to Oracle's JDK download page there are 3 types: JDK, Server JRE and JRE. Try installing Server JRE.

enter image description here

gerrytan
  • 37,387
  • 8
  • 78
  • 91
0

Based on my understanding if you have, jdk-8u31-windows-x64.exe and as you already have 64bit os then you should have Server

If you are using JRE then you may get client. As java client load fast than server and take less memory as compare to server.

The JDK includes two flavors of the VM -- a client-side offering, and a VM tuned for server applications. These two solutions share the Java HotSpot runtime environment code base, but use different compilers that are suited to the distinctly unique performance characteristics of clients and servers. These differences include the compilation inlining policy and heap defaults.

Although the Server and the Client VMs are similar, the Server VM has been specially tuned to maximize peak operating speed. It is intended for executing long-running server applications, which need the fastest possible operating speed more than a fast start-up time or smaller runtime memory footprint.

The Client VM compiler serves as an upgrade for both the Classic VM and the just-in-time (JIT) compilers used by previous versions of the JDK. The Client VM offers improved run time performance for applications and applets. The Java HotSpot Client VM has been specially tuned to reduce application start-up time and memory footprint, making it particularly well suited for client environments. In general, the client system is better for GUIs.

Difference between server and client is

The Client VM compiler does not try to execute many of the more complex optimizations performed by the compiler in the Server VM, but in exchange, it requires less time to analyze and compile a piece of code. This means the Client VM can start up faster and requires a smaller memory footprint.

The Server VM contains an advanced adaptive compiler that supports many of the same types of optimizations performed by optimizing C++ compilers, as well as some optimizations that cannot be done by traditional compilers, such as aggressive inlining across virtual method invocations. This is a competitive and performance advantage over static compilers. Adaptive optimization technology is very flexible in its approach, and typically outperforms even advanced static analysis and compilation techniques.

java.manish.2015
  • 901
  • 1
  • 6
  • 7
  • The OP says he has x86 (meaning 32 bit) and the output of his java -version shows the jvm is a 32 bit jvm (a 64 bit jvm will explicitly say it's 64 bit). However, you're answering what is the difference between the client and server jvm, but that's not what the OP asks about. – nos Jan 20 '15 at 22:35