Downloading The Java Compiler

In order to get a Java development environment set up on your machine you will have to complete the following steps:

 

  • Download a large file containing the Java development environment (the compiler and other tools).
  • Download a large file containing the Java documentation.
  • If you do not already have WinZip (or an equivalent) on your machine, you will need to download a large file containing WinZip and install it.
  • Install the Java development environment.
  • Install the documentation.
  • Adjust several environment variables.
  • Test everything out.

Before getting started, it would make things easier if you create a new directory in your temp directory to hold the files we are about to download. We will call this the download directory.

 

Step 1 – Download the Java development environment

Go to the page http://java.sun.com/j2se/1.4.2/download.html. Download the SDK software by clicking on the “Download J2SE SDK” link. You will be shown a licensing agreement. Click Accept. Select your operating system and download the file to your download directory. This is a huge file, and it will take several hours to download over a normal phone-line modem. The next two files are also large.

Step 2 – Download the Java documentation

Download the documentation by selecting your operating system and clicking the SDK 1.4.1 documentation link.

Step 3 – Download and install WinZip

If you do not have a version of WinZip or an equivalent on your machine, go to the page http://www.winzip.com/ and download an evaluation copy of WinZip. Run the EXE you get to install it. We will use it in a moment to install the documentation.

Step 4 – Install the development kit

Run the j2sdk-1_4_1-*.exe file that you downloaded in step 1. It will unpack and install the development kit automatically.

Step 5 – Install the documentation

Read the installation instructions for the documentation. They will instruct you to move the documentation file to same directory as that containing the development kit you just installed. Unzip the documentation and it will drop into the proper place.

Step 6 – Adjust your environment

 

Windows 8

  • Drag the Mouse pointer to the Right bottom corner of the screen
  • Click on the Search icon and type: Control Panel
  • Click on -> Control Panel -> System -> Advanced
  • Click on Environment Variables, under System Variables, find PATH, and click on it.
  • In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the class as the value.
  • Close the window.
  • Reopen Command prompt window, and run your java code.

 

Windows 7

 

  • Select Computer from the Start menu
  • Choose System Properties from the context menu
  • Click Advanced system settings > Advanced tab
  • Click on Environment Variables, under System Variables, find PATH, and click on it.
  • In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the class as the value.
  • Reopen Command prompt window, and run your java code.

 

Windows XP

  • Start -> Control Panel -> System -> Advanced
  • Click on Environment Variables, under System Variables, find PATH, and click on it.
  • In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the class as the value.
  • Close the window.
  • Reopen Command prompt window, and run your java code.

 

Windows Vista

 

  • Right click My Computer icon
  • Choose Properties from the context menu
  • Click Advanced tab (Advanced system settings link in Vista)
  • In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the class as the value.
  • Reopen Command prompt window, and run your java code.

 

Step 7 – Test

Now you should be able to open another MS-DOS window and type javac. If everything is set up properly, then you should see a two-line blob of text come out that tells you how to use javac. That means you are ready to go. If you see the message “Bad Command or File Name” it means you are not ready to go. Figure out what you did wrong by rereading the installation instructions. Make sure the PATH is set properly and working. Go back and reread the Programmer’s Creed above and be persistent until the problem is resolved.

 

 
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s