kinetic Resources logo  
  MOREnet logo
kinetic Home | kinetic Manager | E-mail Services | Web Site Management | USENET News | Modem Pools
 Home >  Web Site Management >  Java Application Server >  Local Development > Installing the Java 2 SDK 1.3.1 Standard Edition for Local Development
     
Local Development  
     
  Overview  
     
  Apache Web Server  
  Java 2 SDK  
  MySQL Database  
  Tomcat Application Server  
     

View the printer friendly version of this document

Installing the Java 2 SDK 1.3.1 Standard Edition for Local Development

For: All Windows Versions

Revised: June 20, 2003

Important: The Java application server and MySQL database are not included as part of the kinetic Service annual fee. These technologies are available on an as-requested basis for an additional fee. Contact David Drum at david@more.net or (800) 509-6673 for additional information.

Contents

Overview

This document details how to install the Java 2 SDK for web application development. These instructions are provided as a service to customers of MOREnet for creating a development environment that closely matches MOREnet production servers. If you are not a customer of MOREnet, you should visit the official Java web site for instructions.

Requirements

  • A Windows system with approximately 170 MB of free space for the installed SDK and documentation.

Download the Documentation and Software

Follow these steps:

  1. Visit Sun Microsystem's Java 2 Platform Standard Edition Download page at http://java.sun.com/j2se/1.3/download.html.
  2. Scroll down to the heading "J2SE v1.3.1 Documentation" and click the Download link. The Java 2 SDK, Standard Edition Documentation page displays.
  3. Scroll down to the heading "Download Java 2 SDK 1.3.1 Docs - HTML Format" and then click the Continue button.
  4. The "Terms and Conditions of License" page displays. You should see "Terms and Conditions of the License & Export for Java(TM) 2 SDK, Standard Edition, Documentation 1.3.1" at the top of the page. Read the license and then click Accept at the bottom of the page.
  5. Click a button to select one of the sites and begin the download. A page displays with the title "Download Java(TM) 2 SDK, Standard Edition, Documentation 1.3.1". Below the title it displays "The download size of the file j2sdk-1_3_1-doc.zip = " and a list of buttons. Click a button to begin the download. Any will do, although the HTTP download (at the bottom) usually works best from your web browser if you are downloading from behind a firewall.
  6. The documentation file you are downloading is j2sdk-1_3_1-doc.zip. Save it to the root of the hard drive where you intend to install the Java 2 SDK.
  7. When the documentation download is finished, return to the Java download page at http://java.sun.com/j2se/1.3/download.html.
  8. Review the page for the "Download J2SE v 1.3.1_xx" heading, where xx is the version number. This is typically the first section on this page.
  9. Click on the download link in the row titled "Windows (all languages)" and in the column titled "SDK".
  10. The "Terms and Conditions of License" page displays. Review the conditions and then click Accept.
  11. A page displays with the title "Download Java(TM) 2 SDK, Standard Edition 1.3.1". Below the title it displays "You have chosen to download Java 2 SDK, Standard Edition 1.3.1_xx" and "The download size of the file j2sdk1_3_1_xx-win.exe = < a number > ". Click a button to begin the download. Any will do, although the HTTP download button (at the bottom) usually works best from your web browser if you are downloading from behind a firewall.
  12. Save the file to a temporary location on your hard drive.

Installing the Documentation and Software

  1. Use Windows Explorer to view your computer's file system. Double-click the j2sdk-1_3_1_xx-win.exe file that you downloaded in the previous section. This is an installation package that will extract itself and run the Java 2 SDK Installer.
  2. Click Next when the welcome screen of the SDK installer displays.
  3. Review the license agreement and click Yes.
  4. When the "Choose Destination Location" window displays, click Next.
  5. When the "Select Components" sub-window displays, all components will be checked by default. If this is the first time you've installed the Java 2 SDK, it is recommended that you install all the components. Click Next.

    Note: The "Java 2 Runtime Environment" is included in the SDK download, which is why you did not need to download it separately.

  6. When the installation is complete, you can check the View the ReadMe option if you desire. Otherwise, click Finish.
  7. Use an unzip program such as WinZip to unzip the document file j2sdk-1_3_1-doc.zip that you downloaded in the previous section. Unzip the files into the directory where you installed the Java SDK. If your unzipping program has options to maintain the directory structure of the unzipped files, make sure that it is set to maintain them. This is a large zip file and it will take a while depending on your systems speed. When it is done, you will see that a jdk1.3.1_{xx}\docs directory has been created where {xx} is the release number of the installed SDK.

The installation of the SDK and documentation is complete.

Preparing the SDK

You must add the path to the SDK's java compiler (javac.exe) and set the JAVA_HOME environment variable. Follow the directions below.

Adding JAVA to your Path Environment Variable

You must set the path to the SDK's Java compiler (javac.exe) in the PATH environment variable so that other applications can find the Java compiler. This process is dependent on your operating system. Follow the directions below that are appropriate for your system.

Windows NT, Windows 2000, and Windows XP

  1. Click Start, Settings, Control Panel.
  2. Double-click the System icon.
  3. Click the Environment tab. In Windows 2000, click the Advanced tab and then click the Environment Variables button.
  4. In the System Variables list, scroll down until you find Path.
  5. Click Path to highlight it.
  6. In Windows NT, you will see two fields labeled Variable and Value toward the bottom of the Environment window. Click once on the Value field to place your cursor within it. In Windows 2000, click Edit and and then click once in the Variable Value field.
  7. Use the arrow keys to move your cursor to the end of the line.
  8. Add a semicolon at the end of the line unless one already exists.
  9. At the end of the line, type the path to the SDK executable. For example, if you installed the 1.3.1_03 SDK to the "C" drive, you would type C:\jdk1.3.1_03\bin at the end of the line.
  10. In Windows NT, click Set. In Windows 2000, click OK.
  11. Scroll through the System Variables list until you find CLASSPATH. If you do not find CLASSPATH in the list, click OK and close the Control Panel; proceed to the next section of instructions.
  12. If you find CLASSPATH in the list, click on it to highlight it.
  13. Review the Variable field and ensure that "\." (a backslash with a period) is somewhere in the line. If it is not, type ;\. (semicolon, backslash, period) at the end of the line and click Set.
  14. Click OK and close the Control Panel.

Windows 95, Windows 98, and Windows ME

  1. Click on Start, Run.
  2. In the Run window, type sysedit and click OK.
  3. In the autoexec.bat window, find the line with PATH at the beginning of it.
  4. If the PATH line is in the autoexec.bat file, add a semi-colon to the end of the line, followed by the path to the SDK. In the example below, the {xx} must be replaced with the version that was saved in the path of the installation.

    Example:
    PATH=C:\windows;C:\windows\command
    ...would become...
    PATH=C:\windows;C:\windows\command;C:\jdk1.3.1_{xx}\bin
  5. If the PATH line is not in the autoexec.bat file, add it. Note that you must change the drive letter to the drive where you installed the SDK and replace {xx} with the version that was saved in the path of the installation.

    Example - If you installed version 1.3.1_03 to the 'C' drive, you would have the following:
    PATH=C:\jdk1.3.1_03\bin
  6. Next, look for a line that begins with CLASSPATH. If you do not find CLASSPATH listed, skip the next step.
  7. If you find CLASSPATH listed, review it and make sure that "\." (a backslash followed by a period, without the quotes) is not in the line. If it is, remove the "\." from the line.
  8. Click on File, and then Save, then exit sysedit.

Setting the JAVA_HOME Environment Variable

You must add the JAVA_HOME environment variable to your system. This variable should point to the directory where you installed the Java 2 SDK. The process is dependent on your operating system. Follow the directions below that are appropriate for you system.

Windows NT, Windows 2000, and Windows XP

  1. Click Start, Settings, Control Panel and then double-click System.
  2. In Windows NT, select the Environment tab. In Windows 2000 and Windows XP, click the Advanced tab and then click Environment Variables.
  3. In the System Variables list, scroll down until you find JAVA_HOME. It may not exist if you have not set this variable in the past.
  4. If JAVA_HOME exists, click it to highlight it. In Windows NT, you will see two fields labeled Variable and Value toward the bottom of the Environment window. Click once on the Value field to place your cursor within it. In Windows 2000, click Edit and and then click once in the Variable Value field. Review its value and ensure that it is set to the pathname where you installed the Java 2 SDK. For example, if you installed the SDK to C:\jdk1.3.1_07, then specify that value for the environment variable.

    If JAVA_HOME does not exist, add it to the list. In Windows NT, type JAVA_HOME in the Variable field, type the pathname in the Value field, and then click Set. In Windows 2000 and XP, click New..., type JAVA_HOME in the Variable field, type the pathname in the Value field, and then click OK.

Windows 95, Windows 98, and Windows ME

  1. Click Start, Run.
  2. In the Run window, type sysedit and click OK.
  3. In the autoexec.bat sub-window, add a line like the following where you replace {path to Java 2 SDK} with the actual pathname:

    set JAVA_HOME={path to Java 2 SDK}

    For example, if you installed the SDK to C:\jdk1.3.1_07, then replace {path to Java 2 SDK} with that value. If this line already exists in this file, ensure that it is set to the correct value for your Java SDK installation.
  4. Click on File, and then Save, then exit sysedit.

Testing the SDK Installation

An AppletViewer is included with the SDK installation. You can use the AppletViewer to test your installation of the Java 2 SDK. In this example you'll use it to play a TicTacToe game against the computer.

  1. Open an MS-DOS Command Prompt window.
  2. Change to the drive where you installed the SDK. For example, type c: and press ENTER.
  3. Use the cd command to change to the TicTacToe directory. For example, if you installed the 1.3.1_03 SDK, you would type cd \jdk1.3.1_03\demo\applets\TicTacToe and press ENTER.
  4. Run the AppletViewer to display the example1.html file. Type appletviewer example1.html and press ENTER. If the SDK installed properly, the TicTacToe game will appear.

    Note: You may see "Warning: Can’t read AppletViewer Properties file:" if you installed to a drive other than the "C" drive. This is okay since the AppletViewer has its own default properties it will use.

  5. When you're done, close the AppletViewer window.
  6. In the MS-DOS Command Prompt window, type exit and press ENTER.

Installing the Java SDK Extensions

There are a number of Java standard extensions provided by Sun that are needed. Extensions can be added very easily to the SDK by placing them in the SDK's extensions directory. These extensions then become available to all your Java programs. Note that MOREnet recommends that only the SDK Extensions listed below be added to the SDK's extension library.

JavaBeans Activation Framework (JAF)

  1. In your web browser, go to Sun's Java download page at http://java.sun.com/products/javabeans/glasgow/jaf.html for JAF.
  2. Read this page to get an overview of JAF.
  3. Toward the bottom of the page, click on the Continue button.
  4. The "Terms and Conditions of the License" page displays. Click on the Accept button.
  5. The next web page displays "Download JavaBeans Activation Framework 1.0.1". You will also see a line that indicates "The download size of the file jaf1_0_1.zip = <a number>" above a list of buttons. From this page, select one of the sites for downloading. Any will do, although the HTTP download (at the bottom) usually works best from your web browser. Click on it to begin the download.
  6. Save the .zip file to a directory of your choice.
  7. Use an unzip program such as WinZip or PKZip to unzip the file. If your unzipping program has options to maintain the directory structure of the unzipped files, make sure that it is set to maintain them.
  8. Once unzipped, you will see that a jaf-1.0.1 directory has been created. Open this folder.
  9. Locate the activation.jar file. Copy this file to the SDK Extensions directory: \jdk1.3.1_{xx}\jre\lib\ext where {xx} is the version of the SDK that you installed.
  10. The jaf-1.0.1 directory contains demo and docs directories. These directories and their contents are not required. You can delete the jaf-1.0.1 directory to reclaim disk space.

JDBC 2.0 Standard Extension API

  1. In your web browser, visit Sun's download page at http://java.sun.com/products/jdbc/download.html#spec for the JDBC 2.0 Standard Extension API. Note that this is also called the "JDBC 2.0 Optional Package API".
  2. You should see a heading titled "JDBC 2.0 Optional Package" at the top of your browser window. You can view the documentation in various formats in the first section in either postscript or PDF format. The second section (box) contains the Continue button to download a zipped version of the javadocs for the package.
  3. Scroll down to the fourth section (box) labeled "JDBC 2.0 Optional Package Binary". Click on the Continue button.
  4. The "Terms and Conditions of the License" page displays. Click on the Accept button.
  5. The next web page displays "Download JDBC Standard Extension Binary 2.0". You will also see a line that indicates "The download size of the file jdbc2_0-stdext.jar = <a number>" above a list of buttons. From this page, select one of the sites to download from. Any will do, although the HTTP download (at the bottom) usually works best from your web browser. Click on it to begin the download.
  6. Save the .jar file to the SDK Extensions directory: \jdk1.3.1_{xx}\jre\lib\ext where {xx} is the version of the SDK that you installed.

JavaMail Standard Extension API

  1. In your web browser, go to Sun's download page at http://java.sun.com/products/javamail/ for the JavaMail 1.2 Standard Extension API.
  2. Read the top of this page to get an overview of the JavaMail API. (There is additional documentation on this page you may be interested in reading or downloading).
  3. Click on the Continue button just underneath the heading "Download JavaMail API Implementation 1.2".
  4. The "Terms and Conditions of the License" page displays. Scroll down and click on the Accept button.
  5. The next web page displays "Download JavaMail 1.2". You will also see a line that indicates "The download size of the file javamail-1_2.zip = <a number>" above a list of buttons. From this page, select one of the sites to download from. Any will do, although the HTTP download (at the bottom) usually works best from your web browser. Click on it to begin the download.
  6. Save this file to a directory of your choice.
  7. Use an unzip program such as WinZip to unzip the javamail-1_2.zip file. If your unzipping program has options to maintain the directory structure of the unzipped files, make sure that it is set to maintain them.
  8. Once unzipped, you will see that a javamail-1.2 directory has been created. Open this folder.
  9. Locate the mail.jar file in this directory. Save the .jar file to the SDK Extensions directory: \jdk1.3.1_{xx}\jre\lib\ext where {xx} is the version of the SDK that you installed.
  10. The javamail-1.2 directory contains demo and docs directories plus additional .jar files. These directories and their contents are not required. You can delete the javamail-1.2 directory to reclaim disk space.

Java Transaction Standard Extension API

  1. In your web browser, go to Sun's download page at http://java.sun.com/products/jta/ for the Java Transaction 1.0.1 Standard Extension API.
  2. Read the top of this page to get an overview of the Transaction API.
  3. Click on the Continue button just underneath the bulleted sub-heading "JTA interfaces, specification and javadoc files:".
  4. The "Terms and Conditions of the License" page displays. Click on the Accept button.
  5. The next web page displays "Download Java Transaction API Specification 1.0.1". You will also see a line that indicates "The download size of the file jta-spec1_0_1.zip = < a number>" above a list of buttons. From this page, select one of the sites to download from. Any will do, although the HTTP download (at the bottom) usually works best from your web browser. Click on it to begin the download.
  6. Save this .zip file to a directory of your choice.
  7. Use an unzip program such as WinZip to unzip the .zip file. If your unzipping program has options to maintain the directory structure of the unzipped files, make sure that it is set to maintain them.
  8. Once unzipped, you will see that a jta-spec1_0_1 directory has been created. Open this folder.
  9. Locate the jta-spec1_0_1.jar file. Copy this file to the SDK Extensions directory: \jdk1.3.1_{xx}\jre\lib\ext where {xx} is the version of the SDK that you installed.
  10. The jta-spec1_0_1 directory and its contents are not required. You can delete the jta-spec1_0_1 directory to reclaim disk space.