Difference between revisions of "Robocode/Eclipse/Running from Eclipse"
(Updated links to other pages) |
(Undo changes meant for the Intellij wiki page.) |
||
(5 intermediate revisions by 4 users not shown) | |||
Line 23: | Line 23: | ||
Next, you must click on the '''Arguments''' tab. | Next, you must click on the '''Arguments''' tab. | ||
− | Here you write <code>-Xmx512M -Dsun.io.useCanonCaches=false</code> into the '''VM arguments''' text box. The <code>-Xmx512M</code> tells the Java VM that Robocode can use up to maximum 512 MB RAM off the heap, and <code>-Dsun.io.useCanonCaches=false</code> is a workaround to prevent SecurityExceptions to occur when robots try to access a file. | + | Here you write <code>-Xmx512M -Dsun.io.useCanonCaches=false -Ddebug=true</code> into the '''VM arguments''' text box. The <code>-Xmx512M</code> tells the Java VM that Robocode can use up to maximum 512 MB RAM off the heap, -Ddebug=true tells Robocode that it should not give you skipped turns just because you paused robot in debugger, and <code>-Dsun.io.useCanonCaches=false</code> is a workaround to prevent SecurityExceptions to occur when robots try to access a file. |
Finally, you must click on the '''Other''' radio button under '''Working directory''', and then write the full path to the folder where [[Robocode]] is installed in the text file beside '''Other'''. | Finally, you must click on the '''Other''' radio button under '''Working directory''', and then write the full path to the folder where [[Robocode]] is installed in the text file beside '''Other'''. | ||
Line 45: | Line 45: | ||
== See also == | == See also == | ||
+ | |||
+ | === Using Eclipse IDE === | ||
+ | * [[Robocode/Eclipse|Using Eclipse as IDE]] | ||
+ | * [[Robocode/Eclipse/Create_a_Project|Creating a project for your robots]] | ||
+ | * [[Robocode/Add_a_Robot_Project|Add robot project from an IDE into Robocode]] | ||
+ | * [[Robocode/Eclipse/Create_a_Robot|Creating a robot in Eclipse]] | ||
+ | * [[Robocode/Eclipse/Debugging Robot|Debugging your robot with Eclipse]] | ||
=== Robot API === | === Robot API === | ||
Line 65: | Line 72: | ||
* [[Robocode/Console Usage|Starting Robocode from the command line]] | * [[Robocode/Console Usage|Starting Robocode from the command line]] | ||
* [[Robocode/Graphical_Debugging|Graphical debugging]] | * [[Robocode/Graphical_Debugging|Graphical debugging]] | ||
− | |||
− | |||
− | |||
− | |||
=== News and Releases === | === News and Releases === |
Latest revision as of 22:28, 3 October 2023
Wondering how to run your robot in Robocode from Eclipse? Well this is possible! And that is what this page is all about.
Contents
Running your robot from Eclipse
Right-click on your project, move the mouse-pointer down to Run As in the menu that opens and click Run....
Now the following window will show up:
Click on the Java Application on the left side, and afterwards the New button (New launch configuration).
Now you should change the name of your launch configuration to something you remember, e.g. MyRobots - Robocode.
In the Main class field you must write robocode.Robocode, which is the main class of Robocode used for playing the game.
Next, you must click on the Arguments tab.
Here you write -Xmx512M -Dsun.io.useCanonCaches=false -Ddebug=true
into the VM arguments text box. The -Xmx512M
tells the Java VM that Robocode can use up to maximum 512 MB RAM off the heap, -Ddebug=true tells Robocode that it should not give you skipped turns just because you paused robot in debugger, and -Dsun.io.useCanonCaches=false
is a workaround to prevent SecurityExceptions to occur when robots try to access a file.
Finally, you must click on the Other radio button under Working directory, and then write the full path to the folder where Robocode is installed in the text file beside Other.
Now you press "Run", and Robocode will (hopefully) start up. In Robocode you start your robot by selecting Battle->New from the menu or by using the hotkey Ctrl+N. Next, you select your robot and some other opponent robots, and press "Start Battle".
The next time you want to run your robot(s) in Robocode from Eclipse, you simply run your launch configuration like this:
An easier way is just to click on the "green play button" without the popup menu. This will start the last launch configuration automatically, which should be your project.
References
See also
Using Eclipse IDE
- Using Eclipse as IDE
- Creating a project for your robots
- Add robot project from an IDE into Robocode
- Creating a robot in Eclipse
- Debugging your robot with Eclipse
Robot API
Tutorials
- System Requirements for Robocode
- How to download and install Robocode
- The anatomy of a robot
- Getting started with Robocode
- My First Robot Tutorial
- Robocode Game Physics
- Scoring in Robocode
- Using the robot console
- Downloading other robots
- Learning from other robots
- Package your robot
- Frequently Asked Questions (FAQ)
- Articles about Robocode
- Starting Robocode from the command line
- Graphical debugging