To Put your
Source Files into Eclipse follow these simple steps
This guide
is aimed at those who wish to take the .zip file from the website, and import
it into Eclipse to create a project which can be run immediately.
The following instructions
were prepared for an older version of Eclipse than the current one. However,
there seem to be no significant differences. In trying the latest version
(3.3.0), I found that the JRE and Project Layout options could not be selected
as the new project is created, but they work as is. Another good integrated
development environment for Java is NetBeans.
Part 1. If
not working from ITEE, download Eclipse. Eclipse is installed on computers
in selected labs in ITEE.
1. Download the Eclipse 3.1 latest version here (from eclipse.org)
2. Extract the Source Files For Eclipse and place
them where you wish (e.g. C:\ on your own computer).
3. Rename the folder.
In unzipping the source
files, I suggest the following type of directory structure:
assignment1/search/fifteen/FifteenSearchApp.java - ie: create a new directory
(folder) for your project with name, e.g. assignment1. This will also be the
project name. Then unzip "search source.zip" into this directory and
rename the "search source" directory to "search".
Then in Eclipse, the
"Directory to Create project from existing source" would be (full
path of) assignment1.
Part 2.
Download the Source Code and Import into Eclipse
4. Download the source in .zip form from here
5. Extract the Folder, keeping the directory
structure intact.
6. Make sure you have at least one folder above
the folder named “search” in the file hierarchy. You will need to select this
folder when you import.
7. Open Eclipse (if it asks you to select a
workspace, you can choose an area for your project files, or just click ok) and
open a new project.

8. Select Java Project

9. Select
“Create Project from existing source” Option, and Browse to where you extracted
the files. Ensure you select the folder above the folder named “search”, this
way Eclipse will automatically sort the packages out for you.

9. If all goes according to plan you should see
this next step in the wizard

Note the icons next to search, search.fifteen
and search.tictactoe. If these icons appear different in your wizard (e.g
appear as little folders) then you have done something wrong. The icon shown
above is the package layout Eclipse has created, which happens to be the right
hierarchy needed to run the 15 puzzle.
11 . Click finish to complete the wizard, and
you should now see this on the left hand side of Eclipse

To run the application, expand the
search.fifteen package, select the FifteenSearchApp file and select run ->
as java application from the toolbar menu. Down the bottom in the console
window you should see the debug statements showing you how the puzzle was
solved.
Good luck.
