Difference between revisions of "Robocode/Eclipse/Create a Project"
(Added missing text and image) |
m (Spaces between images and text) |
||
Line 5: | Line 5: | ||
[[Image:Eclipse-FileNewProject.png|Shows how to select a new project from the File menu in Eclipse]] | [[Image:Eclipse-FileNewProject.png|Shows how to select a new project from the File menu in Eclipse]] | ||
+ | |||
In the '''New Project''' dialog, select '''Java Project''' then click Next. | In the '''New Project''' dialog, select '''Java Project''' then click Next. | ||
[[Image:Eclipse-NewProjectWizard.png|Shows a dialog for creating a new project by selecting a wizard]] | [[Image:Eclipse-NewProjectWizard.png|Shows a dialog for creating a new project by selecting a wizard]] | ||
+ | |||
Type in a name for your project. I propose that we use the name '''MyRobots''' as the name for the new project. When you have written the name of the new project then click '''Next'''. <span style="color:red">''But do not click '''Finish''' yet!''</span> | Type in a name for your project. I propose that we use the name '''MyRobots''' as the name for the new project. When you have written the name of the new project then click '''Next'''. <span style="color:red">''But do not click '''Finish''' yet!''</span> | ||
+ | |||
[[Image:Eclipse-NewJavaProject.png|Shows a dialog for creating a new Java project where the user must type in a name for the new project]] | [[Image:Eclipse-NewJavaProject.png|Shows a dialog for creating a new Java project where the user must type in a name for the new project]] | ||
Line 20: | Line 23: | ||
Select the '''Libraries''' tab, then click on '''Add External JARs''': | Select the '''Libraries''' tab, then click on '''Add External JARs''': | ||
− | [[Image:Eclipse-NewProjectAddExtJars.png|Shows that the "Libraries" tab must be selected and then the "Add External Jars..." on the pane with Java Settings in the New Java Project dialog]] | + | [[Image:Eclipse-NewProjectAddExtJars.png|Shows that the "Libraries" tab must be selected and then the "Add External |
+ | |||
+ | |||
+ | Jars..." on the pane with Java Settings in the New Java Project dialog]] | ||
Browse to the robocode directory, select '''robocode.jar''' then click the '''Open'''. | Browse to the robocode directory, select '''robocode.jar''' then click the '''Open'''. | ||
[[Image:Eclipse-JarSelection.png|Shows the JAR Selection dialog where the user must select the robocode.jar file and press the "Open" button]] | [[Image:Eclipse-JarSelection.png|Shows the JAR Selection dialog where the user must select the robocode.jar file and press the "Open" button]] | ||
+ | |||
The window should now look like this. Make sure '''robocode.jar''' is selected. | The window should now look like this. Make sure '''robocode.jar''' is selected. | ||
Line 31: | Line 38: | ||
http://robocode.sourceforge.net/help/ide/newproject5.png | http://robocode.sourceforge.net/help/ide/newproject5.png | ||
+ | |||
Type in (or browse to) the path for robocode.jar again. Optionally, enter the location of Robocode's Javadocs. The window should now look like this: | Type in (or browse to) the path for robocode.jar again. Optionally, enter the location of Robocode's Javadocs. The window should now look like this: | ||
http://robocode.sourceforge.net/help/ide/newproject6.png | http://robocode.sourceforge.net/help/ide/newproject6.png | ||
+ | |||
Click '''OK''', then click '''Finish''' to build your project. | Click '''OK''', then click '''Finish''' to build your project. |
Revision as of 13:24, 1 December 2007
In order to build a Robocode robot in Eclipse, we first have to create a Project to store them in. This page will assist you in setting that up.
Contents
Creating a Project for your Robots
First, select File->New->Project in the menu.
In the New Project dialog, select Java Project then click Next.
Type in a name for your project. I propose that we use the name MyRobots as the name for the new project. When you have written the name of the new project then click Next. But do not click Finish yet!
Oops! I clicked Finish. What to do?
If you clicked Finish by mistake, you can find the rest of the screens shown by right-clicking on the project named MyRobots, then select Properties, and then select Java Build Path.
New Project
Select the Libraries tab, then click on Add External JARs:
Browse to the robocode directory, select robocode.jar then click the Open.
The window should now look like this. Make sure robocode.jar is selected.
Now you must select the Javadoc location: (None) under robocode.jar and click Edit...
http://robocode.sourceforge.net/help/ide/newproject5.png
Type in (or browse to) the path for robocode.jar again. Optionally, enter the location of Robocode's Javadocs. The window should now look like this:
http://robocode.sourceforge.net/help/ide/newproject6.png
Click OK, then click Finish to build your project.
Congratulations! Your new project is ready. :-)