This will be a tutorial on how to setup the Eclipse IDE with the intent of using it for Dr. Slator's Blackwood project.
Eclipse can be found online here. In particular, a user would want to download Eclipse Classic for their particular platform. This tutorial will target Eclipse 4.2.2 (Juno).
After downloading, you will need to extract Eclipse in a directory of your choice.
Run Eclipse.exe, and the Eclipse program will start. You will be asked to choose a workspace. A workspace is simply where Eclipse stores the project files, pick a sensible place, the default is acceptable.
Blackwood stores its source code in an Subversion (SVN) repository. By default, Eclipse does not support SVN, so you will need to install a plugin to use SVN. These instructions can be found here.
Eclipse will restart a few times during this install process.
Once SVN is installed and configured, you will want to create a new project. This can be found in File → New → Other…
From the New Project Wizard, you will want to select SVN → Project from SVN.
You will be prompted to enter the URL of the repository:
(for older branches) https://lions.cs.ndsu.nodak.edu/svn/blackwood/branches/CS345_Spring201X (for the current and most recent branches) https://lions.cs.ndsu.nodak.edu/svn/blackwood/branches/CS429_Spring201X/
where X is the year of the semester.
Students can check out code from this repository without authentication. If you wish to commit code, you will need credentials. Contact labsupport@cs.ndsu.edu to request access.
Eclipse will then allow you to check out a specific revision. For most purposes, you wish to check out the Head Revision.
Simply checking out the repository is not enough, you will need to create a new project for Eclipse. I would recommend to “Check out as a project configured using the New Project Wizard”.
Select Java → Java Project.
Give the project a name, and select finish. This will begin the check out process. The project will be downloaded from lions.cs.ndsu.nodak.edu to your local computer. Once complete, go to your workbench.
You should now see a Package Explorer on the left side of the Eclipse Window. Yet if you try to run Blackwood now, it will crash. You will need to link the proper libraries that the project uses.
Right click on your project and select 'Properties'. From here, select the Java Build Path on the left, and click the Libraries tab.
Here, press the 'Add JARs…' button. This will open up a new window. You will find the Jar libraries that need to be added under 'lib'. Select all of the files that end in “.jar”, and click Okay. Those libraries are now added to the project.
Now that the Blackwood source code is downloaded, the project is created and the libraries are properly linked, you can now run Blackwood. Right click on the project, select Run As… → Java Application. You will then be prompted to select the correct Main method to run, this can be found in “Main - edu.nodak.ndsu.cs.lions.blackwood”. Should all the steps be followed properly, Blackwood will launch.
Find the Blackwood project in the Package Explorer on the left side of the Eclipse Window.
Right click on the project and select Export from the menu. A select window will open. Find the Java option and choose Runable Jar File from. Then click Next.
In the next window, Select the Blackwood launch configuration and enter a path and file name in the export destination field. Be sure the Package required libraries into generated jar option is selected. Click Finish
If your project runs in Eclipse without errors, you should get an executable jar file when the process finishes.
If you've gone through all the above steps, and you still don't have a working copy of Blackwood in Eclipse: Attached is a working Eclipse Oxygen2 directory with the CS429_Spring2018 branch in its workspace. If the project does not automatically import, right click in the Package Explorer pane and select “Import…”, next select “General” → “Existing Projects into Workspace”, and under “Select root directory” click “Browse…” and navigate to the “workspace” folder included in this zip archive. Select the project and hit finish.