Difference between revisions of "Robocode/Eclipse/Create a Project"
m (Added to the Tutorials category) |
(Corrected the section describing how to select robocode.jar as an external library) |
||
Line 27: | Line 27: | ||
− | Browse to the robocode directory, select ''' | + | Browse to the robocode directory, select the '''libs''' directory and then click the '''Open'''. |
− | [[Image:Eclipse-JarSelection.png|Shows the JAR Selection dialog where the user must select the | + | [[Image:Eclipse-JarSelection.png|Shows the JAR Selection dialog where the user must first select the libs dir within the Robocode root dir and press the "Open" button]] |
− | + | Next, select the '''robocode.jar''' and then click the '''Open'''. | |
+ | |||
+ | [[Image:Eclipse-JarSelection2.png|Shows the JAR Selection dialog where the user must secondly select the robocode.jar file within the libs dir and press the "Open" button]] | ||
+ | |||
Now you must select the '''Javadoc location: (None)''' under '''robocode.jar''' and click '''Edit...''' | Now you must select the '''Javadoc location: (None)''' under '''robocode.jar''' and click '''Edit...''' |
Revision as of 00:14, 6 February 2008
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 the libs directory and then click the Open.
Next, select the robocode.jar and then click the Open.
Now you must select the Javadoc location: (None) under robocode.jar and click Edit...
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:
Click OK, then click Finish to build your project.
Congratulations! Your new project is ready. :-)