Chapter 2 Installing Java Plug-in
This chapter includes the following information:
Installing Java Plug-in
Java Plug-in 1.2 is included in the Solaris 8 base package CD and automatically installs with Solaris 8.
Java Plug-in installs in the /usr/dt/appconfig/netscape directory by default, allowing for easy mass deployment. Since you can install Java Plug-in 1.2 in a central location, all your users can access the plug-in over NFS. This installation method creates a single point of administration
and makes it easy to perform future upgrades.
Files Created During Installation
During the Java Plug-in 1.2 installation process, the directories and files listed in the following table are created in the installation directory.
Table 2-1 Java Plug-in 1.2 Files
| File | Description |
| /j2pi/COPYRIGHT | Text file that contains JRE copyright information |
| /j2pi/ControlPanel | Script that starts the Java Plug-in Control Panel |
| /j2pi/ControlPanel.html | HTML file that enables you to work with the Control Panel from Netscape Navigator |
| /j2pi/LICENSE_JPI_en.txt | Java Plug-in license agreement (English language version) in text format |
| /j2pi/LICENSE_JRE_en.ps | JRE license agreement (English language version) in PostScriptTM format |
| /j2pi/jre_config.txt | Text file that contains information about the JRE |
| /j2pi/bin | Directory that contains the Java Plug-in executable and JRE executables |
| /j2pi/bin/java | Default JRE (1.2.1_03) |
| /j2pi/lib | Directory that contains property files, the Swing Java Archive (JAR) file, and the Java Plug-in JAR file |
| /plugins/javaplugin.so | Description of Java Plug-in for Solaris that displays when you choose About Plug-ins from the Help menu |
Verifying the Installation
Perform the following tasks to verify that the installation was successful.
-
Start Netscape and choose About Plug-ins from Netscape's Help menu. Make sure the following MIME types are listed for Java Plug-in:
application/x-java-bean;version=1.2.2
application/x-java-bean;version=1.2.2
application/x-java-bean;version=1.2.1
application/x-java-bean;version=1.2
application/x-java-applet;version=1.1.2
application/x-java-applet;version=1.1.1
application/x-java-applet;version=1.1
application/x-java-bean
application/x-java-applet;version=1.2.2
application/x-java-applet;version=1.2.1
application/x-java-applet;version=1.2
application/x-java-applet;version=1.1.2
application/x-java-applet;version=1.1.1
application/x-java-applet;version=1.1
application/x-java-applet
application/x-java-vm
application/x-java-vm/java-applet
|
-
In Navigator, type file:/usr/dt/appconfig/netscape/j2pi/ControlPanel.html in the Netsite field to open the Control Panel. The Control Panel is an applet that uses JPI. Therefore, if the Control Panel opens, the plug-in is successfully
installed.
Setting Environment Variables
With multi-user systems, you set environment variables in each user's environment in one of the following locations:
-
At the command line
-
In a .cshrc file
-
In a .profile file
When to Set Environment Variables
You set environment variables for Java Plug-in in the following situations:
-
You installed Java Plug-in in a location other than the default installation directory (/usr/dt/appconfig/netscape).
-
You installed both Java Plug-in 1.2 and 1.1.2 on your system and want to specify which plug-in to use.
-
You want to use a JRE other than 1.2.1_03.
-
You want to view Java Plug-in tracing information (see "Displaying Java Plug-in Tracing Output").
Setting the Plug-in Path
You use the NPX_PLUGIN_PATH environment variable to specify a non-default location of Java Plug-in, or, if you installed both Java Plug-in 1.2 and
1.1.2 on your system, to specify the plug-in you want to use.
Note -
If you install a plug-in in the same location as Netscape Communicator, Netscape defaults to that plug-in.
Table 2-2 Setting the Plug-in Path
| Shell | Command |
| csh | % setenv NPX_PLUGIN_PATH [path to plug-in]:$NPX_PLUGIN_PATH |
| sh or ksh | % NPX_PLUGIN_PATH=[path to plug-in]:$NPX_PLUGIN_PATH |
| % export NPX_PLUGIN_PATH |
Note -
You must include the directory of the plug-in you want to use as the first directory in the plug-in path.
Setting the Path of a Non-Default JRE
You use the NPX_JRE_PATH environment variable to specify the use of a non-default JRE with Java Plug-in.
Note -
Sun does not support the use of any JRE less than 1.2.1_03 with Java Plug-in 1.2.
Table 2-3 Setting the JRE Path
| Shell | Command |
| csh | % setenv NPX_JRE_PATH [new JRE location] |
| sh or ksh | % NPX_JRE_PATH [new JRE location] |
| % export NPX_JRE_PATH |
Uninstalling Java Plug-in
You uninstall Java Plug-in using the prodreg utility.
Note -
After you uninstall Java Plug-in, you must unset any environment variables. In addition, if you modified any settings
using the Java Plug-in Control Panel, you must delete the ~/.java/properties file.
How to Uninstall Java Plug-in
-
Type su at the prompt to become superuser.
-
Enter the superuser password at the prompt.
-
Type prodreg to open the Prodreg Utility window.
-
Select Java Plug-in 1.2 and click Remove.
-
Click Exit to close the Prodreg Utility window.
Unsetting Environment Variables
If you previously set any environment variables, type the appropriate commands shown in the following table to unset the environment variables.
Table 2-4 Unsetting Environment Variables
| To unset... | Using | Type this command |
| Java Plug-in path | csh | % unsetenv NPX_PLUGIN_PATH |
| sh or ksh | % unset NPX_PLUGIN_PATH |
| JRE path | csh | % unsetenv NPX_JRE_PATH |
| sh or ksh | % unset NPX_JRE_PATH |
| Java Plug-in tracing output (see "Directing Tracing Output to a Terminal Window" ) | csh | % unsetenv JAVA_PLUGIN_TRACE |
| sh or ksh | % unset JAVA_PLUGIN_TRACE |
Deleting ~/.java/properties
If you modified any settings using the Java Plug-in Control Panel, delete the ~/.java/properties file.