Previous     Contents     Index     DocHome     Next     
iPlanet Web Server, Enterprise Edition Programmer's Guide to Servlets

Appendix C   JVM Configuration

The Java Virtual Machine (JVM) works by default without any additional configuration if properly set up.

However, if you need to specify settings for the JVM, such as additional classpath information, you can configure the JVM properties for iPlanet Web Server via the Administrator interface. You can add as many other properties as you want to (up to 64).

Note A few attributes on the Configure JVM Attributes page on the Java tab show as "Default." Since you can use different JVMs, these default values are unknown. You cannot query a JVM to find out the actual default values; instead, refer to your JVM documentation. For example, for Sun's JVM, if you choose Yes for the JIT Compiler option, it shows as "Default" because JIT is enabled in the JVM by default. However, if you choose No for the JIT compiler, an explicit entry, jvm.compiler=NONE, is added to the jvm12.conf file.

For information about JVM, see The Java Virtual Machine Specification from Sun at:

The jvm12.conf File

You can also configure JVM parameters by editing the jvm12.conf configuration file, which resides under the server's config directory.

For example, to disable JIT, you can add the following line to jvm12.conf:


Here is an example jvm12.conf file. The jvm.classpath value must be all on one line in the actual file.


Generally you should use plain property options (like name=value) for the JDK1.2 configuration and jvm.option=options for JVM-vendor dependent configurations. There can be multiple occurrences of jvm.option parameters.

A list of debugging options that you can include in the jvm12.conf file if the JPDA is installed is available here:

For more information about debugging servlets and JSPs and the jvm12.conf parameters required for debugging, see Chapter 5 "Debugging Servlets and JSPs."

Using JVM Environment Variables

If you define JVM environment variables using the jvm.option setting in the jvm12.conf file or the Administration Server, servlets do not recognize them. Just use the plain name=value format for environment variables.

When you are running a stand-alone command line java program, use the following option to pass system properties into the java program:

java -Dorg.omg.CORBA.ORBClass=com.inprise.vbroker.orb.ORB myprogram

In the file, the following line retrieves the system property set above:


If you want to do the same thing for servlets in iPlanet Web Server, you need to put the following line in the jvm12.conf file:


Do not use jvm.option settings such as the following:




In the servlet or JSP, you can use the following line to retrieve the system property set above:


jvm12.conf Parameter Reference

The JVM parameters you can set in the jvm12.conf file are listed in Table C-1.

Table C-1    jvm12.conf settings


Allowed Values

Default Value




1048576 (1 MB)  

The minimum heap size allocated to Java.

For Solaris, change this value to 3145278 (3 MB). For HPUX, change this value to 4194304 (4 MB). For all other operating systems, 1 MB is ideal.  



16777216 (16 MB)  

The maximum heap size allocated to Java.  


0 (off), 1 (on)  


Enables or disables class garbage collection.

Use instead of -Xnoclassgc.  


0 (off), 1 (on)  


Enables or disables JVM verbose mode. If on, the JVM logs a commentary on what it is doing, such as loading classes. The commentary appears in the error log.  


0 (off), 1 (on)  


Enables or disables JVM remote debugging.

Use instead of -Xdebug.

For more information about remote debugging, see Chapter 5 "Debugging Servlets and JSPs."  


0 (off), 1 (logs to log file), 2 (logs to stderr)  


Enables or disables reporting of errors through vfprintf.  




Allows you to set vendor JVM options.

The following options are ignored, because there are equivalents to these settings: -D, -Xnoclassgc, -Xdebug, -Xms, -Xmx, -verbose  




Specifies the profiler. If you use the optimizeit profiler from Intuitive Systems, you must also set the OPTIDIR setting.

For more information about this optimizer, see Appendix D "Remote Servlet Profiling."  


0 (off), 1 (on)  


Enables or disables thread recycling. If on, the server always creates a global scope thread to execute servlets. Otherwise a global scope thread is created only when the request handling thread is not in the global scope.  


0 (off), 1 (on)  


If on, threads that attach to the JVM are serialized. By default (if off), threads can attach to the JVM in parallel.  


0 (off), 1 (on)  


Setting the value of this parameter to 1 causes threads to remember that they are attached to the JVM.

This speeds up request processing by eliminating AttachCurrentThread and DetachCurrentThread calls. It can, however, have a side-effect: recycled threads which may be doing other processing can be suspended by the garbage collector arbitrarily.

Thread pools can be used to eliminate this side effect for other subsystems. For more information about thread pools, see the iPlanet Web Server Administrator's Guide.





Determines the trace level. For servlet and JSP debugging, the recommended level is 7. Level 5 displays servlet engine messages. Level 6 displays servlet and JSP engine messages. Level 7 displays these and other exceptions in the browser.  


0 (off), 1 (on)  


Enables or disables exit from the process.  




Specifies the Java compiler. See your JVM documentation for options that turn the JIT (just in time) compiler on and off. This should be set to NONE when jvm.enableDebug is on.  


A path  


Specifies the path to the profiler if the profiler is optimizeit.  


0 (off), 1 (on)  


Enables or disables verbose JSP compilation tracing.

For more information about remote debugging, see Chapter 5 "Debugging Servlets and JSPs."  


0 (off), 1 (on)  


Specifies whether to include the CLASSPATH environment variable value in the jvm.classpath setting.  


0 (off), 1 (on)  


If on, Java compilation of JSPs runs in a separate process.  


0 (off), 1 (on)  

1 for Linux, AIX, and Compaq (DEC);
0 for other platforms

If on, ensures that only one request thread loads and constructs a servlet object. Once a servlet is loaded and initialized, new requests to the same servlet happen in parallel. This setting must be on for Linux, AIX, and Compaq (DEC).  


A path with forward slashes only  


Specifies the path(s) to JAR files dependent on the JVM. Enter additional classpath values as needed.

For example, if a JSP uses a bean that is packaged in a JAR, add the JAR path to the classpath.

If you are using a session manager that uses a JDBC driver, be sure to include the driver's JAR file in this classpath.  

* N:/App/IntuitiveSystems/OptimizeIt30D, where N is the drive on which OptimizeIt is installed.

Previous     Contents     Index     DocHome     Next     
Copyright © 2001 Sun Microsystems, Inc. Some preexisting portions Copyright © 2001 Netscape Communications Corp. All rights reserved.

Last Updated May 02, 2001