In lecture form you were given a look at the capabilities of Eclipse's Java Development Tools (JDT). Step by step instructions were also provided to take you through a series of coding exercises designed to illustrate the JDT capabilities.

The exercises are broken down into several parts, each demonsrating different concepts and, as required, building on the previous parts.

Java Programming

> 1. Hello World - You’ll create the ubiquitous “Hello World” program, and will see how to run it, including using a scrapbook page.

> 2. Quick Fix - You’ll use JDT’s quick-fix capabilities to fix a series of errors in a Java program.

> 3. Code Generation - You’ll see how to significantly improve your productivity by generating Java code to complete expressions, including the use of code templates.

> 4. Refactoring - In this part, you’ll really start to see the power of JDT when using refactoring to clean up, reorganize, and extend a program.

> 5. Launch Configurations - You’ll see how to use launch configurations to run Java programs, and you’ll pass parameters to a program, pass Java VM parameters, and reference declarations in a JAR file.

> 6. JRE 1.4 Code - In the final part of the exercise, you’ll see how to configure JDT in order to develop code that requires JRE 1.4.

Java Debugging

> 1. Debugging - You’ll start with the basics and then hit all the mainline debugging functions you’ll need to debug Java. You’ll see different kinds of breakpoints, controlling program execution, examining and changing variable values, and evaluating expressions.

> 2. Debugging Threads - In this part, you’ll debug a multi-threaded program and see watchpoints and method breakpoints on a class in a JAR file for which you do not have the source.

> 3. Remote Debugging - In the final part of the exercise, you’ll see how to debug a program running outside of Eclipse.

Sample Code

The code in the following projects and packages is input to the exercises. Each exercise or part of an exercise will explain what code is required and what you have to do to get started.

- `com.ibm.lab.usingjdt`
  - `com.ibm.lab.usingjdt.codegeneration`
  - `com.ibm.lab.usingjdt.debugging`
  - `com.ibm.lab.usingjdt.quickfix`
  - `com.ibm.lab.usingjdt.refactoring`
  - `com.ibm.lab.usingjdt.remotedebugging`
  - `com.ibm.lab.usingjdt.threadeddebugging`
- `com.ibm.lab.usingjdt.jre14`
  - `com.ibm.lab.usingjdt.jre14`
- `com.ibm.lab.usingjdt.launchconfigurations`
  - `com.ibm.lab.usingjdt.launchconfigurations`

The code in the following projects are the answers to exercises that involve creating or modifying the input code. You can find the Javadoc for a project in its `doc` folder. The links below work only if you have the project loaded in your workspace.

- `com.ibm.lab.soln.usingjdt`
- `com.ibm.lab.soln.usingjdt.helloworld`
- `com.ibm.lab.soln.usingjdt.jre14`
- `com.ibm.lab.soln.usingjdt.launchconfigurations`

When you load the input code into your workspace, you will see errors. These are by design. You will fix them as you go through the exercises. When you load the solution code, you may see errors depending on your configuration and whether or not you attempted the exercise. If you do see errors in the solutions when you load them, check the Javadoc.

© Copyright International Business Machines Corporation, 2003.
All rights reserved.