NAME | SYNOPSIS | FEATURES | DESCRIPTION | OPTIONS | ENVIRONMENT VARIABLES | ATTRIBUTES | SEE ALSO | NOTES
JVM
java is a target utility.
The java command executes Java bytecodes created by the Java compiler, javac
, on the host system.
The classname argument is the name of the class to be executed and must be fully qualified by including the package in the name, for example:
example% rsh target arun JVM_ROOT/bin/java java.lang.String |
Note that any arguments that appear after classname on the command line are passed to the main() method of the class.
The bytecodes for the class are put in a file called classname.class by compiling the corresponding source file with javac
. All Java bytecode files end with the filename extension .class, which the compiler automatically adds when the class is compiled. The classname argument must contain a main() method defined as follows:
class Aclass { public static void main(String argv[]){ . . . } }
The java command returns control to the command interpreter as soon as it has succeeded in loading the class. It then executes the main() method and exits unless main() creates one or more threads. In this case, java does not exit until the last thread exits. Note that exiting a class never causes the Java Virtual Machine to exit in the context of ChorusOS.
When defining classes, specify their locations using the APP_CLASSPATH environment variable, which consists of a colon-separated list of directories that specifies the path.
The following options are supported:
Kill all running Java threads and terminate the jvmd
actor.
Reload environment variables.
If the environment variables to reload are provided as a set of whitespace-separated variable-value argument pairs to the -rehash option, the Java Virtual Machine will reload only those environment variables that are specified. Otherwise the -rehash option forces the Java Virtual Machine to reload all relevant environment variables. (See ENVIRONMENT VARIABLES.)
List all Java currently loaded classes in the jvmd
actor.
List all Java threads currently running in the jvmd
actor.
The following environment variables are supported:
Base directory where the Java Virtual Machine is installed.
Default value: /opt/jvm (as seen from the target system).
Search path for non-verified bootstrap classes and resources.
Default value: ${JVM_ROOT}/classes.
Search path for bootstrap native libraries.
Default value: ${JVM_ROOT}/lib.
Enables or diables tracing. Values assigned to this environment variable may be: none (no tracing), all (full tracing), loading (provide traces from internal primordial classloader), verifying (provide traces from the verifier), loading, verifying or verifying, loading.
Default value: none
Enables or disables garbage collection according to the mark and sweep method. Values assigned to this environment variable may be either enable or disable.
Default value: enable
Search path for application classes and resources.
Default value: None (user-defined).
Search path for application native libraries.
Default value: None (user-defined).
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
startjvm(1CC), JVM(5FEA).
The jvmd
actor behaves somewhat differently from Java Virtual Machines designed for other general purpose operating systems. Refer to startjvm(1CC) for more information about the jvmd
actor.
NAME | SYNOPSIS | FEATURES | DESCRIPTION | OPTIONS | ENVIRONMENT VARIABLES | ATTRIBUTES | SEE ALSO | NOTES