This section explains how to set environment variables for Java, load and unload JAVA.NLM, and run Java-based applets and applications.
Most of the information you need about JVM for NetWare can be located in the Novell JVM for NetWare documentation.
See the following sections for information about using and managing Java-based components on the NetWare server:
The Novell JVM for NetWare is automatically installed when you install NetWare. The installation process sets default values for key environment variables. Setting environment variables for Java is necessary to run Java-based applications and applets.
The installation process places some of the variables into the SYS:\ETC\JAVA.CFG file. The JAVA.CFG file is read whenever you load Java. You can modify or add to the JAVA.CFG file.
The following table describes some key environment variables. Other key environment variables for Java are available in the Novell JVM 1.3 for NetWare in Novell Developer Kit (NDK) documentation.
To view current variable values and to set values, follow these steps:
To load JAVA.NLM, enter the following at the System Console prompt:
JAVA
To view current environment variables and variable values, enter the following at the System Console prompt:
ENVSET
When the JAVA.NLM is loaded at the server, you can also view all the environmental settings using NetWare Remote Manager. Click the Java Application Information link in the navigation frame, and then click the Global Environment Settings link.
To set a value for the current session, enter the following at the System Console prompt:
ENVSET VARIABLE=VALUE;VALUE
Make sure there are no spaces on either side of the equal sign or between values. To set multiple values for variables such as CLASSPATH, separate the values with semicolons.
The value of a variable set with ENVSET lasts until Java is unloaded.
To append a value to the CLASSPATH variable, use $CLASSPATH to represent the existing values.
For example:
ENVSET CLASSPATH=$CLASSPATH;SYS:MYCLASSES
To make lasting changes to variable values, enter the ENVSET command line in the SYS:\ETC\JAVA.CFG file.
The JAVA.CFG file is read whenever Java is loaded.
To edit the file, use the Editor in the NetWare GUI, use EDIT at the System Console prompt, or use a word processing program at a workstation.
Managing the NetWare GUI includes the following tasks:
The NetWare GUI (X Server--Graphical Console) is loaded by default when the server is started. If you have closed the GUI and want to start it again, enter the following at the System Console prompt:
STARTX
This loads Novell JVM for NetWare if it is not already loaded, and then loads the NetWare GUI into memory.
The following are three ways to shut down NetWare GUI. The first two close the NetWare GUI without shutting down the JVM.
java -exit
To toggle to the next screen, press Alt+Esc.
To display the NetWare screen selection list, press Ctrl+Esc.
To activate the desktop menu in NetWare GUI, click the Novell button in the lower left-hand corner of the screen.
Do the following to install a program into the desktop menu:
Copy all the necessary program files to the server.
Copy your program's menu files to the desktop menu directory SYS:/JAVA/LIB/TASKBAR.
If this directory does not exist, you need to create it. For an example of the file format for a menu file, see SYS:/JAVA/LIB/TASKBAR.EXAMPLE.
If your menu file uses a resource bundle for internationalization of the menu strings, copy the resource bundle to the desktop menu directory SYS:/JAVA/LIB/TASKBAR.
After you install your program, the next time you click the Novell button in the NetWare GUI, your menu items will appear. You can then start your program by selecting the appropriate menu item.
You construct the desktop menu by merging any installed menu files and the custom menu file with the default desktop menu. You can modify the desktop menu by editing the custom menu file or any of the installed menu files.
To add items to the desktop menu, create a customized.MENU file and copy it to the SYS:\JAVA\LIB\TASKBAR directory. For an example menu file, see SYS:\JAVA\LIB\TASKBAR.EXAMPLE.
You can remove either an entire menu file and all the contents, or you can remove only a single menu item.
To remove a whole menu file, either delete the file or rename it by changing the extension to something other than .MENU.
To remove a single menu item from the desktop menu, locate the item and delete it from the menu file.
Currently, the default taskbar property is the stay-on-top property. If you do not want the taskbar to stay on top, you can change this property by creating a NAWT.PROPERTIES configuration file and adding the following line to it:
taskbar.stayontop=false
For an example of a properties configuration file, see the SYS:\JAVA\LIB\NAWT.PROPERTIES.SAMPLE file.