Previous Page: Using Server Utilities and Console Commands  Next Page: Securing the Server Console

Using Java on the Server

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:


Environment Variables for Java

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.

Environment Variable Description

JAVA HOME

Specifies the location of the JVM. The default value is SYS:\JAVA.

CLASSPATH

Specifies the location of the default classpath.

XLOCALDIR

Specifies the location of files needed to support other languages, including keyboard and font files.

To view current variable values and to set values, follow these steps:

  1. To load JAVA.NLM, enter the following at the System Console prompt:

    JAVA

  2. 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.

  3. 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

  4. 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 NetWare Server GUI

Managing the NetWare GUI includes the following tasks:


Starting the NetWare GUI

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.


Shutting Down the NetWare GUI

The following are three ways to shut down NetWare GUI. The first two close the NetWare GUI without shutting down the JVM.


Accessing the Desktop Menu and Other Console Screens

To toggle to the next screen, press Alt+Esc.

To display the NetWare screen selection list, press Ctrl+Esc.


Activating the Desktop Menu

To activate the desktop menu in NetWare GUI, click the Novell button in the lower left-hand corner of the screen.


Configuring the Desktop Menu


Installing Programs

Do the following to install a program into the desktop menu:

  1. Copy all the necessary program files to the server.

  2. 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.


Modifying the Menu

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.


Removing Installed Menu Items from the Desktop Menu

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.


Setting Taskbar Properties

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.



  Previous Page: Using Server Utilities and Console Commands  Next Page: Securing the Server Console