Java Integrated Development Environments

While it is possible to develop and test your Java code using ordinary text editors and comand line tools, you may find it helpful to use a Java Integrated Development Environment (IDE). IDEs offer window-based management of code projects, and often include support not only for editing, but compiling, testing, and debugging your code. Below we offer links related to the Eclipse IDE. It isl free and known to work with Java JDK 1.5 (also called Java 5.0), which is required for CmpSci 187.

Eclipse

Eclipse is a full-featured Java IDE, the largest and most complex of the ones we mention here. It is suited to professional use, but probably more than you want for use in this course. Version 3.1.2 is working for us on WIndows XP. The main downloads page is here. Be warned: the download is 105.9Mb!

Configuring Eclipse to use Java 5.0: In Window > Preferences look at Java > Installed JREs (JRE = Java Run-time Environment). Add JDK 1.5.0 if necessary; you can also check the box to make it the default. To select Java 5.0 for a particular project, go to Project > Preferences > Compiler and set the Compliance Level to 5.0. To use the 1.5.0 JRE to run the project, go to Run > Run... > JRE and set the JRE you want (1.5.0). We have discovered that Version 3.1 is required in order to obtain Java 5.0 language support. Version 3.0.1 and earlier do not support Java 5.0 even if you load the JDK 1.5 and tell Eclipse about it.

Setting the working directory for your program in Eclipse: For your program to find and open files, you may want to adjust the working directory for it, i.e., the directory in which your program runs (quite distinct from where the source code is and where the program is built). In Eclipse you do this by selecting Run... in the Run menu. In the window that you get, click on the Arguments tab. It has a place to set the working directory.