Java set-up page

Getting started with Java - installing the Java "SDK"

Most computers already have the Java "run-time" environment, which allows you to run Java programs. If you're on Windows or Linux, however, you may need to install the "software development kit," or SDK. Here's how to check, whatever your platform:

Setting up Java on the Mac    It's almost certainly there already. To check for sure, open the Terminal application (for example, search for "Terminal" with the Spotlight search at the upper right. At the terminal, type javac -version at the command line. The CS lab Macs are using version 1.6.0_20, though pretty much any moderately version will be fine. We will be concentrating on the core of the language, not the small differences among versions 1.5 and 1.6, for example.

Setting up Java on the PC (Windows)    You might have java, but might _not_ have java development kit (JDK) which includes the compiler. You will need the compiler to run your code! To find out if you have it, look for the folder C:\Program Files\Java\jdk1.6.0_18\ - or some other version, perhaps - the key is that the jdk letters are at the start of the folder name. The jre folder, which stands for java runtime environment can run software, but can not compile it. Thus, you'll need the JDK. If you don't have the JDK and are on a Windows machine, download it from Sun's Java standard edition downloads page. The button Download SDK under the heading Java Platform, Standard Edition will lead you to the download you need.

Working with Java

There are many, many environments in which you might write Java code. Because CS 60 seeks to get at the fundamentals of computation, we welcome you to use any integrated development environment (IDE) you might like. Integrated development environments automate some of the software-development process for you. There are many Java IDEs, some are described at this excellent documentation page: examples include Eclipse, JCreator, Visual Studio, and NetBeans.

In the absence of other factors, you might choose our default setup, which will be the Dr. Java environment. It's not an "industrial-strength" IDE, but it isn't a bad starting point! Regardless of which IDE you use -- please be sure to submit only your plain-text .java source files -- those are the files we will be able to compile and run.

Google will help you find whichever Java IDE you'd like to use -- we'll link Dr. Java's site here:

The DrJava website

If you're running on Windows or Mac OS X, there are Dr. Java downloads for your platform. If you're on Linux, there is a .jar file that will work.