Aqua Phoenix
     >>  Lectures >>  Java 1  
 

Navigator
   
 
       
   

1.3 Setup and Use

Java is fairly simple to set up in comparison to some other programming languages. Moreover, there are no costs associated to obtaining and using it.

To get started, download the latest release from http://java.sun.com Currently, the latest version is J2SE 1.5.0: http://java.sun.com/j2se/1.5.0/download.jsp The web site is somewhat confusing - locate the link "Download JDK 5.0 Update 4" for the full package. On the next page, you will have to select the Operating System on which you will install J2SE.

Once downloaded and installed, you should be able to use the Java compiler and Runtime Environment.

Java is also installed on the Columbia UNIX (CUNIX) machines. Whether you install Java on your own computer, or use Cunix for your homework assignments is up to you.

To use Java, you will make use of a text editor and a Terminal (UNIX, Mac) or Command Line (Windows). The text editor can be as simple as Notepad or Emacs - pick whatever you are most comfortable with. Development tends to go through the following stages in many, many steps:

  1. Create new (empty) Java file and save it
  2. Put some code into Java file
  3. Save Java file
  4. Go to the Terminal or Prompt
  5. Compile Java File
  6. If error occur, go back to (2) and fix the error, otherwise:
  7. Run Java program
  8. Inspect what you've just created, and if you're done then you're done, otherwise:
  9. Go back to (2) and modify your code to implement something new

If you are using Cunix for all of your development, I suggest opening several Terminals and writing code in one or more of them, and compiling and testing in another.