Java and Eclipse setup

To program in Java you need two things: the Java Development Kit (JDK), and a source code editor (instructions follow). If you run into difficulty, we can help you during the first class. The Java Development Kit contains all the tools needed to compile and run programs in Java. The source code editor is where you will write programs, and often has features to make this easier, such as syntax highlighting. For this course, you can use any tool you like, but we recommend Eclipse.

Simple Source Code Editors

Editors can be simple source code editors, or complex integrated development environments. For this course, we recommend using the Eclipse Integrated Development Environment (IDE) (but it is good to know what else is out there).

Source Code Editors: An editor is a program for editing text, like a word processor, but has some features that help you read and write computer programs. Their main advantage is that they are usually lightweight applications that are easy to learn and use. They also typically support many programming languages, so you can use the same tool for all your work. Their disadvantage is that you will need to use the command line to run the compiler, and to organize larger projects. For example, SciTE is a popular editor for Windows, TextWrangler for Mac, while jEdit and Sublime Text support Windows, Mac and Linux.

Integrated Development Environments (IDEs): Most Java developers use an IDE, because it combines a source code editor with other tools for software development. They make it easy to find and correct errors, and to accomplish tasks through a GUI instead of the command line. In this class, we recommend using Eclipse. Other popular IDEs for Java include NetBeans and IntelliJ IDEA.

Windows

Install the Sun Java 8 JDK

You need to install the Java Standard Edition (SE) development kit (JDK). You can find this through Sun's Java download site.

Go to the Java SE JDK download page.
On the top, select the download tab.
Click the Download button for Java Platfom (JDK).
Select the download that best matches your Windows plaform.
If a dialog pops up, click the "Skip this step" link at the bottom of the dialog box.
Wait for your download to finish.
Run the installer and follow the directions. Accept the default settings.

Install Eclipse

You need the Eclipse IDE for Java developers. You can find this on the Eclipse download site.

If the link Get Eclipse for your specific plaftorm does not appear, Download the Eclipse IDE for Java Developers for your platform.
If it is an installer, chose the option Eclipse IDE for Java Developers. If it is a zip file, open the zip file that you downloaded. It should contain a single folder named eclipse.
Drag and drop the eclipse folder into C:\Program Files, (or chose as installation location).
Start Eclipse by double clicking on eclipse.exe.
Select a workspace location (this is where Eclipse will place your projects).
Optional: To make it easy to find in the future, create a shortcut from eclipse.exe your Desktop, and rename it Eclipse (drag with the right mouse button to create a shortcut).

Mac OS X

Mac OS X comes with the Java development tools (possibly for the Java 7 SDK, but that is fine). Run Software Update to ensure that you have the latest version installed (Apple Menu → Software Update).

Install Eclipse

Download the Eclipse IDE for Java Developers from the Eclipse download site.
If it is an installer, chose the option Eclipse IDE for Java Developers. If it is an archive, open the archive file that you downloaded (Safari may have expanded it automatically for you).
If it is an installer, chose Applications as a location for installation. If it is an archive, drag and drop the eclipse folder anywhere you want it (e.g. Applications folder).
Run Eclipse by double clicking the Eclipse application inside the eclipse folder.
Select a workspace location (this is where Eclipse will place your projects).

Linux

If you are using Linux, you probably don't need our help to get Java and Eclipse running yourself. If you do need help, ask the instructor during the first lecture.