Installing the SDK 1.3SE

   

Installing the Java SDK 1.3SE is different for each platform. Make sure you select the installation instructions for the platform you are installing the SDK on.

Installing the SDK for Windows

The SDK installation for the Windows platform is consists of running the self-installing executable to unpack and install the SDK onto your computer. If you downloaded the Windows installation multiple install files, read this next section carefully . If you have a single executable file, jump to "Starting the Windows Installation."

Concatenating the Multiple Installation Files

Because the files are split into multiple installation files, you need to rebuild these files back into a single Windows executable. To do this, you will have to use the copy command on DOS or the cp command on Unix. If you type copy /? at a DOS command line, you can get all the options for the copy command.

You will be copying or appending all the small single installation files into one large executable file. Here is the command:

 c:\> copy /b j2sdk1_3_0-win-a.exe + j2sdk1_3_0-win-b.exe + j2sdk1_3_0-win-c.exe + j2sdk1_3_0-win-d.exe + j2sdk1_3_0-win-e.exe + j2sdk1_3_0-win-f.exe + j2sdk1_3_0-win-g.exe + j2sdk1_3_0-win-h.exe + j2sdk1_3_0-win-i.exe + j2sdk1_3_0-win-j.exe + j2sdk1_3_0-win-k.exe + j2sdk1_3_0-win-l.exe + j2sdk1_3_0-win-m.exe + j2sdk1_3_0-win-n.exe + j2sdk1_3_0-win-o.exe + j2sdk1_3_0-win-p.exe + j2sdk1_3_0-win-q.exe + j2sdk1_3_0-win-r.exe + j2sdk1_3_0-win-s.exe + j2sdk1_3_0-win-t.exe + j2sdk1_3_0-win-u.exe + j2sdk1_3_0-win-v.exe + j2sdk1_3_0-win-w.exe j2sdk1_3_0-win.exe 

The /b in the first line informs the copy command that you are dealing with binary files. The + is the appending option. This is all just a single command. The problem is that all this might not fit in your DOS command window. You can copy all this into a batch file and then execute the batch file. You can also copy a few files into a temp file and then copy all the temp files together.

You should first try to copy all this from a DOS shell and see if it will allow you type this much. Of course, if you misspell a line, it's hard to fix it and go back. You can turn on doskey by typing doskey from a DOS shell. This will allow you to repeat commands by using the up- and down arrows. Using the arrows brings up the previous commands that were typed. This only works while that DOS shell is opened. If you want it to last across sessions, put it into your autoexec.bat file.

After you have copied all the smaller files into a single executable file, go on to the next section, "Starting the Windows Installation."

Starting the Windows Installation

Before you run the self-installing executable, first make sure that the size of file is correct. It could have been corrupted while downloading or if you had to append the smaller files into a single executable, you could have had a problem or missed a file. Change to the directory where you downloaded or created the single large installation executable file. Type DIR in that directory and look at the size of the file. Among other potential files, you should see the following file and size:

 j2sdk1_3_0-win.exe  30,916,766 bytes 

If the file size is different, there might be a problem, and you need to either perform the download again, or if you copied the smaller files into a large one, perform the copy operation again.

If you don't see the file, find the directory where you downloaded or copied the large file.

If the file size is correct, start the self-installing executable by double-clicking the file or using Start, Run.

The Java splash screen appears and starts unpacking the files. Click the Next button and then accept the license agreement. The next screen asks you for a destination directory. It's best just to accept the default location, which is c:\ jdk1.3 . This will help the document installation process and improve consistency among your development. If you are running other versions of the SDK, this will also help identify which version is where.

After you accept the destination directory or specify a new one, the files are copied onto your computer. At the end of the installation, the install program might ask permission to reboot your computer so that changes to the reg database can take effect. These changes mostly deal with setting up the uninstall in case you need to uninstall the SDK later.

The directory tree for the SDK should be similar to this assuming you accepted the default installation directory of jdk1.3. Only the top level of the tree is shown in the following code sample:

 C:\jdk1.3>dir  Volume in drive C has no label  Volume Serial Number is 07D0-0606  Directory of C:\jdk1.3 .              <DIR>        07-19-00 11:04p . ..             <DIR>        07-19-00 11:04p .. UNINST   ISU       112,684  07-19-00 11:05p Uninst.isu BIN            <DIR>        07-19-00 11:04p bin README   TXT         5,063  06-02-00  1:10p README.txt LICENSE             10,637  06-02-00  1:10p LICENSE COPYRI~1               945  06-02-00  1:10p COPYRIGHT README~1 HTM        18,374  06-02-00  1:10p readme.html JRE            <DIR>        07-19-00 11:04p jre LIB            <DIR>        07-19-00 11:04p lib INCLUDE        <DIR>        07-19-00 11:04p include INCLUD~1       <DIR>        07-19-00 11:04p include-old DEMO           <DIR>        07-19-00 11:04p demo SRC      JAR    19,565,690  06-02-00  1:11p src.jar DOCS           <DIR>        07-19-00 11:16p docs          6 file(s)     19,713,393 bytes          9 dir(s)       22,191.14 MB free C:\jdk1.3> 

Note

Remember, the previous directory shows the docs directory. This is not installed by the SDK installer. The docs installation is a separate download and should be installed in the base directory of the SDK.


Throughout this appendix, the term <JAVA_HOME> refers to the base directory for the SDK installation. In the previous directory tree, this would be the drive letter and the jdk1.3 directory. So for example, if the previous directory tree was installed on your c drive, your <JAVA_HOME> would be:

 C:\ jdk1.3 

After the computer reboots, go to the "Testing the Java Compiler and JVM" section later in this chapter to ensure that the SDK installation is correct.

See "Testing the Java Compiler and JVM,"

Installing the SDK for Solaris

Installing the SDK 1.3SE is a little more difficult than the Windows installation. Actually, this really depends on which platform you are more comfortable with, which is probably Solaris for you because you are reading this section. The truth is that it isn't that much more difficult; it's just not as GUI friendly as the Windows self-installing executable.

Probably the most important thing to do before installing the SDK 1.3SE is to make sure you have all the necessary Solaris patches for your particular version of Solaris. This list and the patches themselves can usually be found at the following Web address:

http://developer.java.sun.com/developer/earlyAccess/j2sdk13/install-patches.html

If for some reason this address changes, go to the main Sun site at http://www.sun.com and follow the links to the particular Solaris operating system that you are using. assume for these instructions that all the required patches have been applied to the operating system.

There are two installation formats available for Solaris:

  • A self-extracting binary file

  • A .tar.Z file

The self-extracting file allows a user to specify to which directory the SDK is installed. This would probably be good if you were the only one using the SDK. You have the flexibility to put it into a local directory. This also might be a good idea if you are evaluating the SDK 1.3SE and don't want to give everyone access to it until a later time.

The .tar.Z file contains Solaris packages that can be installed with the standard pkgadd utility. Normally this has to be done by someone with root privilege, so if you are not root or are not able to get root privilege, this option is probably not available to you and you should choose the first installation format.

Caution

The SDK 1.3SE for the Solaris platform is packaged to be the default Java installation. It will overwrite previous installations of Java and make them unavailable for users. If you don't want to overwrite the previous version of Java installed, either use the self-extracting format or specify the “R option on the pkgadd utility to specify a non-default directory.


Using the Self-Extracting Installation Format

Follow these steps to use the self-extracting installation feature:

  1. As with any download, first check the file size before installing to make sure that the download file was not corrupted. The file sizes should be

    Filename File Size
    j2sdk1_3_0beta_refresh-solsparc.bin 24,871,111 bytes
    j2sdk1_3_0beta_refresh-solx86.bin 23,241,953 bytes

    If the file sizes are different, try downloading the files again to ensure that they were not corrupted somehow during the download process.

  2. Make sure the binary file has execute permissions. For either the Sparc or Intel platform, use the chmod command by executing the command

     hmod +x <filename> 

    substituting in the correct filename.

  3. Change to the directory where you want the SDK to be installed.

  4. Run the binary self-extracting file by typing the name of the file. The name of the directory will probably be something like j2sdk1_3_0beta_refresh , but it can be renamed to anything you like after installation is completed. However, you should probably use a standard naming convention, such as SDK 1.3SE, so you will be able to quickly determine which version of the SDK is installed where.

Using the .tar.Z Installation Format

Use the following steps to install the SDK using the .tar.Z format:

  1. As mentioned previously, check the size of the file that you downloaded.

    Filename File Size
    j2sdk1_3_0beta_refresh-solsparc.tar.Z 35495284 bytes
    j2sdk1_3_0beta_refresh-solx86.tar.Z 33291889 bytes
  2. After you are comfortable that the download was not corrupted and you have the correct file size, extract the contents of the compressed tar file by typing the following:

     cat <filename>.tar.Z  tar -xf 

    Substitute the correct filename depending on your platform.

    This should create four packages ( SUNWj2dem , SUNWj2dev , SUNWj2man , and SUNWj2rt ) along with some other files such as the product license, README , and release documentation.

  3. Become root by executing a su command or logging in as root from the shell.

  4. Execute the pkgadd command. This should look something like this:

     # pkgadd -d . SUNWj2rt SUNWj2dev SUNWj2man SUNWj2dem 

This will install the SDK into the /usr/java1.3 directory. You can now remove all the tar files and extracted directories. Exit the root shell and test the installation.

Installing the JDK for Linux

As with the Windows installation, you have the option of downloading small pieces of the installation in sizes of 1.44MB or less and then concatenating the small files into a single large file or you can download one large installation file. This option is to support users who don't have access to superfast Internet connections and might have to split up the download over several download sessions or connections.

There are also two installation formats as in the Solaris installation; however, Linux installation formats are different. For Linux, the two installation formats are

  • A self-extracting binary file

  • RPM file for RedHat

Determine which format you want to use. Either will work, but if you are using RedHat, you should probably choose that format. Remember to check the file sizes before starting installation. This is especially important if you downloaded the smaller files and then rejoined them.

If you download the smaller files, you need to concatenate the files into a single large file by using the cat command. Either download all the smaller files into the same directory or move them to the same directory after you finish downloading them. After you have all the smaller files downloaded, change to the directory where the multiple smaller files reside. Then, use cat to concatenate the files together like this:

 cat j2sdk-1_3_0-beta_refresh-linux-* > j2sdk-1_3_0-beta_refresh-linux.tar.gz 

Or you can use this command for the RPM format:

 cat j2sdk-1_3_0-beta_refresh-linux-* > j2sdk-1_3_0-beta_refresh-linux.rpm 

Be sure you end the filename with the .tar.gz extension or the .rpm extension, depending on which format you downloaded.

Using the Self-Extracting Installation Format

Follow these steps to use the self-extracting installation:

  1. Change to the directory in which you want to install Java 1.3SE. If you plan to install it in a place for all users to access it, remember that you must first become root. Other-wise, change to a local directory where you have write permissions. The installation will create a directory called jdk1.3 in the directory you select, so make sure to rename any directory that might be present with the same name. Otherwise it will be overwritten.

  2. Extract the contents of the files using the following two utilities:

     % gunzip j2sdk-1_3_0-beta_refresh-linux.tar.gz % tar xvf j2sdk-1_3_0-beta_refresh-linux.tar 
  3. You can now delete the self-extracting installation file if you want, but it might be a good idea to place it somewhere in case you need to reinstall it.

Using the RPM Installation Format

If you need to concatenate the smaller files into the large single installation file, make sure you have already done that by following the previous instructions. Then, follow these steps to use the RPM installation:

  1. Become root by executing the su command or by logging in as root in a shell.

  2. Run the RPM command to install the packages. You can do this by executing the following command:

     % rpm -iv j2sdk-1_3_0-beta_refresh-linux.rpm 
  3. Exit the root shell.

   


Special Edition Using Java 2 Standard Edition
Special Edition Using Java 2, Standard Edition (Special Edition Using...)
ISBN: 0789724685
EAN: 2147483647
Year: 1999
Pages: 353

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net