Chapter 1 Installation on a SolarisTM
Platform
The steps for installing and starting the Java Dynamic Management Kit in a SolarisTM environment are described in these sections:
Planning Your Installation
Plan your installation to determine where to install the packages supplied
with the product and to ensure that your machine meets the installation requirements.
Upgrading from Previous Versions
If you are upgrading your Java Dynamic Management Kit from versions
3.0 or 3.2, you are not required to uninstall the earlier version. Version 4.0
has different package names and a different installation structure that allows
both old and new versions of the product to co-exist on the same machine.
However, if you are reinstalling version 4.0 of the Java Dynamic Management Kit,
you should first remove your previous installation. This procedure is described
in "Removing or Reinstalling the Java Dynamic Management Kit on a Solaris Platform". Then you may proceed to reinstall the current
version.
Software Packages
The Java Dynamic Management Kit 4.0 is composed of the Solaris software
packages listed in Table 1-1. It is possible to install
only certain packages on a machine, according to your requirements. There
is a version of each package for both the JavaTM 2 and
the JDKTM 1.1 environments.
Table 1-1 Software and Documentation Packages
|
Package Name
|
Package Description
|
|
SUNW1jdrtSUNW2jdrt
|
Contains Java Dynamic Management run-time classes. Install this package on all machines
where you intend to develop or run Java Dynamic Management agents and manager applications.
|
|
SUNW1jdtkSUNW2jdtk
|
Contains the Java Dynamic Management Kit tools (proxygen and mibgen). Install this package on all machines where you intend to
develop Java Dynamic Management agents and manager applications.
|
|
SUNW1jdexSUNW2jdex
|
Contains the Java source code files of the supplied examples. Installing this
package is optional.
|
|
SUNW1jddcSUNW2jddc
|
Contains all documentation for the Java Dynamic Management Kit in HTML format. Installing
this package is optional.
|
Installation Requirements
Hardware Platforms
The Java Dynamic Management Kit runs on Solaris SPARCTM and Intel
platforms and requires a minimum of 32 Mbytes of RAM.
Software
The Java Dynamic Management Kit requires the following software:
Disk Space
The disk space required by the software and documentation packages is
as follows:
|
Package
|
Description
|
Disk Space for JDK 1.1 (Mbytes)
|
Disk Space for Java 2 (Mbytes)
|
|
SUNWxjdrt
| Runtime classes |
0.8
|
0.5
|
|
SUNWxjdtk
| Toolkit classes |
1.0
|
0.8
|
|
SUNWxjdex
| Examples |
0.8
|
0.8
|
|
SUNWxjddc
| Documentation |
6.8
|
5.9
|
| | Total: | 9.4 | 8.0 |
The installation software will compute the size of the packages you
wish to install and warn you if your disk is full.
By default, the packages are installed under the /opt
directory. The packages can be relocated if you choose the Custom installation. However, if you want to change the root
path of the installation database, you must use the pkgadd -R root_path command. For information
about customizing your root path, please refer to the pkgadd(1M) man page.
Installing the Software on a Solaris Platform
These instructions assume that you are already familiar with installing
software products on machines running a Solaris operating environment, and
that you are installing from a local CD-ROM drive.
The installation process uses the Solaris Web Start WizardsTM software to simplify and speed up the installation of packages
on a Solaris platform. The wizard is a Java class that runs in the Java Runtime
Environment, from version 1.1.6 to 1.2.2. Make sure that the java command is in your path before running the installer script.
You must have super-user privileges in order to install the Java Dynamic Management Kit
on a Solaris platform.
Installing the Product Software
-
Insert the product CD-ROM into the CD-ROM drive.
If the Volume Manager (vold) is running on your machine
(the default), then the CD-ROM is mounted automatically under /cdrom/jdmk_4_0 when it is loaded in the drive.
If the Volume Manager (vold) is not running on
your machine, create a directory called /cdrom/jdmk_4_0
and mount the CD-ROM manually (you must be root to do this):
# mkdir -p /cdrom/jdmk_4_0
# mount -rF hsfs CD-RomDeviceName /cdrom/jdmk_4_0
|
CD-RomDeviceName is the directory which represents
the CD-ROM drive on your machine, for example, /dev/dsk/c0t0d0s0.
-
There is a separate installer script for each version of the Java Development
Kit. Type one of the following commands according to the environment in which
you will use the Java Dynamic Management Kit:
JDK 1.1 $ /cdrom/jdmk_4_0/solaris/11/install.sh
|
Java 2 $ /cdrom/jdmk_4_0/solaris/12/install.sh
|
You may perform both installations if you wish, they are placed in distinct
directories.
-
Type the root password for your machine when prompted to do so by the
installer:
Solaris Web Start installer
To use this installer you will need to be the system's root user.
Please enter this system's root user password
Password:
|
This will launch the interactive installer window from which you will
complete the installation. If you encounter problems while using the installer scripts or running the installation wizard, please see "Alternate Installation Procedures" for a workaround.
-
Follow the instructions of the installation wizard to lead you through
the installation.
If you choose the Typical installation, all of the
product packages will be installed in the default location: /opt.
If you choose the Custom installation, you can select
the packages you want to install and specify a different location. Click the "Browse"
button and then choose the path of the new installation directory.
In every case, the installation wizard will automatically create an
uninstallation wizard that can remove the exact configuration that was installed.
See "Removing or Reinstalling the Java Dynamic Management Kit on a Solaris Platform" for details.
-
Once the installation is finished, you may want to view or copy the
documents in the /cdrom/jdmk_4_0/docs directory. See "Printable Documents" for a description of these books. When you are finished,
eject the CD-ROM.
If Volume Manager (vold) is running on your machine,
the CD-ROM is unmounted automatically when it is ejected:
If Volume Manager (vold) is not running on your machine, unmount the
CD-ROM manually before you eject it (you must have super-user privileges to
run the umount command):
# umount /cdrom/jdmk4.0
# eject cdrom
# rmdir /cdrom/jdmk4.0
|
Alternate Installation Procedures
If you cannot launch the installation wizard, you can simply install
the software with the Solaris packages in the same directory. Follow this
procedure once the CD-ROM is mounted. You must also have super-user privileges
to run the pkgadd command.
Installing with pkgadd
-
As root, type the following command to start pkgadd:
# /usr/sbin/pkgadd -d /cdrom/jdmk_4_0/solaris/JDKversion
|
-
Type the numbers corresponding to the packages you want to install.
To install the full Java Dynamic Management Kit, including the documentation, type all to choose all the available packages. The installation program
may prompt you with questions about package dependencies and running installation
scripts. Type y to answer yes to all questions and
complete the installation normally.
-
When the installation is finished, type q to
stop pkgadd.
You can then view the documentation or eject the CD as described in Step 5.
Removing or Reinstalling the Java Dynamic Management Kit on a Solaris Platform
You should remove the existing software packages if you are reinstalling
version 4.0 of the Java Dynamic Management Kit. If you installed the packages
with the installation wizard, there is a Java class file which you can launch
to lead you through the uninstallation procedure.
You must have super-user privileges to remove Solaris packages, so you
must be root when launching the uninstallation wizard.
Running the Uninstallation Wizard
-
Go to the location of the installed software and launch the uninstallation
wizard class:
# cd installDir/SUNWjdmk/jdmk4.0/JDKversion
# java uninstall_jdmk40_solaris_JDKversion
|
You may have to add the current directory (.) to
your classpath to run the wizard class.
-
Choose the type of uninstallation you wish to perform and follow the
instructions.
A Full uninstall will remove all of the Java Dynamic Management Kit
packages that were installed.
A Partial uninstall will let you choose the packages
you wish to remove. You may launch this wizard again to remove the other packages
at a later date.
-
Click the "Details" button on the last screen of the wizard
to make sure the uninstallation is complete. When you are done, exit the wizard.
Upon exiting, the working directory will have been deleted by the uninstallation
process. You will have to change to an absolute directory name. For example:
If you installed the product packages directly with the pkgadd command, you will have to remove them with the pkgrm
command. You must have super-user privileges to remove software packages.
If you have a full installation of the Java Dynamic Management Kit type the following to
remove all of its packages, replacing x with the
Java version number (1 or 2):
# /usr/sbin/pkgrm SUNWxjdtk SUNWxjdrt SUNWxjdex SUNWxjddc
|
If your host machine only has certain packages installed, list only
these on the pkgrm command line. To find out which Java Dynamic Management Kit
packages are already installed on your machine, type:
$ /bin/pkginfo | grep xjd
application SUNWxjddc Java DMK online documentation
application SUNWxjdex Java DMK examples
application SUNWxjdrt Java DMK runtime
application SUNWxjdtk Java DMK tools
|
If you are reinstalling the Java Dynamic Management Kit software, you can now follow
the steps in "Installing the Product Software".
Setting Environment Variables in a Solaris Environment
PATH, CLASSPATH and LD_LIBRARY_PATH
The CLASSPATH environment
variable tells the Java virtual machine where to find the class libraries,
such as the jdmktk.jar file.
The PATH environment variable
specifies the location of executable files, for example, the proxygen tool and the mibgen compiler.
The LD_LIBRARY_PATH environment
variable specifies the location of native libraries, for example, the libstat.so kernel statistics library.
The tools provided in the Java Dynamic Management Kit and the programs that you compile
and run rely on the values in these variables. Modify these environment variables
according to your Java version, as shown in Table 1-2.
Table 1-2 Environment Variables for the Solaris Operating Environment
|
Environment Variable
|
Add
|
|
CLASSPATH
|
installDir/SUNWjdmk/jdmk4.0/1.1/lib/jdmkrt.jar: installDir/SUNWjdmk/jdmk4.0/1.1/lib/jdmktk.jar: installDir/SUNWjdmk/jdmk4.0/1.1/lib/collections.jar
|
|
or
|
installDir/SUNWjdmk/jdmk4.0/1.2/lib/jdmkrt.jar: installDir/SUNWjdmk/jdmk4.0/1.2/lib/jdmktk.jar
|
|
PATH
|
installDir/SUNWjdmk/jdmk4.0/1.1/bin
|
|
or
|
installDir/SUNWjdmk/jdmk4.0/1.2/bin
|
|
LD_LIBRARY_PATH
|
NativeLibraryPath
|