Java programs can run on the PJEE on either Microsoft Windows 95/NT or Solaris. Each implementation has a set of invocation tools for running Java software:
Invocation Tool | Description | |
---|---|---|
pjava
pjavaw |
Optimized version. | The PersonalJava application launcher loads and excutes Java applications. |
pjava_g
pjavaw_g |
Debug version. | |
pappletviewer | Optimized version. | The PersonalJava applet viewer loads HTML pages that contain Java applets. |
pappletviewer_g | Debug version. |
pjava_g and pappletviewer_g include symbol tables for debugging.
The PJEE includes a set of invocation tools for launching Java applications and loading HTML files that contain Java applets. Running Java software on the PJEE is based on using one of these invocation tools with command line options that identify the Java software and control various runtime options.
Here is an example of how to use pjava to launch a Java application and run it on the PJEE:
C:\> pjava HelloWorld
Note: The PJEE-dir\bin directory must be in the PATH environment variable. See PATH for a description of how to modify the PATH environment variable.
This example loads a class file named HelloWorld.class in the current directory. Note that the .class suffix is omitted from the command line. The PersonalJava application launcher locates and executes the main method in the HelloWorld class which then runs the application. If HelloWorld has a GUI, the PJEE creates a window for displaying it.
The pjavaw command is identical to pjava, except that pjavaw does not create a console window for displaying a standard output stream. Here's how to launch a Java application with pjavaw:
The PJEE will then launch the application. The behaviour is identical to the pjava command with the exception that it does not create or use a console window.
pappletviewer is a test program for loading Java applets. It read an HTML file, parses the first <APPLET> tag while ignoring all other HTML tags, and then loads and executes the corresponding applet.
Here is an example,
C:\> pappletviewer HelloWorldApplet.html
Note: The PJEE-dir\bin directory must be in the PATH environment variable. See PATH for a description of how to modify the PATH environment variable.
The PJEE includes a set of invocation tools for launching Java applications and loading HTML files that contain Java applets. Running Java software on the PJEE is based on using one of these invocation tools with command line options that identify the Java software and control various runtime options.
Here is an example of how to use pjava to launch a Java application and run it on the PJEE:
% pjava HelloWorld
Note: The PJEE-dir/bin directory must be in the PATH environment variable. See PATH for a description of how to modify the PATH environment variable.
This example loads a class file in the current directory named HelloWorld.class. Note that the .class suffix is omitted from the command line. The PersonalJava application launcher locates and executes the main method in the HelloWorld class which then runs the application. If HelloWorld has a GUI, the PJEE creates a window for displaying it.
pappletviewer is a test program for loading Java applets. It read an HTML file, parses the first <APPLET> tag while ignoring all other HTML tags, and then loads and executes the corresponding applet.
Here is an example,
% pappletviewer HelloWorldApplet.html
Note: The PJEE-dir/bin directory must be in the PATH environment variable. See PATH for a description of how to modify the PATH environment variable.
The PJEE uses two standard mechanisms for specifying system options:
Java application software can also provide user-level options that are based on Java properties and Java property files.
The table below describes standard Java system properties that are part of the JDK 1.1.x API.
Property | Type | Description | |||||
---|---|---|---|---|---|---|---|
file.encoding | string | The system locale's character encoding. See Supported Encodings in JDK 1.1 Internationalization Overview. | |||||
file.encoding.pkg | string | The package that contains the classes for converting between the system locale's character encoding and Unicode. | |||||
file.separator | string |
|
Platform-dependent name separator used in path names. | ||||
java.class.path | string | Java class path in platform-dependent form. | |||||
java.compiler | string | Specifies a JIT compiler to use. | |||||
java.class.version | string | Java class file version number. | |||||
java.home | string | PJEE installation directory. | |||||
java.vendor | string | PJEE vendor-specific string. | |||||
java.vendor.url | string | PJEE vendor URL. | |||||
java.version | string | Version number of PJAE specification. | |||||
line.separator | string |
|
Platform-dependent line separator used in text files. | ||||
os.arch | string | Host OS architecture. | |||||
os.name | string | Host OS name. | |||||
os.version | string | Host OS version. | |||||
path.separator | string |
|
Platform-dependent name separator used in search paths. | ||||
user.dir | string | User's current working directory. | |||||
user.home | string | User's home directory. | |||||
user.language | string | ISO 639 language code of the system locale. | |||||
user.name | string | User's account name. | |||||
user.region | string | ISO 3166 country code of the system locale. | |||||
user.timezone | string | The POSIX.1 time zone name. |
The table below describes PJEE-specific system properties.
Note: These PJEE-specific system properties are for diagnostic purposes only. They should not be used in production versions of Java programs.
Property | Type | Default | Description |
---|---|---|---|
awt.toolkit | reference | sun.awt.touchable.TouchableToolkit | Use an alternate implementation of the AWT toolkit. |
sun.awt.platform.pixelType | string | color:8 | Set the color model and depth. |
sun.awt.aw.DefaultCursor | reference | sun.awt.aw.Touchable.FingerPrint | Specify the class used for the cursor. A value of "blank" disables the cursor. |
sun.awt.im.InputMethod | reference | null | Enable the named input method. A value of "default" expands to sun.awt.otk.SampleInputMethod. |
sun.awt.im.Japanese | boolean | false | If true, then use a Japanese Kana keyboard instead of a QWERTY keyboard. |
sun.awt.im.NoVirtualKeyboard | boolean | false | If true, then specify that a physical keyboard is present and disable the virtual keyboard. |
sun.awt.otk.noRandomSelectionMode | boolean | true | If true, then disable text cursor behaviour when the user makes a selection away from a text component. |
sun.awt.otk.ObjectToolkit | reference | sun.awt.otk.ObjectToolkit | Use an alternate implementation of the Truffle Object Toolkit. |
sun.awt.otk.textWordSelectionOff | boolean | false | If true, then disable word selection mode for mousePressed with text components. |
sun.awt.palette | string | Orange | Specify the name of the selected palette in the palette database. |
sun.awt.palette.definitions | string | PJEE-dir/lib/touchable.palettes | Specify the path name of the palette database. |
sun.awt.touchable.doNotDrawFocusRectangle | boolean | false | If true, then disable the focus rectangle. |
sun.awt.touchable.paletteClass | reference | sun.awt.otk.ColorPalette | Spcify the name of color palette hashtable. |
sun.awt.touchable.sound | boolean | false | If true, then enable sound. |
sun.graphicssystem | reference | sun.awt.aw.GraphicsSystem | Use an alternate implementation of the Truffle graphics system. |
sun.graphicssystem.height | integer | 480 | Set the height of the window containing the graphics system. |
sun.graphicssystem.width | integer | 640 | Set the width of the window containing the graphics system. |
sun.windowsystem | reference | sun.awt.aw.WindowSystem | Use an alternate implementation of the Truffle window system. |
The pjava command uses the -D command line option to specify the value of a system property. For example,
% pjava -Dsun.awt.palette=Sand HelloWorld
Here are some troubleshooting tips for running the PJEE.
% pjava -verbose sun.applet.AppletViewer URL
This generates a list of classes the AppletViewer tries to load and where it's trying to load them from. Check to make sure that the class files exists and are uncorrupted.
Exception in thread NULL Unable to initialize threads: cannot find class java/lang/Thread
then check the CLASSPATH environment variable. It may contain a directory from an older release of the PJAE or a different Java application environment.
net.socketException: errno = 10047 Unsupported version of Windows Socket API
then check which TCP/IP drivers are installed. Third-party TCP/IP drivers may not work correctly because the PJEE supports only the Microsoft TCP/IP drivers included with Microsoft Windows 95/NT.