COP2253

Getting Started With the
Java Programming Environment on your PC

The Java runtime environment is installed on all the machines in the SAIL lab in building 79. The machines also have the jGRASP development environment installed. You can use the jGRASP environment to develop, compile, and run your Java programs. Simply start the jGRASP application from the Start - Programs menu.

To install and use the Java environment on your PC at home, follow the following instructions:
  1. First, you must install the Java Development Kit (JDK); this includes the Java run-time environment. Go to Sun's Java web page (http://java.sun.com). Follow the Downloads link. Find and download the most recent version of the Java Development Kit, Standard Edition (JDK 5.0 SE, latest update) for Windows (or your platform). Follow the installation instructions. Do not download the JRE (Java Runtime Environment), as it comes with the JDK. Download the latest stable version; not a beta version. When installing, pay careful attention where the Java files are installed. The default directory is fine, or you can install it in another directory. For example, c:\programs\java. Remember which directory you choose, you will need it for the next step.

    It is also a good idea to download the J2SE Documentation, which is available further down on the same page.

    NOTE: After installing the Java SDK, you need to set your PATH so that you can compile and run programs. Specifically, you need to add the directory of the Java compiler and interpreter to the PATH. That directory is the bin subdirectory of the Java installation directory, such as c:\programs\java\bin.

    The way to set the path depends on your operating system - see the Java installation instructions for more info. For example, for Windows XP, right-click on the "My Computer" icon to bring up the System Properties. Go to the "Advanced" tab and click on "Environment Variables." Under "System Variables," select PATH and click "Edit." At the end of the "Variable value:" field, add a semicolon (;) and then add the path to your Java bin directory. For example, if you current PATH value is c:\WINDOWS\system32 and you installed Java in c:\program files\java, then you would update the PATH to be: c:\WINDOWS\system32;c:\program files\java\bin.

    Save all the changes. You may need to restart your machine for the changes to take effect.

     

  2. After you have installed the Java SDK, you may download and install jGRASP, an integrated development environment. Go to the jGRASP site (http://www.jgrasp.org) , click on Download, then on Click here to Download. After you fill out your information, download and install the latest, non-beta, version of jGRASP. Do not download any version bundled with JRE.

The companion website for the Horstmann textbook (http://www.horstmann.com/bigjava.html) has many useful resources including:
  • Source code for all sample programs,
  • Lecture slides,
  • Programming style guide,
  • List of typos and bugs in the textbook.