Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Warning

Noch nicht aktualisiert.

Introduction

This guide will help get you set up to be able to work on your homework assignments. Yay! Get a cup of coffee and work your way through it.

...

  • The Java Development Kit. To download that, go to this site and use the big button to download the Java Platform (JDK), scroll down a bit until you see Java SE 8, and click the JDK Download button to the right.
  • The Eclipse development environment. Simply follow this tutorial to install the Eclipse IDE for Java Developers.
  • The ACM Java library most of our assignments use. Click this link and this link and save the files somewhere you'll be able to find them again.

...

To solve your homework assignments, you will need to know how to create new Java projects, add classes to them, and how to execute them. Let's start by creating a new project. Right-click in the Package Explorer, and select New -> Java Project. This will open the following dialogue:

Image RemovedImage Added

Enter a project name that describes the project. For your homework assignments, for example, you may want the project name to contain the assignment the project is supposed to solveto create a separate project for each set of assignments, so a project name like "Set01" might work well for the first set. Leave the rest untouched and click Finish. Depending on your installation, you may see the following dialog:

Image Added

If that is the case, click the Don't Create button (things won't work otherwise).

Your Eclipse workspace will now contain an entry for the new project. Eclipse has to be told that you want to use the ACM library with that project. To configure it that way, right-click on the project, click on Build Path and select Configure Build Path...:

...

Remember the ACM library you downloaded? This is where we need it. Since you will be making use of that library, we need to configure the project such that it knows that the library exists. To that end, switch to the Libraries tab (if your dialog box has two entries, Modulepath and Classpath, select Classpath before you continue):

A library in Java is distributed as a file with the `.jar` file extension. Click on the Add External JARs button and select the downloaded ACM library (if you don't remember where you saved it, simply download the library again). Once you have found the library, it should show up in the dialogue. If you expand its entry, it should look something like this:

...