Difference between revisions of "Robocode/Eclipse/Create a Project"

From Robowiki
Jump to navigation Jump to search
m (Backup changes)
Line 4: Line 4:
  
 
== Creating a Project for your Robots ==
 
== Creating a Project for your Robots ==
 +
First, select File->New->Project in the menu.
 +
 +
http://robocode.sourceforge.net/help/ide/filenewproject.png
 +
 +
In the '''New Project''' dialog, select '''Java Project''' then click Next.
 +
 +
http://robocode.sourceforge.net/help/ide/newproject1.png
 +
 +
Type in a name for your project, then click next. <span style="color:red">Do not click '''Finish''' yet!</span>
 +
 +
=== 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'''.
 +
 +
 +
Select the "Libraries" tab, then click on "Add External JARs"
 +
 +
 +
 +
Browse to the robocode directory, select "robocode.jar" then click "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..."
 +
 +
 +
 +
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!
 +
  
  

Revision as of 22:05, 28 November 2007

This article is a stub. You can help RoboWiki by expanding it.

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.

Creating a Project for your Robots

First, select File->New->Project in the menu.

http://robocode.sourceforge.net/help/ide/filenewproject.png

In the New Project dialog, select Java Project then click Next.

http://robocode.sourceforge.net/help/ide/newproject1.png

Type in a name for your project, then click next. 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.


Select the "Libraries" tab, then click on "Add External JARs"


Browse to the robocode directory, select "robocode.jar" then click "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..."


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!


See Also