Java Dynamic Management Kit 4.2 Installation Guide and Release Notes

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, 3.2, 4.0, or 4.1, you are not required to uninstall the earlier version. Version 4.2 has a different installation structure that allows both old and new versions of the product to coexist on the same machine.

However, if you are reinstalling version 4.2 of the Java Dynamic Management Kit, you should first remove your previous installation. This procedure is described in "Removing or Reinstalling the Product Software". Then you may proceed to reinstall the current version.

Software Packages

The Java Dynamic Management Kit 4.2 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 Java 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 the Solaris Operating Environment, SPARCTM Platform Edition, and requires a minimum of 64 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

1.0 

0.8 

SUNWxjdtk

 Toolkit classes

1.2 

1.1 

SUNWxjdex

 Examples

1.3 

1.3 

SUNWxjddc

 Documentation

10.5 

9.5 

  Total: 14.0 12.7

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, versions 1.1.8 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
  1. 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_2 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_2 and mount the CD-ROM manually (you must be root to do this):


    # mkdir -p /cdrom/jdmk_4_2
    # mount -rF hsfs CD-RomDeviceName /cdrom/jdmk_4_2
    

    CD-RomDeviceName is the directory which represents the CD-ROM drive on your machine, for example, /dev/dsk/c0t0d0s0.

  2. 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_2/solaris/11/install.sh
    

    Java 2 $ /cdrom/jdmk_4_2/solaris/12/install.sh
    

    You may perform both installations if you wish, they are placed in distinct directories.

  3. 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 Procedure" for a workaround.

  4. 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 Product Software" for details.

  5. Once the installation is finished, you may want to view or copy the documents in the /cdrom/jdmk_4_2/docs directory. These printable documents are not included in the installed packages for space considerations. See "Printable Documents" for a description of the Java Dynamic Management Kit documentation set.

  6. 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:


    $ eject cdrom
    

    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/jdmk_4_2
    # eject cdrom
    # rmdir /cdrom/jdmk_4_2
    

Alternate Installation Procedure

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
  1. As root, type the following command to start pkgadd:


    # /usr/sbin/pkgadd -d /cdrom/jdmk_4_2/solaris/JDKversion
    
  2. 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.

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

You should remove the existing software packages if you are reinstalling version 4.2 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.

The uninstallation wizard can only remove packages added during the previous installation. If packages remain after running the uninstallation wizard, follow the procedure in "Uninstalling with pkgrm".


Note -

You must have super-user privileges to remove Solaris packages, so you must be root when launching the uninstallation wizard.


Running the Uninstallation Wizard
  1. Go to the location of the installed software and launch the uninstallation wizard class:


    # cd installDir/SUNWjdmk/jdmk4.2/JDKversion
    # java uninstall_jdmk42_solaris_JDKversion
    

    You may need to add the current directory (.) to your classpath in order to run the wizard class.

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

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


    # cd installDir
    

If you installed the product packages directly with the pkgadd command, you will have to remove them with the pkgrm command.

Uninstalling with pkgrm
  1. To find out which Java Dynamic Management Kit packages are installed on your machine, type the following command, where x is the major Java version number, either 1 or 2:


    $ /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
  2. You must have super-user privileges to remove software packages. Call the pkgrm command with the name of the installed packages to remove them. For example, if you have a full installation of the Java Dynamic Management Kit, enter the following command, where x is either 1 or 2:


    #	/usr/sbin/pkgrm SUNWxjdtk SUNWxjdrt SUNWxjdex SUNWxjddc
    

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.

If needed, 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.2/1.1/lib/jdmkrt.jar: installDir/SUNWjdmk/jdmk4.2/1.1/lib/jdmktk.jar: installDir/SUNWjdmk/jdmk4.2/1.1/lib/collections.jar

or 

installDir/SUNWjdmk/jdmk4.2/1.2/lib/jdmkrt.jar: installDir/SUNWjdmk/jdmk4.2/1.2/lib/jdmktk.jar

PATH

installDir/SUNWjdmk/jdmk4.2/1.1/bin

or 

installDir/SUNWjdmk/jdmk4.2/1.2/bin

LD_LIBRARY_PATH

NativeLibraryPath