pjava [ options ] class_name [ argument ... ] pjavaw [ options ] class_name [ argument ... ] pjava_g [ options ] class_name [ argument ... ] pjavaw_g [ options ] class_name [ argument ... ]
The pjava invocation tool launches a Java application on the PJEE. It does this by starting the PersonalJava virtual machine, loading class_name, and invoking that class's main method which must have the following signature:
public static void main(String[])By default, the first non-option argument is the name of the class to be loaded. A fully-qualified class name should be used. The PersonalJava virtual machine searches for the startup class, and other classes used, in three sets of locations: the bootstrap class path, the installed extensions, and the user class path.
Non-option arguments after the class name are passed to the main function.
pjava_g is a non-optimized version of pjava suitable for use with debuggers like jdb. If a Java application has native methods that are contained in shared libraries, then the debug version of the PersonalJava application launcher The naming convention for identifying debug shared libraries is to append _g to library file name. if the library was libhello.ext, the debug version would be libhello_g.ext.
(Microsoft Windows 95/NT only). The pjavaw command is identical to pjava, except that pjavaw does not create a console window for displaying a standard output stream. To launch a Java application with pjavaw, use the Run command on the Start menu and give it the full path name of the pjavaw executable along with the main application class and any command line arguments.
% pjava com.yournamehere.HelloWorld
- -debug
- Allows the Java debugger, jdb, to attach itself to a pjava session. When
-debug
is specified on the command line pjava displays a password which must be used when starting the debugging session.
- -classpath path
- Specifies the search path the virtual machine uses to look up class files. Directories are separated by colons. Thus the general format for path is:
.:<your_path>For example:.:/home/xyz/classes:/usr/local/java/classesThis command line option overrides the CLASSPATH environment variable if it is set.
- -mxnum
- Sets the maximum size of the memory allocation pool (the garbage collected heap) to num. The default is 16 megabytes of memory. num must be greater than or equal to 1000 bytes. The maximum memory size must be greater than or equal to the startup memory size (specified with the -ms option, default 16 megabytes).
By default, num is measured in bytes. The meaning of num can be modified by appending either the letter "k" for kilobytes or the letter "m" for megabytes.
- -msnum
- Sets the startup size of the memory allocation pool (the garbage collected heap) to num. The default is 1 megabyte of memory. num must be > 1000 bytes. The startup memory size must be less than or equal to the maximum memory size (specified with the -mx option, default 16 megabytes).
By default, num is measured in bytes. The meaning of num can be modified by appending either 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.
- -Xhprof[:keyword=value]
- Enables heap profiling. Optional parameters can be specified with one or more keyword/value pairs, separated with commas. Valid parameters are:
Option Range Default Description help prints a help message for the profiler heap dump|sites|all all heap profiling cpu samples|times|old off CPU usage monitor y|n n monitor contention format a|b a ASCII or binary output file <file> java.hprof[.txt] write data to file net <host>:<port> write to file send data over a socket cutoff <value> 0.0001 output cutoff point lineno y|n y line number in traces thread y|n n thread in traces doe y|n y dump on exit
- -version
- Print the build version information.
- -help
- Print a usage message.
- -ssnum
- 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 num. Every thread that is spawned during the execution of the program passed to pjava has x as its C stack size. The default units for num are bytes. The value of num must be greater than or equal to 1000 bytes.By default, num is measured in bytes. The meaning of num can be modified by appending either the letter "k" for kilobytes or the letter "m" for megabytes. The default stack size is 128 kilobytes ("-ss128k").
- -ossnum
- 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 num. Every thread that is spawned during the execution of the program passed to pjava has num as its Java stack size. The default units for num are bytes. The value of num must be greater than or equal to 1000 bytes.By default, num is measured in bytes. The meaning of num can be modified by appending either the letter "k" for kilobytes or the letter "m" for megabytes. The default stack size is 400 kilobytes ("-oss400k").
- -t
- Prints a trace of the instructions executed (pjava_g and pjavaw_g only).
- -v, -verbose
- Causes pjava to print a message to stdout each time a class file is loaded.
- -verify
- Performs bytecode verification on the class file. Beware however, that pjava -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, pjava -verify cannot be relied upon to verify 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
- Redefines a property value. propertyName is the name of the property whose value will be changed to newValue. For example, this command line
% pjava -Dawt.button.color=green ...sets the value of the property awt.button.color to "green". pjava accepts any number of-D
options on the command line.
- -version
- Version number of the PJES used to build the PJEE.
- -fullversion
- String describing the PJES build parameters.
- CLASSPATH
- Provides a search path for finding user-defined classes. Directory names are separated by a platform-specific path separator character. Here is a Solaris example,
.:/home/xyz/classes:/java/classesAnd here is a Microsoft Windows 95/NT example,C:\home\xyz\classes;C:\java\classes- LD_LIBRARY_PATH
- (Solaris only). Provides a search path for finding shared libraries that contain native method implementations. Directory names are separated by a platform-specific path separator character. Here is a Solaris example,
.:/usr/local/libMicrosoft Windows NT/95 uses the PATH environment variable as a search path for both binary executables and dynamic link libraries (DLLs) that contain native method implemenations.