This section explains the types of administrative tasks that you can do with NJVM.
Additional information you might need about the JVM for NetWare can be located in the Novell JVM for NetWare documentation.
For information about using and managing Java-based components on the NetWare server, see:
The java\lib\font.properties file for NJVM controls the Java font to native font mapping. The font.properties file is nearly identical to the Solaris* implementation. For a description, see the font.properties documentation on the Sun Web Site.
This section explains how to load and unload NJVM.
To load NJVM (java.nlm), enter load java at the system console.
This loads NJVM into memory and allows the command interpreter to recognize when a Java application or applet is launched. For information about different loading options, see JVM Client and Server Versions.
You can unload NJVM (java.nlm) from memory by entering the following command at the system console:
java -exit
This calls any registered shutdown hooks, closes all of your Java applications, and unloads Java.
This section contains the following procedures:
To start the NetWare GUI, enter startx at the system console.
When the button appears on the taskbar menu in the lower left corner, the startup process is complete.
The NetWare GUI’s Server Console utility is C-based and does not require Java to be loaded. Multiple instances of the Server Console utility can be loaded. This lets you view multiple server screens simultaneously in the NetWare GUI. For example, you can view the Logger screen, Edit screen, and the Console screen from three different windows.
To start the Server Console utility, click the icon on the Server GUI taskbar menu, or click > , .
NOTE:Some screens have limited functionality and update only when they are the active screen. You need to view these screens from within a system console that follows the active screen.
The first instance of the Server Console utility you launch follows the active screen. This means that it immediately reflects changes made on the active screen. For all other instances, following the active screen is not the default setting; you can manually select this option by clicking > .
All instances following the active screen have an asterisk in front of the screen name.
There are three methods to activate the taskbar menu:
The taskbar menu consists of items that are either menus or commands.
Menus consist of the following items:
If you specify an international name, it appears in the taskbar menu; otherwise, the default name appears.
Internationalized names are stored in files with the .properties extension.
Commands consist of the following items:
IMPORTANT:We recommend that you specify a .ncf file that contains actual commands to execute.
Click in the NetWare GUI, select , then select .
Right-click the location where you want to install the menu item.
Click either or .
Type the information in the Edit panel.
On the taskbar menu, click , then click .
Click in the NetWare GUI, select , then select .
Click the menu you want to change.
Modify the command information in the Edit panel.
On the taskbar menu, click , then click .
Click in the NetWare GUI, select , then select .
Right-click the menu you want to remove.
Select .
On the taskbar menu, click , then click .
Click in the NetWare GUI, select , then select .
Right-click the menu you want to move.
Click either or .
On the taskbar menu, click , then click .
If a target menu is open, the selected menu moves into that menu; otherwise, the selected menu moves past the target menu.
The Menu Editor contains two sections for names:
A properties file is a text file that contains key=value entries. For example, PROGRAMS=programs or UTILITIES=utilities.
The key on the left should contain only ASCII characters. The value on the right can contain characters or specifiers for Unicode encoding. For example, you can specify the value Run using any of the following:
The naming convention is to specify a file with a base name and an extension of .properties. For example, MyNames.properties
To use a properties file, you must first place it in the sys:\java\lib\taskbar directory. Then, in the Optional Internationalized Name section of the Menu Editor, click to select your properties file. When you select this file, the items in the file display in a list of names. You choose the name you want to use from this list.
IMPORTANT:Do not add your own name entries to the NWMenu.properties file. This file is overwritten when you install a newer version of NJVM.
The values you retrieve from a properties file can correspond to the language of the server. If you provide the product for an international audience, you might want to ship properties files for each of the locales supported by the server. To do this, create a file whose name will be used as the base name. Then create files with filenames that contain the base name plus a language (and optionally locale) specifier that corresponds to the language of the values in the properties file. This follows the naming convention used by Java properties files.
For example, the following are some of the file names in the sys:\java\lib\taskbar:
When you specify the properties file, you specify the default properties file such as NWMenu.properties. The actual properties file that is used to retrieve the names depends on the language and locale of the server. For example, if the NWMenu.properties file is specified, the server language is set to use German, and there is a NWMenu_de.properties file, then the NWMenu_de.properties file is searched first for the entry. If the entry is not found in this file, then the NWMenu.properties file is searched. If the entry is not found in either file, then the default name is used.
You use the NetWare GUI environment utility to configure VESA Super VGA and Accelerated-X Servers on NetWare. This utility lets you select the video board, keyboard, mouse, and monitor from a set of predefined hardware devices supported by the NetWare GUI environment utility.
In the NetWare GUI, click , select , then select .
See the NetWare GUI Environment online help for further documentation on using this utility.
To achieve the best video quality when you configure your accelerated video driver, configure the monitor and select a refresh rate as high as possible.
NOTE:When selecting a video driver, we recommend using the standard Xvesa driver.
In the NetWare GUI, click , select , then select .
Select your video board from the Video Board List.
This activates the tab. The default settings are Super VGA with 1024 x 768 resolution and the Monitor tab deactivated.
Select your monitor from the list of monitors.
This enables all possible refresh rates for the selected monitor.
Select the highest available refresh rate, then set the video board to the desired resolution.
Select , then click .
After the test pattern displays, click , click , then click again.
In the NetWare GUI, click , select , then select .
All files in the sys:\java\nwgfx\pixmaps directory display. The supported graphics formats are xpm, jpeg, gif, and bmp. If you have background patterns (in the supported formats) that you want to use, place them in the sys:\java\nwgfx\pixmaps directory.
Select the desired background pattern and click .
Click .
If you start the NetWare GUI without a mouse attached to a PS/2 or USB port, the NetWare GUI will start in mouseless mode.
When the NetWare GUI is operating in mouseless mode, use the keypad keys for mouse movement and button clicks.
IMPORTANT:NUMLOCK must be activated to enable keypad mouse movements.
Table 5-11 Keystrokes for Using the NetWare GUI without a Mouse
The following table shows the keystroke actions for Java text areas and text fields as implemented for NJVM.
Table 5-12 Keystroke actions
There are three ways to shut down the NetWare GUI:
This section contains the following processes:
appletviewer html_filename or URL
applet -J-ns html_filename or URL
For example, suppose an applet called MYAPP and its corresponding HTML file are found in sys:\myapps\. To run this applet, you would enter applet sys:\myapps\myapp.html.
java application_name
java -ns application_name
NJVM assigns a screen to the application, then executes the application. If the application requires a graphical interface, NJVM loads the NetWare GUI and displays the application.
IMPORTANT:If the application requires console keyboard input, the -ns option must be used.
While the application is running, you can use the Server Console utility to view any output on the console screens. For instructions on using the Server Console utility, see Server Console Utility.
All GUI applications appear in the same GUI screen.
To force an application to run on a specific processor, use the -mp flag. The processor number should follow -mp. For example, to assign a JVM specifically to processor 3, enter the following at the System Console prompt:
java -mp3 application_name
To assign a JVM to processor 0, enter the following at the System Console prompt:
java -mp0 application_name
NOTE:Using the -mp0 flag is equivalent to disabling multiprocessor support. This flag should be used only with applications that are considered mp-unsafe.
To display a list of currently running processes and their process IDs, enter the following at the system console:
java -show
Get a list of the running Java processes. At the System Console prompt, enter
java -show
At the System Console prompt, enter
java -shutdownprocess_ID
For example:
java -shutdown610
610 is the ID of the process to be shut down.
To shut down all running processes, enter the following at the System Console prompt:
java -shutdownall
NOTE:When you use -shutdown, Java calls the application’s registered shutdown hooks. This provides a more graceful shutdown than the Java -kill command, which closes the application without calling the application’s shutdown hooks. It is the application’s responsibility to register its shutdown hooks.
This section contains the following processes:
Start NJVM by entering the following at the System Console prompt:
load java
At the System Console prompt, enter
envset
When you unload NJVM (java.nlm), the process deletes the Environment variables that were set using ENVSET. You can add Environment variables in the sys:\etc\java.cfg file, which is read when Java loads.
It is helpful to understand the UNIX X Window System* before setting up the DISPLAY environment variable.
Start NJVM by entering the following at the System Console prompt:
load java
At the System Console prompt, enter
envset DISPLAY=IP_address:display
The default value for display is 127.0.0.1:0.0, which is the address of the loopback interface and the default value for the display and screen you want to use.
The Remote Variable Display feature lets you export the display of any X client programs to any machine on the network running an X server. Because the NetWare GUI is X-based, all Java GUI applications and applets are considered X clients and are able to use the remote display feature.
You must configure your destination server to allow remote access. There are two methods to authorize access of a remote X client to a local X server:
-ac
This turns off access control and lets any other client access the server. Be cautious with this method. It lets anyone who can connect to your X server run programs on your display.
This lets you add hosts to the list of client workstations that you allow to access your server. It also lets you delete workstations from this list. For more information on determining the best method of allowing remote access, see your X server user manual.
Allow the remote NetWare system to access the local X server.
Start X server at the local system.
At the local system, start RCONJ and log in to the NetWare server.
Do the following in the RCONJ window:
Start NJVM by entering the following at the System Console prompt:
load java
Enter the following:
envset display=ip_address_of_local_X_server:0
Start the Java applet or application.
(Optional) To make the application always open to the NetWare GUI screen, enter the following at the command line of the NetWare server:
envset display=ip_address_of_local_X_server:0.0
All Java GUI applications now display on the remote client workstation on the NetWare GUI screen. If you do not want the application to always open to the NetWare GUI screen, remove the “.0” from the end of the IP address.
NOTE:The local System Console screen does not automatically switch to the NetWare GUI screen when a GUI application is opened from a remote server or from foreign IP addresses. You must manually switch to the NetWare GUI on your local server to see the display being exported from the remote server.
You can use the Current Working Directory (CWD) variable to run an application in a specific directory even if it is not part of a package. The CWD variable is set to the root when Java is loaded; however, you can set it to any desired directory.
Start NJVM by entering the following at the System Console prompt:
load java
To set the CWD for all applications, enter the following at the System Console prompt:
envset CWD=pathname
For example:
envset CWD=sys:\myjava\myapp
The preferred method is to set the CWD for the current application by using the -env option. For example:
java -envCWD=sys:\myfiles myapp
A default CLASSPATH variable is set when Java loads. If the CLASSPATH variable is set incorrectly, your Java applications might not run. A lengthy CLASSPATH variable might decrease the performance of your Java applications.
Start NJVM by entering the following at the System Console prompt:
load java
Enter the following at the System Console prompt:
envset CLASSPATH=$CLASSPATH;path_to_append
For example, to append the path sys:\myclasses to the current CLASSPATH, enter
envset CLASSPATH=$CLASSPATH;sys:\myclasses
The $ symbol in $CLASSPATH allows the substitution of the current value of the CLASSPATH environment variable.
NOTE:The default CLASSPATH variable includes (.), which means to look in the current working directory (CWD) for the application. If the CWD variable is not set correctly, the application might not run. For more information, see Setting the CWD Environment Variable.
The default native (C) stack size for Java threads on NetWare is 160 KB. For applications that create many threads and do not require such a large stack size, the -Xss Java command options can be used to specify the stack size. For an explanation of the Java command options, refer to the JavaSoft documentation for the Java Interpreter.
To specify the amount of virtual memory available to Java applications for non-heap allocations, use the -vm Java command option. The default is 64 MB for NetWare 6 and 100 MB for NetWare 6.5. The -vm Java command option is unique to NetWare and is not supported by JavaSoft. The following is the syntax for this option:
java -vmsize MyClass
For example,
java -vm128m MyClass
This section explains the following components:
The java.cfg file is an optional configuration file that can be used to set Environment variables. It is located in the sys:\etc directory and is read when java.nlm is loaded.
The following lines are added to the sys:system\autoexec.ncf file during the installation. If they are not added, you can add them manually right after the “mount all” command in the file.
SEARCH ADD SYS:\JAVA\BIN SEARCH ADD SYS:\JAVA\NWGFX\BIN STARTX
HINT:The STARTX line is optional and should go at the end of the autoexec.ncf file. It causes the NetWare GUI to begin running at server startup. You should delete any other instances of these lines in the autoexec.ncf file.
This section explains the following NJVM internationalization issues.
If your server is not installed as a Russian server, you must enable the Russian keyboard. To enable the Russian keyboard, select it in the NetWare GUI setup utility. The Russian keyboard toggles between standard and Russian characters in the same manner as done by keyb.nlm. The keyboard mode on startup uses standard characters. To toggle between modes, press the left and right shift keys simultaneously.
Dead keys are not supported in AWT components.
AWT components can display characters only from the current locale.
AWT components cannot display Japanese, Chinese, or Korean characters.
Keyboard entry of Russian characters in AWT components is available only if the current server language is Russian (language 13).
The font.properties file with no extension is the default file for Latin character languages. Files with country-specific extensions are provided for Russian, Japanese, Chinese, and Korean servers. For example, font.properties.ru corresponds to the Russian font.properties file. No configuration is necessary beyond setting the server language during installation because NJVM automatically selects the appropriate font.properties file for the language setting. However, some servers might require systems or other resources located on different language platforms. To enable full character support, back up the font.properties file, then rename the provided file font.properties.allfonts to font.properties.
NOTE:Renaming font.properties.allfonts to font.properties slows the startup of the first application because of the additional characters that need to load.
NJVM 1.4.2 includes two implementations of the HotSpot virtual machine (VM). This section explains the applications for each version.
The Client VM is the default version of the HotSpot runtime compiler. It is specifically tuned to reduce application startup time and memory footprint.
The Client VM is located in sys:\java\bin\client\jvm.nlm
The Server VM is specifically tuned to maximize peak operating speed. It is intended for long running server applications. The server version requires a larger memory footprint to execute a Java application than that of the client version. You might use this version when operating speed is more important than startup time.
The Server VM is located in sys:\java\bin\server\jvm.nlm.
On NetWare you can run applications with either the Client VM or the Server VM. You cannot use both simultaneously. The command-line flags used to specify which VM to load are -client and -server. You cannot switch VMs while Java applications are running. If you attempt to start an application using one of these flags and the VM version requested is different than what is already being used, then that Java application will fail to load.
The default version of the JVM is the Client VM. To change the default VM to server, add the following line to the sys:\etc\java.cfg file:
JAVA_COMPILER=server
Running an application with the Server VM might require more heap space than with the Client VM. To increase the heap size, use the -Xmxheapsizem flag. For example, you might have a Java application that requires 128 MB of heap to run with the client JVM. Changing to the server might require more heap space, so you could set the heap size flag to -Xmx256m.