<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://robowiki.net/w/index.php?action=history&amp;feed=atom&amp;title=Robocode%2FIntellij%2FRunning_from_Intellij</id>
	<title>Robocode/Intellij/Running from Intellij - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://robowiki.net/w/index.php?action=history&amp;feed=atom&amp;title=Robocode%2FIntellij%2FRunning_from_Intellij"/>
	<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Robocode/Intellij/Running_from_Intellij&amp;action=history"/>
	<updated>2026-04-08T11:29:34Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Robocode/Intellij/Running_from_Intellij&amp;diff=57422&amp;oldid=prev</id>
		<title>Coisale13: Setup Coding + Debugging a Robocode bot from Intellij</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Robocode/Intellij/Running_from_Intellij&amp;diff=57422&amp;oldid=prev"/>
		<updated>2023-10-03T21:24:31Z</updated>

		<summary type="html">&lt;p&gt;Setup Coding + Debugging a Robocode bot from Intellij&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Wondering how to run your robot in [[Robocode]] from [https://www.jetbrains.com/idea/ Intellij]? Well this is possible! And that is what this page is all about.&lt;br /&gt;
&lt;br /&gt;
Make sure Robocode is installed and can run before continuing.&lt;br /&gt;
&lt;br /&gt;
== Create a new Intellij project ==&lt;br /&gt;
Create a new Java project in Intellij.&lt;br /&gt;
Nothing special about it. I am using JDK 1.8, I don't think this matters.&lt;br /&gt;
&lt;br /&gt;
== Add Robocode's library + javadocs to Intellij ==&lt;br /&gt;
Right click your top level module/folder in intellij. Select &amp;quot;Open Module Settings&amp;quot; (or press F4).&lt;br /&gt;
Go to libraries, and add a Java library.&lt;br /&gt;
Navigate to where you installed Robocode and select both the &amp;quot;libs&amp;quot; and &amp;quot;javadoc&amp;quot; folder.&lt;br /&gt;
Apply, Okay, exit.&lt;br /&gt;
&lt;br /&gt;
== Create Your Package + Robot ==&lt;br /&gt;
Right click the src folder on the right.&lt;br /&gt;
Add a package.&lt;br /&gt;
In the package, add a java class.&lt;br /&gt;
&lt;br /&gt;
import robocode.Robot, and write a class that extends Robot.&lt;br /&gt;
Intellij should be autocompleting for you at this point.&lt;br /&gt;
&lt;br /&gt;
== Build and use your robot ==&lt;br /&gt;
Build your file. You should see a new folder appear in your project. out &amp;gt; production &amp;gt; projectName &amp;gt; packageName &amp;gt; robotClassName&lt;br /&gt;
&lt;br /&gt;
Load up Robocode, go to Options &amp;gt; Preferences &amp;gt; Development Options&lt;br /&gt;
Add the path to your intellij build output. Specifically /path/to/intellijProjectName/out/production/projectName&lt;br /&gt;
If you don't add this exact path, it won't work. &lt;br /&gt;
&lt;br /&gt;
When you start a battle, in the robot selector, you should see your robot appear under your package name!&lt;br /&gt;
&lt;br /&gt;
== Running your robot from Intellij ==&lt;br /&gt;
Edit your run configurations.&lt;br /&gt;
Create a new run configuration of type &amp;quot;Application&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Hit the blue &amp;quot;Modify Options&amp;quot; text on the right, select &amp;quot;Add VM options&amp;quot;.&lt;br /&gt;
Make sure you fill out the following:&lt;br /&gt;
java version: java 8 SDK&lt;br /&gt;
main Class: robocode.Robocode&lt;br /&gt;
VM options: -Xmx512M -Dsun.io.useCanonCaches=false -Ddebug=true&lt;br /&gt;
Working directory: path/where/you/installed/robocode&lt;br /&gt;
&lt;br /&gt;
Save this.&lt;br /&gt;
&lt;br /&gt;
Now add some breakpoints, hit the debug icon in intellij. &lt;br /&gt;
It should load up robocode. When you start a battle with your bot, it will stop on the debug points!&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
=== Robot API ===&lt;br /&gt;
* [http://robocode.sourceforge.net/docs/robocode/ Robot API]&lt;br /&gt;
&lt;br /&gt;
=== Tutorials ===&lt;br /&gt;
* [[Robocode/System Requirements|System Requirements for Robocode]]&lt;br /&gt;
* [[Robocode/Download|How to download and install Robocode]]&lt;br /&gt;
* [[Robocode/Robot Anatomy|The anatomy of a robot]]&lt;br /&gt;
* [[Robocode/Getting Started|Getting started with Robocode]]&lt;br /&gt;
* [[Robocode/My First Robot|My First Robot Tutorial]]&lt;br /&gt;
* [[Robocode/Game Physics|Robocode Game Physics]]&lt;br /&gt;
* [[Robocode/Scoring|Scoring in Robocode]]&lt;br /&gt;
* [[Robocode/Robot Console|Using the robot console]]&lt;br /&gt;
* [[Robocode/Downloading_Robots|Downloading other robots]]&lt;br /&gt;
* [[Robocode/Learning from Robots|Learning from other robots]]&lt;br /&gt;
* [[Robocode/Package Robot|Package your robot]]&lt;br /&gt;
* [[Robocode/FAQ|Frequently Asked Questions (FAQ)]]&lt;br /&gt;
* [[Robocode/Articles|Articles about Robocode]]&lt;br /&gt;
* [[Robocode/Console Usage|Starting Robocode from the command line]]&lt;br /&gt;
* [[Robocode/Graphical_Debugging|Graphical debugging]]&lt;br /&gt;
&lt;br /&gt;
=== News and Releases ===&lt;br /&gt;
* [http://sourceforge.net/export/rss2_project.php?group_id=37202 RSS Feeds for the Robocode project]&lt;br /&gt;
* [http://sourceforge.net/project/showfiles.php?group_id=37202&amp;amp;package_id=29609 Robocode file releases]&lt;br /&gt;
&lt;br /&gt;
=== Home pages ===&lt;br /&gt;
* [http://robocode.sourceforge.net/ Classic homepage]&lt;br /&gt;
* [http://sourceforge.net/projects/robocode Robocode project at SourceForge]&lt;br /&gt;
* [http://robocoderepository.com/ Robocode Repository]&lt;br /&gt;
* [[wikipedia:Robocode|Wikipediaentry for Robocode]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Robocode Documentation]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Eclipse IDE]]&lt;/div&gt;</summary>
		<author><name>Coisale13</name></author>
		
	</entry>
</feed>