jre - The Java Runtime Interpreter (Solaris)

jre interprets (executes) Java bytecodes.

SYNOPSIS

jre [ options ] classname <args>

DESCRIPTION

The jre command executes Java class files. The classname argument is the name of the class to be executed. Any arguments to be passed to the class must be placed after the classname on the command line.

Class paths for the Solaris version of the jre tool can be specified using the CLASSPATH environment variable or by using the -classpath or -cp options. The Windows version of the jre tool ignores the CLASSPATH environment variable. For both Solaris and Windows, the -cp option is recommend for specifying class paths when using jre.

OPTIONS

-classpath   path(s)
Specifies the path or paths that jre uses to look up classes. Overrides the default or the CLASSPATH environment variable if it is set. If more than one path is specified, they must be separated by colons. Each path should end with the directory containing the class file(s) to be executed. However, if a file to be executed is a zip or jar file, the path to that file must end with the file's name. Here is an example of an argument for -classpath that specifies three paths consisting of the current directory and two additional paths:
   .:/home/xyz/classes:/usr/local/java/classes/MyClasses.jar

-cp   path(s)
Prepends the specified path or paths to the base classpath or path given by the CLASSPATH environment variable. If more than one path is specified, they must be separated by colons. Each path should end with the directory containing the class file(s) to be executed. However, if a file to be executed is a zip or jar file, the path to that file must end with the file's name. Here is an example of an argument for -cp that specifies three paths consisting of the current directory and two additional paths:
   .:/home/xyz/classes:/usr/local/java/classes/MyClasses.jar

-help
Print a usage message.

-mx   x
Sets the maximum size of the memory allocation pool (the garbage collected heap) to x. The default is 16 megabytes of memory. x must be greater than or equal to 1000 bytes.

By default, x is measured in bytes. You can specify x in either kilobytes or megabytes by appending the letter "k" for kilobytes or the letter "m" for megabytes.

-ms   x
Sets the startup size of the memory allocation pool (the garbage collected heap) to x. The default is 1 megabyte of memory. x must be > 1000 bytes.

By default, x is measured in bytes. You can specify x in either kilobytes or megabytes by appending the letter "k" for kilobytes or the letter "m" for megabytes.

-noasyncgc
Turns off asynchronous garbage collection. When activated no garbage collection takes place unless it is explicitly called or the program runs out of memory. Normally garbage collection runs as an asynchronous thread in parallel with other threads.

-noclassgc
Turns off garbage collection of Java classes. By default, the Java interpreter reclaims space for unused Java classes during garbage collection.

-nojit
Specifies that any JIT compiler should be ignored and instead invokes the default Java interpreter.

-ss   x
Each Java thread has two stacks: one for Java code and one for C code. The -ss option sets the maximum stack size that can be used by C code in a thread to x. Every thread that is spawned during the execution of the program passed to jre has x as its C stack size. The default units for x are bytes. The value of x must be greater than or equal to 1000 bytes.

You can modify the meaning of x by appending either the letter "k" for kilobytes or the letter "m" for megabytes. The default stack size is 128 kilobytes ("-ss 128k").

-oss   x
Each Java thread has two stacks: one for Java code and one for C code. The -oss option sets the maximum stack size that can be used by Java code in a thread to x. Every thread that is spawned during the execution of the program passed to jre has x as its Java stack size. The default units for x are bytes. The value of x must be greater than or equal to 1000 bytes.

You can modify the meaning of x by appending either the letter "k" for kilobytes or the letter "m" for megabytes. The default stack size is 400 kilobytes ("-oss 400k").

-v,   -verbose
Causes jre to print a message to stdout each time a class file is loaded.

-verify
Performs byte-code verification on the class file. Beware, however, that java -verify does not perform a full verification in all situations. Any code path that is not actually executed by the interpreter is not verified. Therefore, java -verify cannot be relied upon to certify class files unless all code paths in the class file are actually run.

-verifyremote
Runs the verifier on all code that is loaded into the system via a classloader. verifyremote is the default for the interpreter.

-noverify
Turns verification off.

-verbosegc
Causes the garbage collector to print out messages whenever it frees memory.

-DpropertyName=newValue
Defines a property value. propertyName is the name of the property whose value you want to change and newValue is the value to change it to. For example, this command line
% jre -Dawt.button.color=green ...
sets the value of the property awt.button.color to "green". jre accepts any number of -D options on the command line.

ENVIRONMENT VARIABLES

CLASSPATH
You can use the CLASSPATH environment variable to specify the path to the class file or files that you want to execute. CLASSPATH consists of a colon-separated list of directories that contain the class files to be executed. For example:
   .:/home/xyz/classes
If the file to be executed is a zip file or a jar file, the path should end with the file name. For example:
   .:/usr/local/java/classes/MyClasses.jar

SEE ALSO

CLASSPATH