Syllabus

Description

This course is an introduction to Java programming and software engineering. It is designed for those who have little or no programming experience in Java and covers concepts useful to 6.005. The focus is on developing high quality, working software that solves real problems. Students will learn the fundamentals of Java, and how to use 3rd party libraries to get more done with less work. Each session includes one hour of lecture and one hour of assisted lab work. Short labs are assigned with each lecture.

Installing Java and Eclipse

In order to write Java programs, you need two things: the Java Development Kit (JDK), and a source code editor. Please follow these directions before the first class, so you can get started on the first assignment faster. If you run into difficulty, we can help you with this during the first class.

The Java Development Kit contains the tools needed to compile and run Java programs. We will discuss this in more detail in the first lecture. The source code editor can be relatively simple programs like Notepad to an Integrated Development Environment (IDE) like Eclipse. For this course any of these will work fine, although it is important to know the advantages and disadvantages of each option. We recommend using Eclipse, and will discuss using it during the first lecture.

Editors

To write programs, you need a piece of software called an editor. They come in two flavors: simple source code editors, or complex integrated development environments. For this course, we recommend using the Eclipse Integrated Development Environment, but it is useful to be aware of the options that are available to you.

Source Code Editors

A source code editor is a program for editing text, like a word processor, but it has features which make it easier to read and write computer programs. An advantage of using a plain source code editor is that they are usually lightweight applications that are easy to learn and use. Additionally, the editors typically support many programming languages, so you can use the same tool for all your work. The disadvantage is that you will need to use other tools in order to do you work. For Java, you will need to use the command line to run the compiler, and to organize larger projects.

For Windows, some popular source code editors are SciTE, UltraEdit, Zeus, or jEdit. Mac users might want to look at TextMate, SubEthaEdit, TextWrangler, or jEdit.

Integrated Development Environments (IDEs)

Many professional Java developers use an integrated development environment (IDE), which combines a source code editor with many other tools for software development. The main benefit is that they make it easy to find and correct errors, and to accomplish tasks through a graphical interface, instead of needing to learn the command line. In this class, we recommend using Eclipse. Other popular IDEs for Java include NetBeans and IntelliJ.

Windows

Install the Sun Java 6 JDK

  1. Go to Sun's Java download site.
  2. Select "Java SE Development Kit" (the second choice). Click the Download button on the right.
  3. Under Platform select Windows.
  4. Check the "I agree" box.
  5. Click continue.
  6. Click on the file name (jdk-6u11-windows-i586-p.exe). The file should begin downloading.
  7. Run the installer and follow the directions. Accept the default settings.

Install Eclipse

  1. Go to the Eclipse download site.
  2. Download Eclipse IDE for Java Developers by clicking the "Windows" link on the right hand side.
  3. Download the file from the mirror that was automatically selected by clicking the link to the right of "Download from".
  4. Open the zip file that you downloaded.
  5. Drag and drop the folder into C:\Program Files, and perhaps rename it Eclipse.
  6. Optional: To make it easy to find in the future, create a shortcut from eclipse.exe to your Desktop, and rename it "Eclipse".

Mac OS X

Mac OS X comes with the Java development tools. Run Software Update to ensure that you have the latest version installed.

Install Eclipse

  1. Go to the Eclipse download site.
  2. Download Eclipse IDE for Java Developers by clicking the "Mac OS X" link on the right hand side.
  3. Download the file from the mirror that was automatically selected by clicking the link to the right of "Download from"
  4. Open the zip file that you downloaded (Safari may have expanded it automatically for you).
  5. Drag and drop the folder wherever you want it.
  6. Run Eclipse by double clicking "Eclipse" inside the folder that was downloaded.

Linux

If you are using Linux, you probably don't need our help to get Java and Eclipse running yourself. If not, ask one of the instructors for help during the first lecture.