Launching the SAP JVMThe command line for launching the SAP JVM standalone (not as part of the NetWeaver Application Server Java) looks like this:
java [ options ] class [ argument ... ]
java [ options ] -jar file.jar [ argument ... ]
with
Command line entry |
Description |
|---|---|
options |
Command line options |
class |
Name of the class to be invoked |
file.jar |
Name of the jar file to be invoked. Used only with -jar |
argument |
Argument passed to the main function |
There is a set of standard options that is recognized by the SAP JVM (whether started standalone or as part of the Application Server Java). In addition, there is also a set of non-standard options that are subject to change in future releases.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A list of directories, JAR archives, and ZIP archives to search for class files. The class path entries are separated by the operating system’s path separator (colons (:) on Unix, semicolons (;) on Windows). This option overrides any settings in the environment variable CLASSPATH.
-D<name>=<value>
Set a system property value.
-verbose[:class|gc|jni]
Enable verbose output. This will display information about every class loaded (class), each garbage collection event (gc), and about use of native methods and other Java Native Interface activity (jni).
-version
Print the product version and exit.
-version:<value>
Require the specified version to run.
-showversion
Print the product version and continue.
-jre-restrict-search | -jre-no-restrict-search
Include/exclude user private JREs in the version search.
-? –help
Print a short usage help message.
-X
Print help on available non-standard options.
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
Enable assertions. If no argument is given, assertions are enabled for all loaded classes except system classes (which do not have a class loader). Otherwise, assertions are enabled for the given class or package (and any subpackages). Package names must end in "…". Multiple instances of these switches are allowed.
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
Disable assertions. If no argument is given, assertions are disabled for all loaded classes except system classes (which do not have a class loader). Otherwise, assertions are disabled for the given class or package (and any subpackages). Package names must end in "…". Multiple instances of these switches are allowed.
-esa | -enablesystemassertions
Enable assertions for all system classes.
-dsa | -disablesystemassertions
Disable assertions for all system classes.
-agentlib:<libname>[=<options>]
Load native agent library <libname>, e.g. -agentlib:hprof. See also -agentlib:jdwp=help and -agentlib:hprof=help.
-agentpath:<pathname>[=<options>]
Load a native agent library by full path name.
-javaagent:<jarpath>[=<options>]
Load a Java programming language agent, see the API documentation for package java.lang.instrument
-Xmixed
Mixed mode (interpreted and compiled) execution (default)
-Xint
Interpreted mode execution only. This disables compilation of bytecodes to native code (and thereby disables the performance benefits of the compiler).
-Xbootclasspath:<directories and zip/jar files separated by ;>
Set the search path for bootstrap classes and resources.
-Xbootclasspath/a:<directories and zip/jar files separated by ;>
Append entries to end of bootstrap class path.
-Xbootclasspath/p:<directories and zip/jar files separated by ;>
Prepend entries in front of bootstrap class path.
-Xnoclassgc
Disable class garbage collection.
-Xincgc
Enable the incremental garbage collection (off by default). This is the Concurrent Mark and Sweep garbage collector. This option is a synonym for option -XX:+UseConcMarkSweepGC
-Xloggc:<file>
Logs garbage collection events to a file. This provides the same information as the option -verbose:gc (and overrides it if both are given on the same command line).
-Xbatch
Disable compilation of methods in a background task. Execution of these methods cannot proceed in interpreter mode, but have to wait for compilation to finish.
-Xms<size>
Set initial Java heap size in bytes. Append the letter ‘k’ or ‘K’ to indicate kilobytes, or ‘m’ or ‘M’ for megabytes.
-Xmx<size>
Set the maximum Java heap size, using the same notation as -Xms.
-Xss<size>
Set the Java thread stack size.
-Xps<size>
Set the maximum of the shared pool size
-Xprof
Output CPU profiling data about the running program to standard output.
-Xfuture
Enable strict checks of classfile format, anticipating future default. This option should be enabled for development of new code.
-Xrs
Reduces the use of operating system signals by the VM. If this option is enabled, no signal handlers for signals SIGINT, SIGTERM, SIGHUP, and SIGQUIT are installed. When using this option, SIGQUIT thread dumps are not available and user code is responsible for causing shutdown hooks to run, for example by calling System.exit() when the JVM is to be terminated.
-Xcheck:jni
Perform additional checks for JNI functions.
-Xjvmx
Enable the shared session store necessary for the failover support in the NetWeaver Application Server Java
-XdebugPortRange:<from>[-<to>]
Set the range for debugger TCP ports.
-Xtrace<trace>
Set trace flags. See section 4.2 for details.
-XbuildInfo
Print out detailed compilation info and exit.
-XshowBuildInfo
Print out detailed compilation info and continue.
-Xcp/a:<path>
Append a path to the class path.
-Xcp/ad:<dir>
Append all jars inside a directory to the class path.
-Xcp/p:<path>
Prepend a path to the class path.
-Xcp/pd:<dir>
Prepend all jars inside a directory to the class path.
-XX:<option>
Options starting with –XX are advanced options for tuning the VM’s behavior and enabling or disabling specific features. These options are not stable and not recommended for casual use.
Some –XX options are presented in the following sections: