4.10 JVM Client and Server Versions

NJVM 1.4.2 includes two implementations of the HotSpot* virtual machine (VM). This section explains the applications for each version.

This section contains the following client and server version information:

4.10.1 Client VM

The Client VM is the default version of the HotSpot runtime compiler. It is specifically tuned to reduce application startup time and memory footprint.

The Client VM is located in sys:\java\bin\client\jvm.nlm

4.10.2 Server VM

The Server VM is specifically tuned to maximize peak operating speed. It is intended for long running server applications. The server version requires a larger memory footprint to execute a Java application than that of the client version. You might use this version when operating speed is more important than startup time.

Also, on NetWare you cannot run an application in server mode and another in client mode simultaneously. All applications must be in the same mode.

The Server VM is located in sys:\java\bin\server\jvm.nlm.

4.10.3 Switching JVM Versions

On NetWare you can run applications with either the Client VM or the Server VM. You cannot use both simultaneously. The command-line flags used to specify which VM to load are -client and -server. You cannot switch VMs while Java applications are running. If you attempt to start an application using one of these flags and the VM version requested is different than what is already being used, then that Java application will fail to load.

The default version of the JVM is the Client VM. To change the default VM to server, add the following line to the sys:\etc\java.cfg file:

  JAVA_COMPILER=server
  

Running an application with the Server VM might require more heap space than with the Client VM. To increase the heap size, use the -Xmxheapsizem flag. For example, you might have a Java application that requires 128 MB of heap to run with the client JVM. Changing to the server might require more heap space, so you could set the heap size flag to -Xmx256m.