<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://robowiki.net/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=FlemmingLarsen</id>
	<title>Robowiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://robowiki.net/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=FlemmingLarsen"/>
	<link rel="alternate" type="text/html" href="http://robowiki.net/wiki/Special:Contributions/FlemmingLarsen"/>
	<updated>2026-04-20T23:41:32Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=56735</id>
		<title>Robocode/Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=56735"/>
		<updated>2021-06-24T21:15:11Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: Added screenshots&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide describes how to build the Robocode application, i.e. the game itself.&lt;br /&gt;
&lt;br /&gt;
== Developer's Guide for building Robocode with IntelliJ IDEA setup ==&lt;br /&gt;
&lt;br /&gt;
=== Notice ===&lt;br /&gt;
&lt;br /&gt;
This guide is intended for experienced Java developers, who want to work on the Robocode application, and describes all the basic stuff required to compile and run Robocode within [https://www.jetbrains.com/idea/ IntelliJ IDEA].&lt;br /&gt;
&lt;br /&gt;
If you just need to study the sources, you can do it from [https://github.com/robo-code/robocode GibHub], where it is possible to download the source code as a zip file under 'Code'.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
To get started with building Robocode you need:&lt;br /&gt;
* An Internet connection, as Robocode has dependencies to libraries that are available on public binary repositories.&lt;br /&gt;
* [https://git-scm.com/downloads Git]&lt;br /&gt;
* [https://www.jetbrains.com/idea/download/ IntelliJ IDEA]&lt;br /&gt;
* JDK 8, e.g. [https://adoptopenjdk.net/?variant=openjdk8 AdoptOpenJDK 8]&lt;br /&gt;
&lt;br /&gt;
Note that JDK 8 is required for Robocode to ensure all binaries can run on Java 8. If you build a customized version of your own, you are of course free to use a newer JDK version. But notice that the build tools might not be work with newer Java versions. So you'll need to fix this by yourself.&lt;br /&gt;
&lt;br /&gt;
Make sure that your JAVA_HOME and PATH is set up to use the JDK 8 when building the Robocode application. There is a good guide [https://www.baeldung.com/java-home-on-windows-7-8-10-mac-os-x-linux here].&lt;br /&gt;
&lt;br /&gt;
=== Cloning the Robocode project ===&lt;br /&gt;
&lt;br /&gt;
You need to download the source files for the Robocode project into your PC using Git with this command line:&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/robo-code/robocode.git robocode-proj&lt;br /&gt;
&lt;br /&gt;
This downloads the Robocode source files into a directory named 'robocode-proj' into the current directory.&lt;br /&gt;
&lt;br /&gt;
=== Building the Robocode application ===&lt;br /&gt;
&lt;br /&gt;
Robocode is built by running using Gradle standing in the 'robocode-proj' directory:&lt;br /&gt;
&lt;br /&gt;
    ./gradlew build&lt;br /&gt;
&lt;br /&gt;
This step is required to easy importing the project into IntelliJ IDEA, but also the quickest way to build and test Robocode.&lt;br /&gt;
&lt;br /&gt;
=== Setup Robocode for IntelliJ ===&lt;br /&gt;
&lt;br /&gt;
First, open the 'robocode-project' directory in IntelliJ.&lt;br /&gt;
&lt;br /&gt;
Secondly, set the JDK for the Robocode project, which needs to be JDK 8.&lt;br /&gt;
&lt;br /&gt;
From the menu, select:&lt;br /&gt;
File &amp;gt; Project Structure | Platform Settings | SDKs &amp;gt; + (plus sign) &amp;gt; Add JDK&lt;br /&gt;
&lt;br /&gt;
Select the home directory of your JDK 1.8 installation.&lt;br /&gt;
&lt;br /&gt;
The last step is to align IDEA with the Gradle setup. You do this by running the 'Reload All Gradle Projects', which is available by pressing the &amp;quot;refresh button&amp;quot; with the Gradle tool window in its top-left corner.&lt;br /&gt;
&lt;br /&gt;
[[File:Gradle refresh.png]]&lt;br /&gt;
&lt;br /&gt;
=== Run the Robocode application ===&lt;br /&gt;
&lt;br /&gt;
You can run or debug Robocode as soon as Robocode has been set up in IntelliJ. You can launch it from the toolbar with &amp;quot;Robocode app&amp;quot; and press the &amp;quot;play&amp;quot; button for running Robocode or the &amp;quot;bug&amp;quot; button for running Robocode in debugging mode.&lt;br /&gt;
&lt;br /&gt;
[[File:Run Robocode app.png|Run Robocode app from IntelliJ]]&lt;br /&gt;
&lt;br /&gt;
=== Build the Installer for Robocode ===&lt;br /&gt;
&lt;br /&gt;
You build the Robocode installer (setup file) using Gradle from the command line:&lt;br /&gt;
&lt;br /&gt;
   ./gradlew build&lt;br /&gt;
&lt;br /&gt;
Gradle puts the installer into /build/robocode-x.x.x.x-setup.jar&lt;br /&gt;
&lt;br /&gt;
=== Setting the version of the Robocode application ===&lt;br /&gt;
&lt;br /&gt;
The version of Robocode can be changed in this file:&lt;br /&gt;
\buildSrc\src\main\kotlin\net.sf.robocode.java-conventions.gradle.kts&lt;br /&gt;
&lt;br /&gt;
Look for a line like this:&lt;br /&gt;
&lt;br /&gt;
    version = &amp;quot;1.9.4.2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Robocode developers and contributions ===&lt;br /&gt;
&lt;br /&gt;
Robocode application developers have a discussion group [http://groups.google.com/group/robocode-developers here]. Anybody interested in a discussion or advice about contributing with a feature or modification for Robocode is welcome to this group.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Robocode Documentation]]&lt;br /&gt;
[[Category:Eclipse IDE]]&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=File:Gradle_refresh.png&amp;diff=56734</id>
		<title>File:Gradle refresh.png</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=File:Gradle_refresh.png&amp;diff=56734"/>
		<updated>2021-06-24T21:14:44Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Refreshing project from Gradle panel in IntelliJ&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=56733</id>
		<title>Robocode/Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=56733"/>
		<updated>2021-06-24T21:12:14Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide describes how to build the Robocode application, i.e. the game itself.&lt;br /&gt;
&lt;br /&gt;
== Developer's Guide for building Robocode with IntelliJ IDEA setup ==&lt;br /&gt;
&lt;br /&gt;
=== Notice ===&lt;br /&gt;
&lt;br /&gt;
This guide is intended for experienced Java developers, who want to work on the Robocode application, and describes all the basic stuff required to compile and run Robocode within [https://www.jetbrains.com/idea/ IntelliJ IDEA].&lt;br /&gt;
&lt;br /&gt;
If you just need to study the sources, you can do it from [https://github.com/robo-code/robocode GibHub], where it is possible to download the source code as a zip file under 'Code'.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
To get started with building Robocode you need:&lt;br /&gt;
* An Internet connection, as Robocode has dependencies to libraries that are available on public binary repositories.&lt;br /&gt;
* [https://git-scm.com/downloads Git]&lt;br /&gt;
* [https://www.jetbrains.com/idea/download/ IntelliJ IDEA]&lt;br /&gt;
* JDK 8, e.g. [https://adoptopenjdk.net/?variant=openjdk8 AdoptOpenJDK 8]&lt;br /&gt;
&lt;br /&gt;
Note that JDK 8 is required for Robocode to ensure all binaries can run on Java 8. If you build a customized version of your own, you are of course free to use a newer JDK version. But notice that the build tools might not be work with newer Java versions. So you'll need to fix this by yourself.&lt;br /&gt;
&lt;br /&gt;
Make sure that your JAVA_HOME and PATH is set up to use the JDK 8 when building the Robocode application. There is a good guide [https://www.baeldung.com/java-home-on-windows-7-8-10-mac-os-x-linux here].&lt;br /&gt;
&lt;br /&gt;
=== Cloning the Robocode project ===&lt;br /&gt;
&lt;br /&gt;
You need to download the source files for the Robocode project into your PC using Git with this command line:&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/robo-code/robocode.git robocode-proj&lt;br /&gt;
&lt;br /&gt;
This downloads the Robocode source files into a directory named 'robocode-proj' into the current directory.&lt;br /&gt;
&lt;br /&gt;
=== Building the Robocode application ===&lt;br /&gt;
&lt;br /&gt;
Robocode is built by running using Gradle standing in the 'robocode-proj' directory:&lt;br /&gt;
&lt;br /&gt;
    ./gradlew build&lt;br /&gt;
&lt;br /&gt;
This step is required to easy importing the project into IntelliJ IDEA, but also the quickest way to build and test Robocode.&lt;br /&gt;
&lt;br /&gt;
=== Setup Robocode for IntelliJ ===&lt;br /&gt;
&lt;br /&gt;
First, open the 'robocode-project' directory in IntelliJ.&lt;br /&gt;
&lt;br /&gt;
Secondly, set the JDK for the Robocode project, which needs to be JDK 8.&lt;br /&gt;
&lt;br /&gt;
From the menu, select:&lt;br /&gt;
File &amp;gt; Project Structure | Platform Settings | SDKs &amp;gt; + (plus sign) &amp;gt; Add JDK&lt;br /&gt;
&lt;br /&gt;
Select the home directory of your JDK 1.8 installation.&lt;br /&gt;
&lt;br /&gt;
The last step is to align IDEA with the Gradle setup. You do this by running the 'Reload All Gradle Projects', which is available by pressing the &amp;quot;refresh button&amp;quot; with the Gradle tool window in its top-left corner.&lt;br /&gt;
&lt;br /&gt;
=== Run the Robocode application ===&lt;br /&gt;
&lt;br /&gt;
You can run or debug Robocode as soon as Robocode has been set up in IntelliJ. You can launch it from the toolbar with &amp;quot;Robocode app&amp;quot; and press the &amp;quot;play&amp;quot; button for running Robocode or the &amp;quot;bug&amp;quot; button for running Robocode in debugging mode.&lt;br /&gt;
&lt;br /&gt;
[[File:Run Robocode app.png|Run Robocode app from IntelliJ]]&lt;br /&gt;
&lt;br /&gt;
=== Build the Installer for Robocode ===&lt;br /&gt;
&lt;br /&gt;
You build the Robocode installer (setup file) using Gradle from the command line:&lt;br /&gt;
&lt;br /&gt;
   ./gradlew build&lt;br /&gt;
&lt;br /&gt;
Gradle puts the installer into /build/robocode-x.x.x.x-setup.jar&lt;br /&gt;
&lt;br /&gt;
=== Setting the version of the Robocode application ===&lt;br /&gt;
&lt;br /&gt;
The version of Robocode can be changed in this file:&lt;br /&gt;
\buildSrc\src\main\kotlin\net.sf.robocode.java-conventions.gradle.kts&lt;br /&gt;
&lt;br /&gt;
Look for a line like this:&lt;br /&gt;
&lt;br /&gt;
    version = &amp;quot;1.9.4.2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Robocode developers and contributions ===&lt;br /&gt;
&lt;br /&gt;
Robocode application developers have a discussion group [http://groups.google.com/group/robocode-developers here]. Anybody interested in a discussion or advice about contributing with a feature or modification for Robocode is welcome to this group.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Robocode Documentation]]&lt;br /&gt;
[[Category:Eclipse IDE]]&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=56732</id>
		<title>Robocode/Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=56732"/>
		<updated>2021-06-24T21:11:08Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide describes how to build the Robocode application, i.e. the game itself.&lt;br /&gt;
&lt;br /&gt;
== Developer's Guide for building Robocode with IntelliJ IDEA setup ==&lt;br /&gt;
&lt;br /&gt;
=== Notice ===&lt;br /&gt;
&lt;br /&gt;
This guide is intended for experienced Java developers, who want to work on the Robocode application, and describes all the basic stuff required to compile and run Robocode within [https://www.jetbrains.com/idea/ IntelliJ IDEA].&lt;br /&gt;
&lt;br /&gt;
If you just need to study the sources, you can do it from [https://github.com/robo-code/robocode GibHub], where it is possible to download the source code as a zip file under 'Code'.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
To get started with building Robocode you need:&lt;br /&gt;
* An Internet connection, as Robocode has dependencies to libraries that are available on public binary repositories.&lt;br /&gt;
* [https://git-scm.com/downloads Git]&lt;br /&gt;
* [https://www.jetbrains.com/idea/download/ IntelliJ IDEA]&lt;br /&gt;
* JDK 8, e.g. [https://adoptopenjdk.net/?variant=openjdk8 AdoptOpenJDK 8]&lt;br /&gt;
&lt;br /&gt;
Note that JDK 8 is required for Robocode to ensure all binaries can run on Java 8. If you build a customized version of your own, you are of course free to use a newer JDK version. But notice that the build tools might not be work with newer Java versions. So you'll need to fix this by yourself.&lt;br /&gt;
&lt;br /&gt;
Make sure that your JAVA_HOME and PATH is set up to use the JDK 8 when building the Robocode application. There is a good guide [https://www.baeldung.com/java-home-on-windows-7-8-10-mac-os-x-linux here].&lt;br /&gt;
&lt;br /&gt;
=== Cloning the Robocode project ===&lt;br /&gt;
&lt;br /&gt;
You need to download the source files for the Robocode project into your PC using Git with this command line:&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/robo-code/robocode.git robocode-proj&lt;br /&gt;
&lt;br /&gt;
This downloads the Robocode source files into a directory named 'robocode-proj' into the current directory.&lt;br /&gt;
&lt;br /&gt;
=== Building the Robocode application ===&lt;br /&gt;
&lt;br /&gt;
Robocode is built by running using Gradle standing in the 'robocode-proj' directory:&lt;br /&gt;
&lt;br /&gt;
    ./gradlew build&lt;br /&gt;
&lt;br /&gt;
This step is required to easy importing the project into IntelliJ IDEA, but also the quickest way to build and test Robocode.&lt;br /&gt;
&lt;br /&gt;
=== Setup Robocode for IntelliJ ===&lt;br /&gt;
&lt;br /&gt;
First, open the 'robocode-project' directory in IntelliJ.&lt;br /&gt;
&lt;br /&gt;
Secondly, set the JDK for the Robocode project, which needs to be JDK 8.&lt;br /&gt;
&lt;br /&gt;
From the menu, select:&lt;br /&gt;
File &amp;gt; Project Structure | Platform Settings | SDKs &amp;gt; + (plus sign) &amp;gt; Add JDK&lt;br /&gt;
&lt;br /&gt;
Select the home directory of your JDK 1.8 installation.&lt;br /&gt;
&lt;br /&gt;
The last step is to align IDEA with the Gradle setup. You do this by running the 'Reload All Gradle Projects', which is available by pressing the &amp;quot;refresh button&amp;quot; with the Gradle tool window in its top-left corner.&lt;br /&gt;
&lt;br /&gt;
=== Run the Robocode application ===&lt;br /&gt;
&lt;br /&gt;
You can run or debug Robocode as soon as Robocode has been set up in IntelliJ. You can launch it from the toolbar with &amp;quot;Robocode app&amp;quot; and press the &amp;quot;play&amp;quot; button for running Robocode or the &amp;quot;bug&amp;quot; button for running Robocode in debugging mode.&lt;br /&gt;
&lt;br /&gt;
[[File:Run Robocode app.png|thumb|Run Robocode app from IntelliJ]]&lt;br /&gt;
&lt;br /&gt;
=== Build the Installer for Robocode ===&lt;br /&gt;
&lt;br /&gt;
You build the Robocode installer (setup file) using Gradle from the command line:&lt;br /&gt;
&lt;br /&gt;
   ./gradlew build&lt;br /&gt;
&lt;br /&gt;
Gradle puts the installer into /build/robocode-x.x.x.x-setup.jar&lt;br /&gt;
&lt;br /&gt;
=== Setting the version of the Robocode application ===&lt;br /&gt;
&lt;br /&gt;
The version of Robocode can be changed in this file:&lt;br /&gt;
\buildSrc\src\main\kotlin\net.sf.robocode.java-conventions.gradle.kts&lt;br /&gt;
&lt;br /&gt;
Look for a line like this:&lt;br /&gt;
&lt;br /&gt;
    version = &amp;quot;1.9.4.2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Robocode developers and contributions ===&lt;br /&gt;
&lt;br /&gt;
Robocode application developers have a discussion group [http://groups.google.com/group/robocode-developers here]. Anybody interested in a discussion or advice about contributing with a feature or modification for Robocode is welcome to this group.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Robocode Documentation]]&lt;br /&gt;
[[Category:Eclipse IDE]]&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=File:Run_Robocode_app.png&amp;diff=56731</id>
		<title>File:Run Robocode app.png</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=File:Run_Robocode_app.png&amp;diff=56731"/>
		<updated>2021-06-24T21:10:35Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Run Robocode app from IntelliJ&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=56489</id>
		<title>Robocode/Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=56489"/>
		<updated>2021-04-09T23:37:38Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: Brand new developer guide for building Robocode with Gradle and for IntelliJ IDEA&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide describes how to build the Robocode application, i.e. the game itself.&lt;br /&gt;
&lt;br /&gt;
== Developer's Guide for building Robocode with IntelliJ IDEA setup ==&lt;br /&gt;
&lt;br /&gt;
=== Notice ===&lt;br /&gt;
&lt;br /&gt;
This guide is intended for experienced Java developers, who want to work on the Robocode application, and describes all the basic stuff required to compile and run Robocode within [https://www.jetbrains.com/idea/ IntelliJ IDEA].&lt;br /&gt;
&lt;br /&gt;
If you just need to study the sources, you can do it from [https://github.com/robo-code/robocode GibHub], where it is possible to download the source code as a zip file under 'Code'.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
To get started with building Robocode you need:&lt;br /&gt;
* An Internet connection, as Robocode has dependencies to libraries that are available on public binary repositories.&lt;br /&gt;
* [https://git-scm.com/downloads Git]&lt;br /&gt;
* [https://www.jetbrains.com/idea/download/ IntelliJ IDEA]&lt;br /&gt;
* JDK 8, e.g. [https://adoptopenjdk.net/?variant=openjdk8 AdoptOpenJDK 8]&lt;br /&gt;
&lt;br /&gt;
Note that JDK 8 is required for Robocode to ensure all binaries can run on Java 8. If you build a customized version of your own, you are of course free to use a newer JDK version. But notice that the build tools might not be work with newer Java versions. So you'll need to fix this by yourself.&lt;br /&gt;
&lt;br /&gt;
Make sure that your JAVA_HOME and PATH is set up to use the JDK 8 when building the Robocode application. There is a good guide [https://www.baeldung.com/java-home-on-windows-7-8-10-mac-os-x-linux here].&lt;br /&gt;
&lt;br /&gt;
=== Cloning the Robocode project ===&lt;br /&gt;
&lt;br /&gt;
You need to download the source files for the Robocode project into your PC using Git with this command line:&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/robo-code/robocode.git robocode-proj&lt;br /&gt;
&lt;br /&gt;
This downloads the Robocode source files into a directory named 'robocode-proj' into the current directory.&lt;br /&gt;
&lt;br /&gt;
=== Building the Robocode application ===&lt;br /&gt;
&lt;br /&gt;
Robocode is built by running using Gradle standing in the 'robocode-proj' directory:&lt;br /&gt;
&lt;br /&gt;
    ./gradlew build&lt;br /&gt;
&lt;br /&gt;
This step is required to easy importing the project into IntelliJ IDEA, but also the quickest way to build and test Robocode.&lt;br /&gt;
&lt;br /&gt;
=== Setup Robocode for IntelliJ ===&lt;br /&gt;
&lt;br /&gt;
First, open the 'robocode-project' directory in IntelliJ.&lt;br /&gt;
&lt;br /&gt;
Secondly, set the JDK for the Robocode project, which needs to be JDK 8.&lt;br /&gt;
&lt;br /&gt;
From the menu, select:&lt;br /&gt;
File &amp;gt; Project Structure | Platform Settings | SDKs &amp;gt; + (plus sign) &amp;gt; Add JDK&lt;br /&gt;
&lt;br /&gt;
Select the home directory of your JDK 1.8 installation.&lt;br /&gt;
&lt;br /&gt;
The last step is to align IDEA with the Gradle setup. You do this by running the 'Reload All Gradle Projects', which is available by pressing the &amp;quot;refresh button&amp;quot; with the Gradle tool window in its top-left corner.&lt;br /&gt;
&lt;br /&gt;
=== Run the Robocode application ===&lt;br /&gt;
&lt;br /&gt;
You can run or debug Robocode as soon as Robocode has been set up in IntelliJ. You can launch it from the toolbar with &amp;quot;Robocode app&amp;quot; and press the &amp;quot;play&amp;quot; button for running Robocode or the &amp;quot;bug&amp;quot; button for running Robocode in debugging mode.&lt;br /&gt;
&lt;br /&gt;
=== Build the Installer for Robocode ===&lt;br /&gt;
&lt;br /&gt;
You build the Robocode installer (setup file) using Gradle from the command line:&lt;br /&gt;
&lt;br /&gt;
   ./gradlew build&lt;br /&gt;
&lt;br /&gt;
Gradle puts the installer into /build/robocode-x.x.x.x-setup.jar&lt;br /&gt;
&lt;br /&gt;
=== Setting the version of the Robocode application ===&lt;br /&gt;
&lt;br /&gt;
The version of Robocode can be changed in this file:&lt;br /&gt;
\buildSrc\src\main\kotlin\net.sf.robocode.java-conventions.gradle.kts&lt;br /&gt;
&lt;br /&gt;
Look for a line like this:&lt;br /&gt;
&lt;br /&gt;
    version = &amp;quot;1.9.4.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Robocode developers and contributions ===&lt;br /&gt;
&lt;br /&gt;
Robocode application developers have a discussion group [http://groups.google.com/group/robocode-developers here]. Anybody interested in a discussion or advice about contributing with a feature or modification for Robocode is welcome to this group.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Robocode Documentation]]&lt;br /&gt;
[[Category:Eclipse IDE]]&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Robocode/FAQ&amp;diff=56387</id>
		<title>Robocode/FAQ</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Robocode/FAQ&amp;diff=56387"/>
		<updated>2020-10-25T09:40:32Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Frequently asked questions about Robocode.&lt;br /&gt;
&lt;br /&gt;
== [[Robocode/Download|Installing]] and [[Robocode/Getting Started|using]] ==&lt;br /&gt;
; '''I can't install Robocode.'''&lt;br /&gt;
: Please see  [[Robocode_Download_And_Install|these instructions]].&lt;br /&gt;
&lt;br /&gt;
; '''I get this error when trying to start Robocode: &amp;quot;'JAVA' is not recognized as an internal or external command, operable or batch file&amp;quot;.'''&lt;br /&gt;
: This is caused by an unknown path to your Java installation. Please follow [[Robocode/System_Requirements#PATH_must_be_set|these instructions]].&lt;br /&gt;
&lt;br /&gt;
; '''Can I play Robocode online?'''&lt;br /&gt;
: Robocode is not an &amp;quot;online&amp;quot; game, so you can't, for example, share a battle with your friends in real time over the Internet. But you can upload your bots to places such as GitHub or Dropbox, and join any of the existing competitions such as [https://literumble.appspot.com/ RoboRumble] (enter [[RoboRumble/Enter The Competition|here]]), or organize one with your friends.&lt;br /&gt;
&lt;br /&gt;
;'''What is the difference between a set method like setAhead() and ahead() without the set-prefix?'''&lt;br /&gt;
: The difference between a method like &amp;lt;code&amp;gt;ahead()&amp;lt;/code&amp;gt;, and the method &amp;lt;code&amp;gt;setAhead()&amp;lt;/code&amp;gt; is that set-methods are only available with the AdvancedRobot. The difference is that you can call multiple setters like e.g. &amp;lt;code&amp;gt;setAhead()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;setTurnGunLeft()&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;setFire()&amp;lt;/code&amp;gt; in the same turn. These set commands will first take effect, i.e. execute, when you call the &amp;lt;code&amp;gt;execute()&amp;lt;/code&amp;gt; method explicitly in a turn. Methods that are not setters like e.g. &amp;lt;code&amp;gt;ahead()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;turnGunLeft()&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;fire()&amp;lt;/code&amp;gt; will execute independently and take one to many turns to complete, as one command will need to execute and complete before the next command is being executed. Setters are called in the same turn when &amp;lt;code&amp;gt;execute()&amp;lt;/code&amp;gt; is called. So the method &amp;lt;code&amp;gt;ahead()&amp;lt;/code&amp;gt; is actually the same as &amp;lt;code&amp;gt;setAhead()&amp;lt;/code&amp;gt; + &amp;lt;code&amp;gt;execute()&amp;lt;/code&amp;gt;, and in that order. The set methods can be seen as &amp;quot;fire and forget&amp;quot; methods that are executed immediately, whereas the methods like &amp;lt;code&amp;gt;ahead()&amp;lt;/code&amp;gt; must first complete its movement, turning, firing etc. before the next command is being run. Hence those commands need to wait for the other commands to complete first before the method itself will be executed.&lt;br /&gt;
&lt;br /&gt;
; '''How do I get started?'''&lt;br /&gt;
: See [[Robocode/Getting Started|Getting Started]] and [[Robocode/My First Robot|My First Robot]].&lt;br /&gt;
&lt;br /&gt;
; '''What can robots do?'''&lt;br /&gt;
: Many things. They can [[Movement|move]], turn, scan robots with their [[Radar]], aim their gun and [[Targeting|fire bullets]], and get information about the world around them. See the [http://robocode.sourceforge.net/docs/robocode/ Robocode API].&lt;br /&gt;
&lt;br /&gt;
; '''Should I download robots from the Internet?'''&lt;br /&gt;
: Yes. More robots makes your Robocode experience more fun. See [[Robocode/Downloading Robots|Downloading Robots]].&lt;br /&gt;
&lt;br /&gt;
; '''I have downloaded a robot from the Web, but I don't know how to use it, because it doesn't appear anywhere.'''&lt;br /&gt;
: By default, robots are read from the &amp;lt;code&amp;gt;/robocode/robots&amp;lt;/code&amp;gt; directory. You can select &amp;quot;Robot -&amp;gt; Import Downloaded Robot&amp;quot; to copy a robot JAR to this directory from another location. Also, you can configure Robocode to read robots from additional locations using the Properties dialog.&lt;br /&gt;
&lt;br /&gt;
; '''I have seen that many bots are packaged into &amp;quot;.jar&amp;quot; files. How do I package my bot?'''&lt;br /&gt;
: Select, &amp;quot;Robot -&amp;gt; Package robot for upload&amp;quot; from the menu, then enter your robot's details when prompted. See [[Robocode/Package Robot|Package Robot]].&lt;br /&gt;
&lt;br /&gt;
; '''What do I have to do to see the source code of a robot?'''&lt;br /&gt;
: You can do two things. The first option is to open the Editor Window in Robocode and use the command in the File menu. The second option is to open the robot &amp;quot;.jar&amp;quot; file with a zip utility and find the source code there (assuming, of course, the robot is open source). See [[Robocode/Learning from Robots|Learning from Robots]].&lt;br /&gt;
&lt;br /&gt;
;'''When I test my bots, Robocode is slow. Is there a way to execute the battles faster?'''&lt;br /&gt;
: When you are testing your robot, you want to execute many battles in a short time. Minimize the Robocode main screen to make it execute the battles at full speed.&lt;br /&gt;
&lt;br /&gt;
;'''What is with the star &amp;quot;*&amp;quot; next to my robot's name?'''&lt;br /&gt;
: The asterisk to the right of a robot's name indicates that the robot is a development version, not a [[Robocode/Package Robot|packaged version]].&lt;br /&gt;
&lt;br /&gt;
== [[Robocode/Game Physics|Game physics]] ==&lt;br /&gt;
; '''What are ticks, turns, and frames?'''&lt;br /&gt;
: A tick refers to one unit, which is also called a turn in Robocode. During one turn, you may perform one action as a Robot, or multiple (independent) actions as an AdvancedRobot. A frame is a unit of drawing to the Robocode client interface. If you are processing turns slowly, you will get one frame per tick / turn. However, if you up the turns per second beyond your computer's ability to render the frames, you will miss some frames of animation. This won't affect the robots' behavior, unless you foolishly added code in your &amp;lt;code&amp;gt;onPaint(Graphics2D)&amp;lt;/code&amp;gt; method that alters your bots behavior. In that case, your bot will behave differently depending on whether or not the Paint button has been enabled, and if the framerate can keep up with the turnrate.&lt;br /&gt;
&lt;br /&gt;
; '''Can I fire bullets with power higher than 3.0 or lower than 1.0?'''&lt;br /&gt;
:No and yes. You can't fire bullets with power greater than 3.0, but you can fire bullets with power as low as 0.1. If you call a firing function (i.e. &amp;lt;code&amp;gt;setFire()&amp;lt;/code&amp;gt;) with a value greater than 3.0, Robocode will adjust it to 3.0, and if you call it with a power lower than 0.1 (except 0.0 which will not fire) it will adjust it to 0.1. Additionally, you can fire bullets with power less than 0.1 under one condition: when your robot has less than 0.1 energy left, in which case a bullet is fired with however much energy your robot had left.&lt;br /&gt;
&lt;br /&gt;
: See [http://robocode.sourceforge.net/docs/robocode/robocode/Rules.html#MAX_BULLET_POWER &amp;lt;code&amp;gt;Rules.MAX_BULLET_POWER&amp;lt;/code&amp;gt;] and [http://robocode.sourceforge.net/docs/robocode/robocode/Rules.html#MIN_BULLET_POWER &amp;lt;code&amp;gt;Rules.MIN_BULLET_POWER&amp;lt;/code&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
; '''How fast does a bullet travel?'''&lt;br /&gt;
: A bullet travels at a speed between 11.0 and 19.7 depending on the power. The more powerful the bullet, the slower. The formula to calculate it is &amp;lt;code&amp;gt;velocity = 20 - (3 * power)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
: See [http://robocode.sourceforge.net/docs/robocode/robocode/Rules.html#getBulletSpeed(double) &amp;lt;code&amp;gt;Rules.getBulletSpeed()&amp;lt;/code&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
; '''Does the robot velocity get added to the bullet velocity on firing?'''&lt;br /&gt;
: No, bullet velocity is not affected by robot velocity. It's kind of like the speed-of-light thing.&lt;br /&gt;
&lt;br /&gt;
; '''Are bullets fired from the end of the barrel, or the center of the robot?'''&lt;br /&gt;
: They start at the center of the robot on the tick that you call &amp;lt;code&amp;gt;fire()/setFire()/setFireBullet()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
; '''What is the range of a bullet?'''&lt;br /&gt;
: A bullet has no range. It keeps going until it hits a robot or a wall.&lt;br /&gt;
&lt;br /&gt;
; '''What is the size of a bullet?'''&lt;br /&gt;
: A bullet has no size. Robocode treats them as line segments from one tick to the next.&lt;br /&gt;
&lt;br /&gt;
; '''I want to fire a bullet every turn, but I can't. Why?'''&lt;br /&gt;
: Every time you fire, the gun generates some heat. You must wait till it is cool again to fire. If you give a fire order when your gun is hot, it will do nothing. The heat generated by a shot is &amp;lt;code&amp;gt;1 + (firepower / 5)&amp;lt;/code&amp;gt;. The gun cools down at a default rate of 0.1 per turn (note that you can change this parameter when you run the battle, but nobody usually does). It means you can fire a 3.0 power bullet every 16 ticks.&lt;br /&gt;
&lt;br /&gt;
: See [http://robocode.sourceforge.net/docs/robocode/robocode/Rules.html#getGunHeat(double) &amp;lt;code&amp;gt;Rules.getGunHeat()&amp;lt;/code&amp;gt;] and [http://robocode.sourceforge.net/docs/robocode/robocode/Robot.html#getGunCoolingRate() &amp;lt;code&amp;gt;Robot.getGunCoolingRate()&amp;lt;/code&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
; '''How much damage does a bullet do? How do I gain or lose energy?'''&lt;br /&gt;
: You lose energy every time you hit a wall, you are hit by an enemy bullet, ram an enemy, or you fire your gun. The amount of energy you lose by being hit is &amp;lt;code&amp;gt;4 * bullet power + 2 * max(bullet power - 1 , 0)&amp;lt;/code&amp;gt;. So the maximum amount is 16.0. When you fire, you spend a quantity of energy equal to the power of the bullet fired. When one of your bullets hits an enemy, you collect back &amp;lt;code&amp;gt;3 * bullet power&amp;lt;/code&amp;gt; energy. When you hit an enemy bot, each bot takes 0.6 damage. If an [[AdvancedRobot]] (but not a [[Robot]] or [[JuniorRobot]]) hits a wall, it will take &amp;lt;code&amp;gt;max(abs(velocity) * 0.5 - 1, 0)&amp;lt;/code&amp;gt; damage.&lt;br /&gt;
&lt;br /&gt;
: See [http://robocode.sourceforge.net/docs/robocode/robocode/Rules.html#getBulletDamage(double) &amp;lt;code&amp;gt;Rules.getBulletDamage()&amp;lt;/code&amp;gt;] and [http://robocode.sourceforge.net/docs/robocode/robocode/Rules.html#getBulletHitBonus(double) &amp;lt;code&amp;gt;Rules.getBulletHitBonus()&amp;lt;/code&amp;gt;] and [http://robocode.sourceforge.net/docs/robocode/robocode/Rules.html#getWallHitDamage(double) &amp;lt;code&amp;gt;Rules.getWallHitDamage()&amp;lt;/code&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
; '''Some times I get disabled. What happens?'''&lt;br /&gt;
: You can't kill yourself, so when your energy drops to zero because you hit a wall or you fire, your bot gets disabled. It will not be able to move nor fire. If you are lucky enough and one of your bullets in the air hits an enemy, you will get some energy back and recover from disabled status.&lt;br /&gt;
&lt;br /&gt;
; '''I get disabled, but I my energy &amp;gt; 0. Why?'''&lt;br /&gt;
: There are a few possible causes. You may have called a getXXX() function - such as getVelocity() - too many times a turn. The limit is 10000 getXXX() function calls per turn. To avoid disabling in such situations, either store returned values in variables for future use or use a [[RobotStatus]] object obtained from [[StatusEvent]]. Another case in which you can get disabled is throwing an exception, which may disable your bot, even if you catch the exception. Also, if your bot gets stuck in an infinite (or very long) loop and skips many turns, it may also get disabled.&lt;br /&gt;
&lt;br /&gt;
; '''How fast do I move?'''&lt;br /&gt;
: You can move at a maximum speed of 8.0 units/tick. You can modify (down) your maximum velocity by using &amp;lt;code&amp;gt;setMaxVelocity(...)&amp;lt;/code&amp;gt;. Note that your bot will always accelerate to reach its maximum velocity.&lt;br /&gt;
&lt;br /&gt;
: See [http://robocode.sourceforge.net/docs/robocode/robocode/Rules.html#MAX_VELOCITY &amp;lt;code&amp;gt;Rules.MAX_VELOCITY&amp;lt;/code&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
; '''How fast do I accelerate?'''&lt;br /&gt;
: You accelerate at 1 unit/tick, and you decelerate at 2 units/tick. For example, if you are moving at an speed of 8.0 and reverse your direction your velocities will be [6.0, 4.0, 2.0, 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0].&lt;br /&gt;
&lt;br /&gt;
: See [http://robocode.sourceforge.net/docs/robocode/robocode/Rules.html#ACCELERATION &amp;lt;code&amp;gt;Rules.ACCELERATION&amp;lt;/code&amp;gt;] and [http://robocode.sourceforge.net/docs/robocode/robocode/Rules.html#DECELERATION &amp;lt;code&amp;gt;Rules.DECELERATION &amp;lt;/code&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
; '''How fast do I turn?'''&lt;br /&gt;
: The faster you go, the slower you turn. The formula to calculate it in degrees is &amp;lt;code&amp;gt;10 - 0.75 * abs(velocity)&amp;lt;/code&amp;gt;. The maximum turn rate is 10 degrees/turn.&lt;br /&gt;
&lt;br /&gt;
: See [http://robocode.sourceforge.net/docs/robocode/robocode/Rules.html#getTurnRate(double) &amp;lt;code&amp;gt;Rules.getTurnRate()&amp;lt;/code&amp;gt;] and [http://robocode.sourceforge.net/docs/robocode/robocode/Rules.html#MAX_TURN_RATE &amp;lt;code&amp;gt;Rules.MAX_TURN_RATE&amp;lt;/code&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
; '''What is the size of a bot?'''&lt;br /&gt;
: The size of a bot is 36x36. Note, this is slightly smaller than the image of the bot. It is modeled as a non rotating square, so it's always the same regardless of its heading.&lt;br /&gt;
&lt;br /&gt;
; '''It seems that Robocode doesn't follow standard physics. If my velocity is 0 and I accelerate (acceleration = 1) my final velocity is 1, but it should be 0.5. What happened?'''&lt;br /&gt;
: Time in Robocode, rather than being continuous, is in discrete &amp;quot;ticks&amp;quot;. First acceleration is calculated, then velocity, and then position. So if you are stopped at a position 0 and you accelerate 1, your velocity next turn will be 1 and your position also 1.&lt;br /&gt;
&lt;br /&gt;
; '''How can I detect when an enemy has fired?'''&lt;br /&gt;
: There is no direct way to detect when an enemy fired, but you can deduce it by monitoring the enemy [[energy drop]]. A drop between 0.1 and 3 usually means that it fired a bullet (there can be other reasons, such as a low energy bullet hit or a wall hit). Wall hits are (more or less) detectable as well. A deceleration &amp;gt; 2 means the bot hit a wall (or another bot). A deceleration &amp;lt;= 2 may be simple a bot hitting the brakes, or hitting a wall at velocity = 2, but since hitting a wall at that speed won't cause any damage, you can ignore that. AdvancedRobots take &amp;lt;code&amp;gt;abs(velocity) / 2 - 1 (Never &amp;lt; 0)&amp;lt;/code&amp;gt; damage when hitting a wall, so by detecting (significant) wall-hits and adjusting the enemy drop accordingly, wall hits can be filtered out most of the time. This method fails when the enemy hits another robot.&lt;br /&gt;
&lt;br /&gt;
; '''How can I detect the position and heading of an enemy bullet?'''&lt;br /&gt;
: You can't. There is no way to know it, directly or indirectly. But of course, you can always [[GuessFactor|guess]]...&lt;br /&gt;
&lt;br /&gt;
; '''How fast can I turn my gun?'''&lt;br /&gt;
: The gun turns at 20 degrees per tick.&lt;br /&gt;
&lt;br /&gt;
: See [http://robocode.sourceforge.net/docs/robocode/robocode/Rules.html#GUN_TURN_RATE &amp;lt;code&amp;gt;Rules.GUN_TURN_RATE&amp;lt;/code&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
; '''How fast can I turn my radar?'''&lt;br /&gt;
: It turns 45 degrees per tick.&lt;br /&gt;
&lt;br /&gt;
: See [http://robocode.sourceforge.net/docs/robocode/robocode/Rules.html#RADAR_TURN_RATE &amp;lt;code&amp;gt;Rules.RADAR_TURN_RATE&amp;lt;/code&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
; '''Can I know the heading of the enemy gun/radar?'''&lt;br /&gt;
: No.&lt;br /&gt;
&lt;br /&gt;
; '''Can I specify the initial position of my bot?'''&lt;br /&gt;
: No. The bots are randomly placed in the field at the beginning of each round.&lt;br /&gt;
&lt;br /&gt;
; '''How can I find more information about Robocode's internals?'''&lt;br /&gt;
: The true documentation is the source code. [https://github.com/robo-code/robocode Take a look].&lt;br /&gt;
&lt;br /&gt;
: Tips for navigating through the Robocode codebase:&lt;br /&gt;
:* Robocode internally makes use of [http://picocontainer.com/ picocontainer] to provide [[wikipedia:Dependency Injection|dependency injection]].&lt;br /&gt;
:* The API methods are implemented in the [https://github.com/robo-code/robocode/blob/master/robocode.api/src/main/java/robocode/AdvancedRobot.java &amp;lt;code&amp;gt;AdvancedRobot&amp;lt;/code&amp;gt;] and [https://github.com/robo-code/robocode/blob/master/robocode.api/src/main/java/robocode/Robot.java &amp;lt;code&amp;gt;Robot&amp;lt;/code&amp;gt;] classes. They are wrappers around the [http://robocode.sourceforge.net/docs/robocode/robocode/robotinterfaces/peer/package-summary.html robot peer], which calls into the Robocode core. You can trace the flow of execution from there.&lt;br /&gt;
:* You can find a class' source file given its name through the [https://github.com/blog/793-introducing-the-file-finder GitHub File Finder], by pressing &amp;lt;code&amp;gt;t&amp;lt;/code&amp;gt; anywhere in GitHub.&lt;br /&gt;
:* GitHub's [https://help.github.com/articles/searching-code/ repository code search] is also helpful.&lt;br /&gt;
:* Robocode's [https://github.com/robo-code/robocode/blob/master/versions.md version history] provides useful details about how the program evolved.&lt;br /&gt;
&lt;br /&gt;
== Programming your robot ==&lt;br /&gt;
; '''What is the difference between the setXXX() (e.g. &amp;lt;code&amp;gt;setFire()&amp;lt;/code&amp;gt;) and the XXX() (e.g. &amp;lt;code&amp;gt;fire()&amp;lt;/code&amp;gt;) methods?'''&lt;br /&gt;
: Basically, the setXXX() methods just notify Robocode to take some action at the end of the turn. The XXX()-type methods end the turn when you call them, and they block your robot's thread until the command finishes. Unless you have a good reason, you should almost always use the setXXX() version when writing [[AdvancedRobot|AdvancedRobots]].&lt;br /&gt;
&lt;br /&gt;
; '''How can I avoid my gun/radar turning when my bot turns?'''&lt;br /&gt;
: You can use &amp;lt;code&amp;gt;setAdjustGunForRobotTurn()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt; setAdjustRadarForGunTurn()&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;setAdjustRadarForRobotTurn()&amp;lt;/code&amp;gt; methods to control this. If you call &amp;lt;code&amp;gt;setAdjustGunForRobotTurn()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; setAdjustRadarForGunTurn()&amp;lt;/code&amp;gt;, you don't need to call &amp;lt;code&amp;gt;setAdjustRadarForRobotTurn()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
; '''Why are there two functions for &amp;lt;code&amp;gt;getBearing()&amp;lt;/code&amp;gt; for example - one in radians and one in degrees? Is there any performance gain if I use radians instead of degrees?'''&lt;br /&gt;
: There is no real advantage to using one or the other. Just use the one you prefer. Often, people start using degrees (just because they feel more comfortable with them) and later they switch to radians (because calculations are easier since you can use the built-in Java trigonometric functions). Just remember to use always radians or always degrees; mixing them up is not a good idea.&lt;br /&gt;
&lt;br /&gt;
; '''I need to trace my bots actions and variables. I saw that everybody uses &amp;lt;code&amp;gt;out.println(&amp;quot;...&amp;quot;)&amp;lt;/code&amp;gt;, but where is that printed?'''&lt;br /&gt;
: It prints to the [[Robocode/Robot Console|robot console]]. When you execute the battle, just click on the button on the right of the screen that shows the name of your robot to open its [[Robocode/Robot Console|console]].&lt;br /&gt;
&lt;br /&gt;
; '''How do you get your radar to stay focused on a robot that you have defined as your target?'''&lt;br /&gt;
: You just turn the radar the other way around when you scan the bot. You lock your radar by not turning it 45 degrees, but only the arc needed to stay focused. See the [[Radar]] page for some example code.&lt;br /&gt;
&lt;br /&gt;
; '''How can I know how many enemies are in the battle field?'''&lt;br /&gt;
: You can use the &amp;lt;code&amp;gt;getOthers()&amp;lt;/code&amp;gt; method to know how many live enemies are in the battlefield.&lt;br /&gt;
&lt;br /&gt;
; '''I'm trying to recognize an enemy/teammate from its name (using &amp;lt;code&amp;gt;e.getName()&amp;lt;/code&amp;gt;) but the condition always fails. What's happening?'''&lt;br /&gt;
: Because of Java's funky way of interpreting references to Strings (not to mention a lack of operator overloading), you can't use an expression like &amp;lt;code&amp;gt;if (e.getName() == testname)&amp;lt;/code&amp;gt; to check for equality. You have to use the &amp;lt;code&amp;gt;String.equals()&amp;lt;/code&amp;gt; method, as in &amp;lt;code&amp;gt;if (e.getName().equals(testname))&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
; '''How do I keep data from round to round and battle to battle?'''&lt;br /&gt;
: The easiest way is to save data between rounds of a battle is to make the variables in the bot class static. Because Robocode uses a separate classloader for every robot, the variables will not conflict even when you have more than one copy of a robot in a battle. Note that this will save data between ''rounds'', not between ''battles''. To save between battles you will have to save to a file. The maximum allowed disk space for files is 200k. Look at the [[:Category:Robocode API|Robocode API]] for more details.&lt;br /&gt;
&lt;br /&gt;
; '''I get the following message when I run my bot, and I don't know how to solve it.'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SYSTEM: You have made 10000 calls to getXX methods without calling execute()&lt;br /&gt;
SYSTEM: Robot disabled: Too many calls to getXX methods.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
: Robocode prevents you from calling functions like &amp;lt;code&amp;gt;getX()&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;getVelocity()&amp;lt;/code&amp;gt; too many times during a single tick. So if you are using them in a long loop, it will raise this error. Actually, 95% of the time, this error is a symptom of an infinite loop in your bot. If you know you have a long-but-finite loop and you get this error, either just assign the values you want to use to a variable or use a [[RobotStatus]] object obtained from [[StatusEvent]].&lt;br /&gt;
&lt;br /&gt;
; '''I'm using &amp;lt;code&amp;gt;bulletObject = setFireBullet(power)&amp;lt;/code&amp;gt; to fire, and then I want to get the bullet coordinates. But when I try to print them using &amp;lt;code&amp;gt;System.out.println(bulletObject.getX() + bulletObject.getY())&amp;lt;/code&amp;gt; I get an error. What's wrong?'''&lt;br /&gt;
: &amp;lt;code&amp;gt;setFireBullet()&amp;lt;/code&amp;gt; creates a Bullet object, but the bullet doesn't actually leave your bots gun until the next tick, so you can't do &amp;lt;code&amp;gt;getX()&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;getY()&amp;lt;/code&amp;gt; on the bullet until then. If you change it to &amp;lt;code&amp;gt;fireBullet()&amp;lt;/code&amp;gt; you should be OK, because the function won't return until the bullet is in the air. If &amp;lt;code&amp;gt;fireBullet()&amp;lt;/code&amp;gt; won't work for you, you'll have to devise another method of making sure that you don't do &amp;lt;code&amp;gt;getX()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;getY()&amp;lt;/code&amp;gt; on bullets until the turn after you fire. For example, you could store Bullets in an ArrayList, and print out their coordinates before you fire in your main loop, so that a given bullet will be added to the vector on one turn, but won't be accessed until the next turn when your main loop starts over. Alternatively, your bot can attempt to predict/simulate it's own location on the next tick, to know where the bullet will be created.&lt;br /&gt;
&lt;br /&gt;
; '''I want to reverse my direction when my movement is about to finish. I use something like &amp;lt;code&amp;gt;if (getDistanceRemaining() &amp;lt; minimum)&amp;lt;/code&amp;gt;, but the bot behaves in a strange way.'''&lt;br /&gt;
: The &amp;lt;code&amp;gt;getDistanceRemaining()&amp;lt;/code&amp;gt; method (and in general all methods returning remaining movements of the body, gun, or radar) can return a positive or a negative value, depending on the direction of your movement. Use &amp;lt;code&amp;gt;if (Math.abs(getGetDistanceRemaining()) &amp;lt; minimum)&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
&lt;br /&gt;
[[File:AbsoluteRelativeAngles.png|thumb|300px|Absolute and relative angles in Robocode]]&lt;br /&gt;
; '''What are the [http://robocode.sourceforge.net/docs/robocode/robocode/util/Utils.html &amp;lt;code&amp;gt;robocode.Utils&amp;lt;/code&amp;gt; angle normalization methods]?'''&lt;br /&gt;
: In Robocode, relative angles (-180° to 180°) are commonly used as inputs to &amp;lt;code&amp;gt;setTurnGunRight()&amp;lt;/code&amp;gt; and other such robot control methods. Normalizing them is often used as an optimization – for instance, there is no point of turning the gun 270° if you can turn it -90° instead; that saves 9 ticks. The method [http://robocode.sourceforge.net/docs/robocode/robocode/util/Utils.html#normalRelativeAngleDegrees(double) &amp;lt;code&amp;gt;Utils.normalRelativeAngleDegrees()&amp;lt;/code&amp;gt;] is used to normalize relative angles. Similarly, absolute angles (0° to 360°) can be normalized with [http://robocode.sourceforge.net/docs/robocode/robocode/util/Utils.html#normalAbsoluteAngleDegrees(double) &amp;lt;code&amp;gt;Utils.normalAbsoluteAngleDegrees()&amp;lt;/code&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
; '''My trigonometric calculations get very strange results. What is wrong?'''&lt;br /&gt;
: Normal trigonometry is counterclockwise (the angle increases to the left) but in Robocode it is clockwise (the angle increases to the right). It means that you cannot directly apply the normal trigonometric formulas to Robocode. Essentially, it means you must use &amp;lt;code&amp;gt;Math.sin()&amp;lt;/code&amp;gt; where you would normally use &amp;lt;code&amp;gt;Math.cos()&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;Math.cos()&amp;lt;/code&amp;gt; where you would normally use &amp;lt;code&amp;gt;Math.sin()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
; '''How do I find the absolute angle between two coordinates?'''&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;double angle = Math.atan2(x2 - x1, y2 - y1);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; '''How do I calculate the distance between two coordinates?'''&lt;br /&gt;
: With this code (make sure to import &amp;lt;code&amp;gt;java.awt.geom.Point2D&amp;lt;/code&amp;gt;):&lt;br /&gt;
: &amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;double distance = Point2D.distance(x1, y1, x2, y2);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
: Alternatively, if you're doing this only to compare distances, &amp;lt;code&amp;gt;Point2D.distanceSq()&amp;lt;/code&amp;gt; is a little faster as skips the square root calculation.&lt;br /&gt;
&lt;br /&gt;
; '''How to I drive to a certain point?'''&lt;br /&gt;
: See the [[GoTo]] page for code examples.&lt;br /&gt;
&lt;br /&gt;
; '''How do I do [some other thing that sounds incredibly basic]?'''&lt;br /&gt;
: Every one of the top bots has a general utility class somewhere in its code. Take a look.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
{{RobocodeDocsList}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Robocode Documentation]]&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Robocode/Eclipse/Create_a_Project&amp;diff=55683</id>
		<title>Robocode/Eclipse/Create a Project</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Robocode/Eclipse/Create_a_Project&amp;diff=55683"/>
		<updated>2019-05-29T19:37:39Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: /* New Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Youtube|3qOoDuGkwco|Creating an Eclipse Robocode Project}}&lt;br /&gt;
&lt;br /&gt;
In order to build a [[Robocode]] robot in [http://www.eclipse.org/ Eclipse], we first have to create a '''Project''' to store them in. This page will assist you in setting that up.&lt;br /&gt;
&lt;br /&gt;
== Creating a Project for your Robots ==&lt;br /&gt;
First, select File-&amp;gt;New-&amp;gt;Project in the menu.&lt;br /&gt;
&lt;br /&gt;
[[Image:Eclipse-FileNewProject.png|Shows how to select a new project from the File menu in Eclipse]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the '''New Project''' dialog, select '''Java Project''' then click Next.&lt;br /&gt;
&lt;br /&gt;
[[Image:Eclipse-NewProjectWizard.png|Shows a dialog for creating a new project by selecting a wizard]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type in a name for your project. A project can contain just one robot or many robots, so choose a name to suit your plans. Here 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'''. &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;''But do not click '''Finish''' yet!''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[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]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Oops! I clicked '''Finish'''. What to do? ===&lt;br /&gt;
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'''.&lt;br /&gt;
&lt;br /&gt;
== New Project ==&lt;br /&gt;
Select the '''Libraries''' tab, then click on '''Add External JARs''':&lt;br /&gt;
&lt;br /&gt;
[[Image:Eclipse-NewProjectAddExtJars.png|Shows that the &amp;quot;Libraries&amp;quot; tab must be selected and then the &amp;quot;Add External Jars...&amp;quot; on the pane with Java Settings in the New Java Project dialog]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Browse to the robocode directory, select the '''libs''' directory and then click the '''Open'''.&lt;br /&gt;
&lt;br /&gt;
[[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 &amp;quot;Open&amp;quot; button]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next, select the '''robocode.jar''' and then click the '''Open'''.&lt;br /&gt;
&lt;br /&gt;
[[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 &amp;quot;Open&amp;quot; button]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you must select the '''Javadoc location: (None)''' under '''robocode.jar''' and click '''Edit...'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Eclipse-NewProjectEditJavadocLocation.png|Shows that the &amp;quot;Javadoc location: (None)&amp;quot; line under &amp;quot;robocode.jar&amp;quot; must be selected and then the &amp;quot;Edit...&amp;quot; in the New Java Project dialog]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
[[Image:Eclipse-RobocodeJavadocURL.png|Shows a dialog where the user must specify the URL of the Javadoc location path of Robocode]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click '''OK''', then click '''Finish''' to build your project.&lt;br /&gt;
&lt;br /&gt;
Congratulations! Your new project is ready. :-)&lt;br /&gt;
&lt;br /&gt;
== Note about module-info.java ==&lt;br /&gt;
Please note that the newest versions of Eclipse will ask if you want to create a module-info.java file.&lt;br /&gt;
If you get this question, you should select &amp;quot;Don't create&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''If you by mistake create a module-info.java, then you should make sure to delete it to avoid compiler and classpath issues.''' The module-info.java is not used for Robocode packages.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* [http://www.eclipse.org/ Eclipse.org - Eclipse home page]&lt;br /&gt;
* [http://www.eclipse.org/downloads/ Eclipse Downloads]&lt;br /&gt;
* [http://download.eclipse.org/eclipse/downloads/ Eclipse project downloads - latest releases]&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
=== Using Eclipse IDE ===&lt;br /&gt;
* [[Robocode/Eclipse|Using Eclipse as IDE]]&lt;br /&gt;
* [[Robocode/Add_a_Robot_Project|Add robot project from an IDE into Robocode]]&lt;br /&gt;
* [[Robocode/Eclipse/Create_a_Robot|Creating a robot in Eclipse]]&lt;br /&gt;
* [[Robocode/Running from Eclipse|Running your robot from Eclipse]]&lt;br /&gt;
* [[Robocode/Eclipse/Debugging Robot|Debugging your robot with Eclipse]]&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>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Thread:Talk:RoboRumble/Upgrade_client_version/reply_(33)&amp;diff=55083</id>
		<title>Thread:Talk:RoboRumble/Upgrade client version/reply (33)</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Thread:Talk:RoboRumble/Upgrade_client_version/reply_(33)&amp;diff=55083"/>
		<updated>2018-11-06T22:03:56Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: Reply to Upgrade client version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Your pull request has now been merged and I have assembled and put a beta version here:&lt;br /&gt;
https://robocode.sourceforge.io/files/robocode-1.9.3.4-Beta-setup.jar&lt;br /&gt;
&lt;br /&gt;
If you are satisfied with this version, I will make the release. :-)&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Thread:Talk:RoboRumble/Upgrade_client_version/reply_(30)&amp;diff=55072</id>
		<title>Thread:Talk:RoboRumble/Upgrade client version/reply (30)</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Thread:Talk:RoboRumble/Upgrade_client_version/reply_(30)&amp;diff=55072"/>
		<updated>2018-10-28T19:42:36Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: Reply to Upgrade client version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Codesize 1.2 for Java 7, 8, 9 (Experimental) is ready.&lt;br /&gt;
&lt;br /&gt;
Do we need to fix other stuff for RoboRumble before I make another release?&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=55057</id>
		<title>Robocode/Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=55057"/>
		<updated>2018-10-19T23:51:40Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: /* How to build distribution files? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide describes how to build the Robocode application, i.e. the game itself, and not how to build bots for Robocode.&lt;br /&gt;
&lt;br /&gt;
== Developer's Guide for building Robocode with Eclipse setup ==&lt;br /&gt;
&lt;br /&gt;
=== Notice ===&lt;br /&gt;
&lt;br /&gt;
This guide is intended for experienced Java developers, who want to work on the Robocode application, and describes all basic stuff required to compile and run Robocode within the [http://www.eclipse.org Eclipse] IDE.&lt;br /&gt;
&lt;br /&gt;
If you just need to browse the sources, you can do it from [https://github.com/robo-code/robocode here] or you can download the zipped sources from [http://sourceforge.net/projects/robocode/files/robocode%20sources/ here].&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Basically, all you need to get started with building Robocode is:&lt;br /&gt;
&lt;br /&gt;
* Oracle JDK 8 ([https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html Java SE Development Kit 8 Downloads]). Note that only version 6, 7, and 8 will work. Newer versions are not supported (yet) and are almost guaranteed to cause building problems.&lt;br /&gt;
* Source files for Robocode ([https://github.com/robo-code/robocode on GitHub]), which you get by doing a Git clone.&lt;br /&gt;
* An Internet connection.&lt;br /&gt;
&lt;br /&gt;
Other than that, you need to be a skilled Java developer in order to figure out how Robocode is put together. Robocode is a complex application and requires a big effort to grasp and understand. There is practically no documentation available that describe the internal logic, architecture, game rules, coding conventions etc. So you will probably be on your own when trying to figure out how Robocode it put together.&lt;br /&gt;
&lt;br /&gt;
An Internet connection is required for building Robocode distribution files as the build tool (Maven) needs access to [http://maven.apache.org/guides/introduction/introduction-to-repositories.html remote repositories], which contains various libraries and binaries. Some libraries are used for building Robocode, and others are used for running Robocode, and hence need to be put into the distribution files.&lt;br /&gt;
In order to get updates to the sources of Robocode when new versions emerge, an Internet connection is also critical to download changed sources and merge the changes with your version of the sources etc.&lt;br /&gt;
&lt;br /&gt;
Note that all sources of Robocode are for Java 6, meaning that Robocode is able to run on very old Java versions, which is intentional.&lt;br /&gt;
&lt;br /&gt;
==== Installing the JDK ====&lt;br /&gt;
&lt;br /&gt;
Robocode is being developed using Oracle's Java SE, and requires the Java Developer Kit ('''JDK'''), minimum version 6, to be pre-installed on the system used for building Robocode. Please note that a Java Runtime Environment ('''JRE''') is not enough as it does not contain the required developer tools needed for building Robocode. Currently, the Oracle JDK version 8 is recommended for building Robocode.&lt;br /&gt;
&lt;br /&gt;
Notice that when installing the JDK, it is highly recommended that you '''install the sources provided for Java''' as the sources are very useful when debugging Robocode. However, this is not a requirement.&lt;br /&gt;
&lt;br /&gt;
==== Setting up Java Environment Variables ====&lt;br /&gt;
&lt;br /&gt;
You must set up the environment variable named '''JAVA_HOME''' and extend another environment variable named '''PATH'''. You find information on how to setup JAVA_HOME and PATH on the net, e.g. [https://docs.oracle.com/cd/E19182-01/821-0917/inst_jdk_javahome_t/index.html here].&lt;br /&gt;
&lt;br /&gt;
'''JAVA_HOME must be set up point to the root directory of the JDK you intend to use.'''&lt;br /&gt;
&lt;br /&gt;
The PATH environment variable must be extended in order to locate the Java commands like 'java', 'javac' and lots of other tools in the JDK. Extending PATH is considered best practice when setting up the Java development environment, and makes it possible for other tools like e.g. Maven to locate the proper JDK tools. It also makes it possible for you to detirmine which JRE that is being used when running a Java application by writting &amp;lt;code&amp;gt;java -version&amp;lt;/code&amp;gt; in the command-line/shell, and detirmine which Java compiler that is being used by writting &amp;lt;code&amp;gt;javac -version&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
&lt;br /&gt;
'''Windows:'''&lt;br /&gt;
* JAVA_HOME is set to e.g. &amp;lt;code&amp;gt;JAVA_HOME=&amp;quot;C:\Program Files\Java\jdk1.8.0_162&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* PATH is extended, e.g. to &amp;lt;code&amp;gt;PATH=%JAVA_HOME%\bin;PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Linux / *nix:'''&lt;br /&gt;
* JAVA_HOME is set by e.g. &amp;lt;code&amp;gt;export JAVA_HOME=/usr/java/jdk1.8.0_162/bin/java&amp;lt;/code&amp;gt;. (Bash)&lt;br /&gt;
* PATH is extended, e.g. by &amp;lt;code&amp;gt;export PATH=$JAVA_HOME/bin:$PATH&amp;lt;/code&amp;gt;. (Bash)&lt;br /&gt;
&lt;br /&gt;
'''Mac OS X:'''&lt;br /&gt;
* JAVA_HOME is set by e.g. &amp;lt;code&amp;gt;export JAVA_HOME=$(/usr/libexec/java_home)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* PATH is extended, e.g. by &amp;lt;code&amp;gt;export PATH=${JAVA_HOME}/bin:$PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you want more information on how to set up your JAVA_HOME and PATH environment variables for your specific OS, please read the installation notes provided for the Oracle JDK here:&lt;br /&gt;
&lt;br /&gt;
'''Installation instructions from Oracle:'''&lt;br /&gt;
* [https://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html JDK 8 and JRE 8 Installation Start Here].&lt;br /&gt;
* [https://www.oracle.com/technetwork/java/javase/certconfig-2095354.html Oracle JDK 8 and JRE 8 Certified System Configurations Contents] for ''all'' supported systems.&lt;br /&gt;
&lt;br /&gt;
==== Required technical skills? ====&lt;br /&gt;
&lt;br /&gt;
In order to develop on Robocode, you need to know the basics of these tools:&lt;br /&gt;
&lt;br /&gt;
* Git and GitHub ([http://www.vogella.com/articles/Git/article.html Tutorial])&lt;br /&gt;
* Maven ([http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html Tutorial])&lt;br /&gt;
* Eclipse IDE ([http://www.vogella.com/articles/Eclipse/article.html Tutorial])&lt;br /&gt;
&lt;br /&gt;
Notice that you do not have to be an expert in Git/GitHub, Maven, or Eclipse. But you need some basic knowledge about these tools to understand how to build Robocode. In fact, trying to build Robocode might actually be a very good way of learning these tools, if you don't know them already or miss some practical experience with these. :-)&lt;br /&gt;
&lt;br /&gt;
Eclipse is not required for building Robocode, meaning that you are free to use any IDE of your choice. However, all set up for building Robocode has primarily been focused on Eclipse, and the same goes for this guide. If you manage to setup Robocode for e.g. IntelliJ IDEA or any other IDE, you are welcome to write a guide for how to set up Robocode for your particular IDE as other developers might be very interested in using the same IDE.&lt;br /&gt;
&lt;br /&gt;
All sources of Robocode are available at [https://github.com/robo-code/robocode GitHub]. At GitHub, you can download sources as a zipped file or create your own [https://help.github.com/articles/fork-a-repo fork], if you want to.&lt;br /&gt;
&lt;br /&gt;
In order to get build Robocode, Maven must be installed on your system. At present day, Maven 3.5.4 is the newest version and is able to build Robocode. Read more about how to install Maven [https://maven.apache.org/install.html here]. Note that the [https://github.com/takari/maven-wrapper Maven Wrapper] is being used by Robocode. Hence, you must run this Maven command from a command prompt or shell inside the your root directory for Robocode:&lt;br /&gt;
&lt;br /&gt;
  mvn -N io.takari:maven:wrapper -Dmaven=3.5.4&lt;br /&gt;
&lt;br /&gt;
This will create the Maven Wrapper files for you guaranteed to run as Maven version 3.5.4, even if you might have a newer Maven installed on your system. You'll get a directory named &amp;quot;.mvn&amp;quot; and these two script files &amp;quot;mvnw&amp;quot; and &amp;quot;mvnw.cmd&amp;quot;. You build Robocode by using the mvnassembly.sh or mvnassembly.cmd files, which makes use of the Maven Wrapper.&lt;br /&gt;
&lt;br /&gt;
You don't have to worry too much about how to set up Eclipse for Robocode as the provided sources contain all configuration files needed for Eclipse. Some of these files are generated using Maven's built-in support for Eclipse. However, you will need to do some basic pre-configuration of Eclipse before you'll be able to get started with working on Robocode. You should only need to set up a workspace for Robocode once. However, you will need to update the sources from the remote repository on GitHub once in a while, and merge changes with your sources in order to keep up-to-date with the current versions of Robocode, i.e. the origin/head of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
=== Getting sources from GitHub ===&lt;br /&gt;
&lt;br /&gt;
In the following, I assume that you want to '''Git clone''' the sources from GitHub using a [http://git-scm.com/downloads Git client]. This could be one of the Git GUI Clients (git-gui) recommended [http://git-scm.com/downloads/guis here].&lt;br /&gt;
You don't necessarily need a Git client for building Robocode, as you could simply download the sources as a plain .zip file from either [https://github.com/robo-code/robocode/archive/master.zip GitHub] or [https://sourceforge.net/projects/robocode/files/robocode%20sources/ SourceForge]. However, if you want to regularly update your local source files with the newest sources from the Git repository and the ability to commit and/or merge or fork changes, you will need to use a Git client.&lt;br /&gt;
&lt;br /&gt;
The URL of the sources at GitHub is:&lt;br /&gt;
[https://github.com/robo-code/robocode.git https://github.com/robo-code/robocode.git]&lt;br /&gt;
&lt;br /&gt;
==== How to build distribution files? ====&lt;br /&gt;
&lt;br /&gt;
In order to build the distribution files containing the installer setup file (robocode-x.x.x-setup.jar) and a .zip file containing all the sources (robocode-x.x.x-src.zip) you must call the '''mvnassembly''' script from the command-line when standing within the root directory of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvnassembly&lt;br /&gt;
&lt;br /&gt;
On *nix:&lt;br /&gt;
  ./mvnassembly.sh&lt;br /&gt;
&lt;br /&gt;
This will build the distribution files, which will be put into the sub-directory named ''robocode.distribution/target''.&lt;br /&gt;
&lt;br /&gt;
'''mvnassembly''' is a script that compiles all sources of the Robocode game, creates javadoc html files, run test units, and finally creates the target distribution files. The first time this script is run, it will need to download a huge amount of .jar files from various Maven repositories and which contains Maven plugins etc. used for building Robocode. So please be patient with it the first time.&lt;br /&gt;
&lt;br /&gt;
==== Robocode plugins ====&lt;br /&gt;
&lt;br /&gt;
Two plugins exist for Robocode:&lt;br /&gt;
* Testing plugin, which contains the testbed for testing bots.&lt;br /&gt;
* .NET plugin, which makes it possible to run bots compiled for .NET, and packaged as .dll files.&lt;br /&gt;
&lt;br /&gt;
Hence, a new Robot feature in Robocode should take the .NET plugin into account, as the .NET-based robots must behave the same way as the Java-based robots.&lt;br /&gt;
Building the .NET plugin is a requires a big setup, and is described in a ReadMe.txt file within the source code for the .NET plugin (/plugins/dotnet).&lt;br /&gt;
&lt;br /&gt;
=== Setting up Eclipse for developing on Robocode ===&lt;br /&gt;
&lt;br /&gt;
Here follows a description of how to setup Eclipse for developing on Robocode.&lt;br /&gt;
&lt;br /&gt;
==== Software Requirements for Eclipse IDE ====&lt;br /&gt;
&lt;br /&gt;
Here follows the recommended software needed to start developing on Robocode with the Eclipse IDE:&lt;br /&gt;
&lt;br /&gt;
'''Required:'''&lt;br /&gt;
* Oracle JDK 6 ([http://www.oracle.com/technetwork/java/javase/downloads/index.html download]) must be pre-installed.&lt;br /&gt;
* Eclipse IDE for Java Developers([http://www.eclipse.org/downloads/ download]). The Juno, Kepler, Luna works fine for Robocode and supports Git.&lt;br /&gt;
&lt;br /&gt;
Please consult the [http://wiki.eclipse.org/Eclipse/Installation#Install_a_JVM installation notes] provided for Eclipse in order to find out how to install Eclipse for your specific OS.&lt;br /&gt;
&lt;br /&gt;
==== Create a workspace for Robocode ====&lt;br /&gt;
&lt;br /&gt;
When you have setup and installed Eclipse on your system (if you did not have it on your system already), a workspace must be created for Robocode.&lt;br /&gt;
&lt;br /&gt;
The first time you start up a newly installed Eclipse, it will ask for a directory for your workspace. I suggest that you create a workspace named '''robocode-workspace''' or similar and create the workspace on a partition or directory like e.g. &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; (on Windows) or &amp;lt;code&amp;gt;~&amp;lt;/code&amp;gt; (on Linux) - or any other directory of your choice. If you have already got a workspace, e.g. the default one suggested by Eclipse, you can create a new workspace if you wish by selecting 'File' -&amp;gt; 'Switch Workspace' -&amp;gt; 'Other...' from the menu.&lt;br /&gt;
&lt;br /&gt;
==== M2_REPO class path variable ====&lt;br /&gt;
&lt;br /&gt;
One of the first things you need to do in Eclipse is to set up the '''M2_REPO''' class path variable for Eclipse, which points to your local Maven 2 repository. That is, Eclipse uses the M2_REPO class path variable for locating the Maven repository containing various libraries used for compiling Robocode etc. But before you can setup the M2_REPO class path in Eclipse, you must run the 'mvnassembly' command described earlier if you have not already done that.&lt;br /&gt;
&lt;br /&gt;
When calling the 'mvnassembly' script or alternatively start off Maven within the root of the robocode sources by calling e.g. 'mvn clean install', Maven will download all required libraries from other sites into your local Maven repository. Note that you will need to locate your local Maven repository. Under Windows your Maven repository is put into your %USERPROFILE% directory, and on Linux is put into your home directory (~). The Maven repository will be put under .m2/repository.&lt;br /&gt;
&lt;br /&gt;
To setup the M2_REPO class path in Eclipse, you must go to the menu bar and select 'Window' -&amp;gt; 'Preferences'. On the Preferences window expand the 'Java' -&amp;gt; 'Build Path' and select the 'Classpath Variables'. On the page for the Classpath Variables, you click on the 'New...' button, and enter M2_REPO as name. Next, you click on the 'Folder...' button and navigate to where you have your .m2/repository directory located (in %USERPROFILE% under Windows, and ~ under Linux), e.g. &amp;lt;code&amp;gt;C:/Users/Flemming/.m2/repository&amp;lt;/code&amp;gt; (Windows) or &amp;lt;code&amp;gt;/home/fnl/.m2/repository&amp;lt;/code&amp;gt; (Linux).&lt;br /&gt;
&lt;br /&gt;
When Eclipse asks you if it should rebuild the workspace, you select 'Yes'.&lt;br /&gt;
&lt;br /&gt;
==== Configure JDK for your workspace ====&lt;br /&gt;
&lt;br /&gt;
You must setup which JDK that will be used for compiling (and running) Robocode in your workspace.&lt;br /&gt;
You do this by...&lt;br /&gt;
# selecting Window -&amp;gt; Preferences from the menu, and then unfold and select Java -&amp;gt; Installed JREs and press 'Add...' on the 'Installed JREs' page.&lt;br /&gt;
# Select 'Standard VM' on the 'JRE Type' page and press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# Press the 'Directory...' button and browse to where you have installed your JDK 6 and press 'Finish' or Enter. Make sure to select a JDK and ''not'' a JRE, as a JRE is not sufficient as it lacks the tools available with the JDK.&lt;br /&gt;
# When you get back to the 'Installed JREs' page, make sure to put a check mark in the JDK you just added and press 'OK' or Enter.&lt;br /&gt;
&lt;br /&gt;
==== Importing sources of Robocode using Git ====&lt;br /&gt;
&lt;br /&gt;
Importing the projects for Robocode into Eclipse from Git can be done from the Package Explorer, which can be opened from the menu by selecting Window -&amp;gt; Show View -&amp;gt; Package Explorer or by using the keyboard shortcut by pressing Alt+Shift+Q and P. In the Package Explorer, you...&lt;br /&gt;
&lt;br /&gt;
# Right-click the mouse and select 'Import...' in the popup menu that occurs.&lt;br /&gt;
# Unfold 'Git' in the 'Import' window and double-click 'Projects from Git'.&lt;br /&gt;
# On the 'Import Projects from Git' you select 'URI'.&lt;br /&gt;
# On the next page named 'Source Git Repository' to enter '''https://github.com/robo-code/robocode.git''' into the 'URI:' text field and press Enter or 'Next &amp;gt;'.&lt;br /&gt;
# On the 'Branch Selection' page you press 'Deselect All' and select the branch you want to work on. This would normally be 'master', which is the master branch of Robocode. When the branch selection is made, you press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# On the 'Local Destination' page, you must note the directory where your local files will be put. I recommend you use the directory suggested by Git (Eclipse) and press 'Finish' or Enter.&lt;br /&gt;
# On the 'Select a wizard to use for importing projects', make sure 'Import existing projects' is selected and press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# On 'Import Projects', you should deselect the first project named 'plugins' as you would normally not want to develop on plugins for Robocode - otherwise just omit deselecting 'plugins'. Press 'Finish' or Enter.&lt;br /&gt;
# All Robocode projects will now be imported into Eclipse and be visible in the Package Explorer.&lt;br /&gt;
# Now, select all projects (press Ctrl+A) and right-click the Package Explorer and select Replace With -&amp;gt; HEAD Revision on the popup menu that occurs, and press 'OK' or Enter to discard local changes on the dialog that appears.&lt;br /&gt;
&lt;br /&gt;
Congratulations, you should now be able to get started working on the Robocode sources in Eclipse. :-)&lt;br /&gt;
&lt;br /&gt;
==== Launch Robocode ====&lt;br /&gt;
&lt;br /&gt;
Before launching Robocode for the first time, you should make sure that it is cleaned and compiled first. You do this by selecting Project -&amp;gt; Clean... from the menu. You should also make sure that you have run the 'mvnassembly' described previously, which will download and update your local Maven repository, which is necessary for compiling and running Robocode.&lt;br /&gt;
&lt;br /&gt;
Please notice that it might be necessary to refresh the sources in Eclipse when files are changed outside the Eclipse editor, which is the case when running the 'mvnassembly' script. You can do this from the Package Explorer by right-clicking in this and select 'Refresh'.&lt;br /&gt;
&lt;br /&gt;
In order to start running or debugging Robocode, you should select the &amp;quot;Bug&amp;quot; (debug) or &amp;quot;Play&amp;quot; (run) button in the top of Eclipse under the menu. You should press the little arrow beside these green buttons in order to choose among: Robocode, RoboRumble, TeamRumble, and MeleeRumble. The 3 last ones are for running the RoboRumble@Home clients.&lt;br /&gt;
&lt;br /&gt;
==== How to run the unit tests? ====&lt;br /&gt;
&lt;br /&gt;
When you want to run the unit test from within Eclipse, you must do this from the the Package Explorer, where you right-click on the 'robocode.tests' project and select 'Run As' -&amp;gt; 'JUnit Test'. Now all available unit tests will run automatically.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can start the tests from the command-line by standing on your robocode workspace, and write the following Maven command.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvn test install&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  ./mvn.sh test install&lt;br /&gt;
&lt;br /&gt;
=== Robocode developers and contributions ===&lt;br /&gt;
&lt;br /&gt;
Robocode developers have discussion group at robocode-developers@googlegroups.com. Everybody interested in discussion about future of Robocode are welcome. We also welcome your contributions there. The discussion group is located here: http://groups.google.com/group/robocode-developers.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Robocode/Old Developers Guide for building Robocode|Old version]] of the Developer's Guide for building Robocode for Robocode versions prior to version 1.7.&lt;br /&gt;
* [http://code.google.com/p/robocode/source/browse/ Browse the sources] of Robocode.&lt;br /&gt;
* [http://sourceforge.net/project/showfiles.php?group_id=37202&amp;amp;package_id=218677 Download the sources] of Robocode.&lt;br /&gt;
* [http://groups.google.com/group/robocode-developers Robocode developers discussion group].&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* The [http://sourceforge.net/projects/robocode Robocode project] on SourceForge.&lt;br /&gt;
* [http://sourceforge.net/svn/?group_id=37202 How to access] the SVN Repository for Robocode.&lt;br /&gt;
* [http://www.eclipse.org/ Eclipse] - an open development platform supported by Robocode.&lt;br /&gt;
* [http://maven.apache.org/ Apache Maven] used for building Robocode.&lt;br /&gt;
* [http://maven.apache.org/guides/mini/guide-ide-eclipse.html Guide] to using Eclipse with Maven 2.x.&lt;br /&gt;
* [http://www.eclipse.org/subversive/ Eclipse Subversive] is a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://subclipse.tigris.org/ Subclipse] is also a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://tortoisesvn.net TortoiseSVN], a Subversion client for Windows.&lt;br /&gt;
* [http://www.open.collab.net/downloads/subversion/ CollabNets Subversion], a Subversion client for both Windows and Linux.&lt;br /&gt;
&lt;br /&gt;
[[Category:Robocode Documentation]]&lt;br /&gt;
[[Category:Eclipse IDE]]&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=55056</id>
		<title>Robocode/Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=55056"/>
		<updated>2018-10-19T23:42:50Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: /* Getting sources from GitHub */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide describes how to build the Robocode application, i.e. the game itself, and not how to build bots for Robocode.&lt;br /&gt;
&lt;br /&gt;
== Developer's Guide for building Robocode with Eclipse setup ==&lt;br /&gt;
&lt;br /&gt;
=== Notice ===&lt;br /&gt;
&lt;br /&gt;
This guide is intended for experienced Java developers, who want to work on the Robocode application, and describes all basic stuff required to compile and run Robocode within the [http://www.eclipse.org Eclipse] IDE.&lt;br /&gt;
&lt;br /&gt;
If you just need to browse the sources, you can do it from [https://github.com/robo-code/robocode here] or you can download the zipped sources from [http://sourceforge.net/projects/robocode/files/robocode%20sources/ here].&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Basically, all you need to get started with building Robocode is:&lt;br /&gt;
&lt;br /&gt;
* Oracle JDK 8 ([https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html Java SE Development Kit 8 Downloads]). Note that only version 6, 7, and 8 will work. Newer versions are not supported (yet) and are almost guaranteed to cause building problems.&lt;br /&gt;
* Source files for Robocode ([https://github.com/robo-code/robocode on GitHub]), which you get by doing a Git clone.&lt;br /&gt;
* An Internet connection.&lt;br /&gt;
&lt;br /&gt;
Other than that, you need to be a skilled Java developer in order to figure out how Robocode is put together. Robocode is a complex application and requires a big effort to grasp and understand. There is practically no documentation available that describe the internal logic, architecture, game rules, coding conventions etc. So you will probably be on your own when trying to figure out how Robocode it put together.&lt;br /&gt;
&lt;br /&gt;
An Internet connection is required for building Robocode distribution files as the build tool (Maven) needs access to [http://maven.apache.org/guides/introduction/introduction-to-repositories.html remote repositories], which contains various libraries and binaries. Some libraries are used for building Robocode, and others are used for running Robocode, and hence need to be put into the distribution files.&lt;br /&gt;
In order to get updates to the sources of Robocode when new versions emerge, an Internet connection is also critical to download changed sources and merge the changes with your version of the sources etc.&lt;br /&gt;
&lt;br /&gt;
Note that all sources of Robocode are for Java 6, meaning that Robocode is able to run on very old Java versions, which is intentional.&lt;br /&gt;
&lt;br /&gt;
==== Installing the JDK ====&lt;br /&gt;
&lt;br /&gt;
Robocode is being developed using Oracle's Java SE, and requires the Java Developer Kit ('''JDK'''), minimum version 6, to be pre-installed on the system used for building Robocode. Please note that a Java Runtime Environment ('''JRE''') is not enough as it does not contain the required developer tools needed for building Robocode. Currently, the Oracle JDK version 8 is recommended for building Robocode.&lt;br /&gt;
&lt;br /&gt;
Notice that when installing the JDK, it is highly recommended that you '''install the sources provided for Java''' as the sources are very useful when debugging Robocode. However, this is not a requirement.&lt;br /&gt;
&lt;br /&gt;
==== Setting up Java Environment Variables ====&lt;br /&gt;
&lt;br /&gt;
You must set up the environment variable named '''JAVA_HOME''' and extend another environment variable named '''PATH'''. You find information on how to setup JAVA_HOME and PATH on the net, e.g. [https://docs.oracle.com/cd/E19182-01/821-0917/inst_jdk_javahome_t/index.html here].&lt;br /&gt;
&lt;br /&gt;
'''JAVA_HOME must be set up point to the root directory of the JDK you intend to use.'''&lt;br /&gt;
&lt;br /&gt;
The PATH environment variable must be extended in order to locate the Java commands like 'java', 'javac' and lots of other tools in the JDK. Extending PATH is considered best practice when setting up the Java development environment, and makes it possible for other tools like e.g. Maven to locate the proper JDK tools. It also makes it possible for you to detirmine which JRE that is being used when running a Java application by writting &amp;lt;code&amp;gt;java -version&amp;lt;/code&amp;gt; in the command-line/shell, and detirmine which Java compiler that is being used by writting &amp;lt;code&amp;gt;javac -version&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
&lt;br /&gt;
'''Windows:'''&lt;br /&gt;
* JAVA_HOME is set to e.g. &amp;lt;code&amp;gt;JAVA_HOME=&amp;quot;C:\Program Files\Java\jdk1.8.0_162&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* PATH is extended, e.g. to &amp;lt;code&amp;gt;PATH=%JAVA_HOME%\bin;PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Linux / *nix:'''&lt;br /&gt;
* JAVA_HOME is set by e.g. &amp;lt;code&amp;gt;export JAVA_HOME=/usr/java/jdk1.8.0_162/bin/java&amp;lt;/code&amp;gt;. (Bash)&lt;br /&gt;
* PATH is extended, e.g. by &amp;lt;code&amp;gt;export PATH=$JAVA_HOME/bin:$PATH&amp;lt;/code&amp;gt;. (Bash)&lt;br /&gt;
&lt;br /&gt;
'''Mac OS X:'''&lt;br /&gt;
* JAVA_HOME is set by e.g. &amp;lt;code&amp;gt;export JAVA_HOME=$(/usr/libexec/java_home)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* PATH is extended, e.g. by &amp;lt;code&amp;gt;export PATH=${JAVA_HOME}/bin:$PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you want more information on how to set up your JAVA_HOME and PATH environment variables for your specific OS, please read the installation notes provided for the Oracle JDK here:&lt;br /&gt;
&lt;br /&gt;
'''Installation instructions from Oracle:'''&lt;br /&gt;
* [https://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html JDK 8 and JRE 8 Installation Start Here].&lt;br /&gt;
* [https://www.oracle.com/technetwork/java/javase/certconfig-2095354.html Oracle JDK 8 and JRE 8 Certified System Configurations Contents] for ''all'' supported systems.&lt;br /&gt;
&lt;br /&gt;
==== Required technical skills? ====&lt;br /&gt;
&lt;br /&gt;
In order to develop on Robocode, you need to know the basics of these tools:&lt;br /&gt;
&lt;br /&gt;
* Git and GitHub ([http://www.vogella.com/articles/Git/article.html Tutorial])&lt;br /&gt;
* Maven ([http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html Tutorial])&lt;br /&gt;
* Eclipse IDE ([http://www.vogella.com/articles/Eclipse/article.html Tutorial])&lt;br /&gt;
&lt;br /&gt;
Notice that you do not have to be an expert in Git/GitHub, Maven, or Eclipse. But you need some basic knowledge about these tools to understand how to build Robocode. In fact, trying to build Robocode might actually be a very good way of learning these tools, if you don't know them already or miss some practical experience with these. :-)&lt;br /&gt;
&lt;br /&gt;
Eclipse is not required for building Robocode, meaning that you are free to use any IDE of your choice. However, all set up for building Robocode has primarily been focused on Eclipse, and the same goes for this guide. If you manage to setup Robocode for e.g. IntelliJ IDEA or any other IDE, you are welcome to write a guide for how to set up Robocode for your particular IDE as other developers might be very interested in using the same IDE.&lt;br /&gt;
&lt;br /&gt;
All sources of Robocode are available at [https://github.com/robo-code/robocode GitHub]. At GitHub, you can download sources as a zipped file or create your own [https://help.github.com/articles/fork-a-repo fork], if you want to.&lt;br /&gt;
&lt;br /&gt;
In order to get build Robocode, Maven must be installed on your system. At present day, Maven 3.5.4 is the newest version and is able to build Robocode. Read more about how to install Maven [https://maven.apache.org/install.html here]. Note that the [https://github.com/takari/maven-wrapper Maven Wrapper] is being used by Robocode. Hence, you must run this Maven command from a command prompt or shell inside the your root directory for Robocode:&lt;br /&gt;
&lt;br /&gt;
  mvn -N io.takari:maven:wrapper -Dmaven=3.5.4&lt;br /&gt;
&lt;br /&gt;
This will create the Maven Wrapper files for you guaranteed to run as Maven version 3.5.4, even if you might have a newer Maven installed on your system. You'll get a directory named &amp;quot;.mvn&amp;quot; and these two script files &amp;quot;mvnw&amp;quot; and &amp;quot;mvnw.cmd&amp;quot;. You build Robocode by using the mvnassembly.sh or mvnassembly.cmd files, which makes use of the Maven Wrapper.&lt;br /&gt;
&lt;br /&gt;
You don't have to worry too much about how to set up Eclipse for Robocode as the provided sources contain all configuration files needed for Eclipse. Some of these files are generated using Maven's built-in support for Eclipse. However, you will need to do some basic pre-configuration of Eclipse before you'll be able to get started with working on Robocode. You should only need to set up a workspace for Robocode once. However, you will need to update the sources from the remote repository on GitHub once in a while, and merge changes with your sources in order to keep up-to-date with the current versions of Robocode, i.e. the origin/head of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
=== Getting sources from GitHub ===&lt;br /&gt;
&lt;br /&gt;
In the following, I assume that you want to '''Git clone''' the sources from GitHub using a [http://git-scm.com/downloads Git client]. This could be one of the Git GUI Clients (git-gui) recommended [http://git-scm.com/downloads/guis here].&lt;br /&gt;
You don't necessarily need a Git client for building Robocode, as you could simply download the sources as a plain .zip file from either [https://github.com/robo-code/robocode/archive/master.zip GitHub] or [https://sourceforge.net/projects/robocode/files/robocode%20sources/ SourceForge]. However, if you want to regularly update your local source files with the newest sources from the Git repository and the ability to commit and/or merge or fork changes, you will need to use a Git client.&lt;br /&gt;
&lt;br /&gt;
The URL of the sources at GitHub is:&lt;br /&gt;
[https://github.com/robo-code/robocode.git https://github.com/robo-code/robocode.git]&lt;br /&gt;
&lt;br /&gt;
==== How to build distribution files? ====&lt;br /&gt;
&lt;br /&gt;
In order to build the distribution files containing the installer setup file (robocode-x.x.x-setup.jar) and a .zip file containing all the sources (robocode-x.x.x-src.zip) you must call the '''mvnassembly''' script from the command-line when standing within the root directory of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvnassembly&lt;br /&gt;
&lt;br /&gt;
On *nix:&lt;br /&gt;
  ./mvnassembly.sh&lt;br /&gt;
&lt;br /&gt;
This will build the distribution files, which will be put into the sub-directory named ''robocode.distribution/target''.&lt;br /&gt;
&lt;br /&gt;
'''mvnassembly''' is a script that compiles all sources of the Robocode game, creates javadoc html files, run test units, and finally creates the target distribution files. The first time this script is run, it will need to download a huge amount of .jar files from various Maven repositories and which contains Maven plugins etc. used for building Robocode. So please be patient with it the first time.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Eclipse for developing on Robocode ===&lt;br /&gt;
&lt;br /&gt;
Here follows a description of how to setup Eclipse for developing on Robocode.&lt;br /&gt;
&lt;br /&gt;
==== Software Requirements for Eclipse IDE ====&lt;br /&gt;
&lt;br /&gt;
Here follows the recommended software needed to start developing on Robocode with the Eclipse IDE:&lt;br /&gt;
&lt;br /&gt;
'''Required:'''&lt;br /&gt;
* Oracle JDK 6 ([http://www.oracle.com/technetwork/java/javase/downloads/index.html download]) must be pre-installed.&lt;br /&gt;
* Eclipse IDE for Java Developers([http://www.eclipse.org/downloads/ download]). The Juno, Kepler, Luna works fine for Robocode and supports Git.&lt;br /&gt;
&lt;br /&gt;
Please consult the [http://wiki.eclipse.org/Eclipse/Installation#Install_a_JVM installation notes] provided for Eclipse in order to find out how to install Eclipse for your specific OS.&lt;br /&gt;
&lt;br /&gt;
==== Create a workspace for Robocode ====&lt;br /&gt;
&lt;br /&gt;
When you have setup and installed Eclipse on your system (if you did not have it on your system already), a workspace must be created for Robocode.&lt;br /&gt;
&lt;br /&gt;
The first time you start up a newly installed Eclipse, it will ask for a directory for your workspace. I suggest that you create a workspace named '''robocode-workspace''' or similar and create the workspace on a partition or directory like e.g. &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; (on Windows) or &amp;lt;code&amp;gt;~&amp;lt;/code&amp;gt; (on Linux) - or any other directory of your choice. If you have already got a workspace, e.g. the default one suggested by Eclipse, you can create a new workspace if you wish by selecting 'File' -&amp;gt; 'Switch Workspace' -&amp;gt; 'Other...' from the menu.&lt;br /&gt;
&lt;br /&gt;
==== M2_REPO class path variable ====&lt;br /&gt;
&lt;br /&gt;
One of the first things you need to do in Eclipse is to set up the '''M2_REPO''' class path variable for Eclipse, which points to your local Maven 2 repository. That is, Eclipse uses the M2_REPO class path variable for locating the Maven repository containing various libraries used for compiling Robocode etc. But before you can setup the M2_REPO class path in Eclipse, you must run the 'mvnassembly' command described earlier if you have not already done that.&lt;br /&gt;
&lt;br /&gt;
When calling the 'mvnassembly' script or alternatively start off Maven within the root of the robocode sources by calling e.g. 'mvn clean install', Maven will download all required libraries from other sites into your local Maven repository. Note that you will need to locate your local Maven repository. Under Windows your Maven repository is put into your %USERPROFILE% directory, and on Linux is put into your home directory (~). The Maven repository will be put under .m2/repository.&lt;br /&gt;
&lt;br /&gt;
To setup the M2_REPO class path in Eclipse, you must go to the menu bar and select 'Window' -&amp;gt; 'Preferences'. On the Preferences window expand the 'Java' -&amp;gt; 'Build Path' and select the 'Classpath Variables'. On the page for the Classpath Variables, you click on the 'New...' button, and enter M2_REPO as name. Next, you click on the 'Folder...' button and navigate to where you have your .m2/repository directory located (in %USERPROFILE% under Windows, and ~ under Linux), e.g. &amp;lt;code&amp;gt;C:/Users/Flemming/.m2/repository&amp;lt;/code&amp;gt; (Windows) or &amp;lt;code&amp;gt;/home/fnl/.m2/repository&amp;lt;/code&amp;gt; (Linux).&lt;br /&gt;
&lt;br /&gt;
When Eclipse asks you if it should rebuild the workspace, you select 'Yes'.&lt;br /&gt;
&lt;br /&gt;
==== Configure JDK for your workspace ====&lt;br /&gt;
&lt;br /&gt;
You must setup which JDK that will be used for compiling (and running) Robocode in your workspace.&lt;br /&gt;
You do this by...&lt;br /&gt;
# selecting Window -&amp;gt; Preferences from the menu, and then unfold and select Java -&amp;gt; Installed JREs and press 'Add...' on the 'Installed JREs' page.&lt;br /&gt;
# Select 'Standard VM' on the 'JRE Type' page and press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# Press the 'Directory...' button and browse to where you have installed your JDK 6 and press 'Finish' or Enter. Make sure to select a JDK and ''not'' a JRE, as a JRE is not sufficient as it lacks the tools available with the JDK.&lt;br /&gt;
# When you get back to the 'Installed JREs' page, make sure to put a check mark in the JDK you just added and press 'OK' or Enter.&lt;br /&gt;
&lt;br /&gt;
==== Importing sources of Robocode using Git ====&lt;br /&gt;
&lt;br /&gt;
Importing the projects for Robocode into Eclipse from Git can be done from the Package Explorer, which can be opened from the menu by selecting Window -&amp;gt; Show View -&amp;gt; Package Explorer or by using the keyboard shortcut by pressing Alt+Shift+Q and P. In the Package Explorer, you...&lt;br /&gt;
&lt;br /&gt;
# Right-click the mouse and select 'Import...' in the popup menu that occurs.&lt;br /&gt;
# Unfold 'Git' in the 'Import' window and double-click 'Projects from Git'.&lt;br /&gt;
# On the 'Import Projects from Git' you select 'URI'.&lt;br /&gt;
# On the next page named 'Source Git Repository' to enter '''https://github.com/robo-code/robocode.git''' into the 'URI:' text field and press Enter or 'Next &amp;gt;'.&lt;br /&gt;
# On the 'Branch Selection' page you press 'Deselect All' and select the branch you want to work on. This would normally be 'master', which is the master branch of Robocode. When the branch selection is made, you press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# On the 'Local Destination' page, you must note the directory where your local files will be put. I recommend you use the directory suggested by Git (Eclipse) and press 'Finish' or Enter.&lt;br /&gt;
# On the 'Select a wizard to use for importing projects', make sure 'Import existing projects' is selected and press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# On 'Import Projects', you should deselect the first project named 'plugins' as you would normally not want to develop on plugins for Robocode - otherwise just omit deselecting 'plugins'. Press 'Finish' or Enter.&lt;br /&gt;
# All Robocode projects will now be imported into Eclipse and be visible in the Package Explorer.&lt;br /&gt;
# Now, select all projects (press Ctrl+A) and right-click the Package Explorer and select Replace With -&amp;gt; HEAD Revision on the popup menu that occurs, and press 'OK' or Enter to discard local changes on the dialog that appears.&lt;br /&gt;
&lt;br /&gt;
Congratulations, you should now be able to get started working on the Robocode sources in Eclipse. :-)&lt;br /&gt;
&lt;br /&gt;
==== Launch Robocode ====&lt;br /&gt;
&lt;br /&gt;
Before launching Robocode for the first time, you should make sure that it is cleaned and compiled first. You do this by selecting Project -&amp;gt; Clean... from the menu. You should also make sure that you have run the 'mvnassembly' described previously, which will download and update your local Maven repository, which is necessary for compiling and running Robocode.&lt;br /&gt;
&lt;br /&gt;
Please notice that it might be necessary to refresh the sources in Eclipse when files are changed outside the Eclipse editor, which is the case when running the 'mvnassembly' script. You can do this from the Package Explorer by right-clicking in this and select 'Refresh'.&lt;br /&gt;
&lt;br /&gt;
In order to start running or debugging Robocode, you should select the &amp;quot;Bug&amp;quot; (debug) or &amp;quot;Play&amp;quot; (run) button in the top of Eclipse under the menu. You should press the little arrow beside these green buttons in order to choose among: Robocode, RoboRumble, TeamRumble, and MeleeRumble. The 3 last ones are for running the RoboRumble@Home clients.&lt;br /&gt;
&lt;br /&gt;
==== How to run the unit tests? ====&lt;br /&gt;
&lt;br /&gt;
When you want to run the unit test from within Eclipse, you must do this from the the Package Explorer, where you right-click on the 'robocode.tests' project and select 'Run As' -&amp;gt; 'JUnit Test'. Now all available unit tests will run automatically.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can start the tests from the command-line by standing on your robocode workspace, and write the following Maven command.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvn test install&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  ./mvn.sh test install&lt;br /&gt;
&lt;br /&gt;
=== Robocode developers and contributions ===&lt;br /&gt;
&lt;br /&gt;
Robocode developers have discussion group at robocode-developers@googlegroups.com. Everybody interested in discussion about future of Robocode are welcome. We also welcome your contributions there. The discussion group is located here: http://groups.google.com/group/robocode-developers.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Robocode/Old Developers Guide for building Robocode|Old version]] of the Developer's Guide for building Robocode for Robocode versions prior to version 1.7.&lt;br /&gt;
* [http://code.google.com/p/robocode/source/browse/ Browse the sources] of Robocode.&lt;br /&gt;
* [http://sourceforge.net/project/showfiles.php?group_id=37202&amp;amp;package_id=218677 Download the sources] of Robocode.&lt;br /&gt;
* [http://groups.google.com/group/robocode-developers Robocode developers discussion group].&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* The [http://sourceforge.net/projects/robocode Robocode project] on SourceForge.&lt;br /&gt;
* [http://sourceforge.net/svn/?group_id=37202 How to access] the SVN Repository for Robocode.&lt;br /&gt;
* [http://www.eclipse.org/ Eclipse] - an open development platform supported by Robocode.&lt;br /&gt;
* [http://maven.apache.org/ Apache Maven] used for building Robocode.&lt;br /&gt;
* [http://maven.apache.org/guides/mini/guide-ide-eclipse.html Guide] to using Eclipse with Maven 2.x.&lt;br /&gt;
* [http://www.eclipse.org/subversive/ Eclipse Subversive] is a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://subclipse.tigris.org/ Subclipse] is also a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://tortoisesvn.net TortoiseSVN], a Subversion client for Windows.&lt;br /&gt;
* [http://www.open.collab.net/downloads/subversion/ CollabNets Subversion], a Subversion client for both Windows and Linux.&lt;br /&gt;
&lt;br /&gt;
[[Category:Robocode Documentation]]&lt;br /&gt;
[[Category:Eclipse IDE]]&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=55055</id>
		<title>Robocode/Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=55055"/>
		<updated>2018-10-19T23:42:06Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: /* Checking out sources from GitHub */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide describes how to build the Robocode application, i.e. the game itself, and not how to build bots for Robocode.&lt;br /&gt;
&lt;br /&gt;
== Developer's Guide for building Robocode with Eclipse setup ==&lt;br /&gt;
&lt;br /&gt;
=== Notice ===&lt;br /&gt;
&lt;br /&gt;
This guide is intended for experienced Java developers, who want to work on the Robocode application, and describes all basic stuff required to compile and run Robocode within the [http://www.eclipse.org Eclipse] IDE.&lt;br /&gt;
&lt;br /&gt;
If you just need to browse the sources, you can do it from [https://github.com/robo-code/robocode here] or you can download the zipped sources from [http://sourceforge.net/projects/robocode/files/robocode%20sources/ here].&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Basically, all you need to get started with building Robocode is:&lt;br /&gt;
&lt;br /&gt;
* Oracle JDK 8 ([https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html Java SE Development Kit 8 Downloads]). Note that only version 6, 7, and 8 will work. Newer versions are not supported (yet) and are almost guaranteed to cause building problems.&lt;br /&gt;
* Source files for Robocode ([https://github.com/robo-code/robocode on GitHub]), which you get by doing a Git clone.&lt;br /&gt;
* An Internet connection.&lt;br /&gt;
&lt;br /&gt;
Other than that, you need to be a skilled Java developer in order to figure out how Robocode is put together. Robocode is a complex application and requires a big effort to grasp and understand. There is practically no documentation available that describe the internal logic, architecture, game rules, coding conventions etc. So you will probably be on your own when trying to figure out how Robocode it put together.&lt;br /&gt;
&lt;br /&gt;
An Internet connection is required for building Robocode distribution files as the build tool (Maven) needs access to [http://maven.apache.org/guides/introduction/introduction-to-repositories.html remote repositories], which contains various libraries and binaries. Some libraries are used for building Robocode, and others are used for running Robocode, and hence need to be put into the distribution files.&lt;br /&gt;
In order to get updates to the sources of Robocode when new versions emerge, an Internet connection is also critical to download changed sources and merge the changes with your version of the sources etc.&lt;br /&gt;
&lt;br /&gt;
Note that all sources of Robocode are for Java 6, meaning that Robocode is able to run on very old Java versions, which is intentional.&lt;br /&gt;
&lt;br /&gt;
==== Installing the JDK ====&lt;br /&gt;
&lt;br /&gt;
Robocode is being developed using Oracle's Java SE, and requires the Java Developer Kit ('''JDK'''), minimum version 6, to be pre-installed on the system used for building Robocode. Please note that a Java Runtime Environment ('''JRE''') is not enough as it does not contain the required developer tools needed for building Robocode. Currently, the Oracle JDK version 8 is recommended for building Robocode.&lt;br /&gt;
&lt;br /&gt;
Notice that when installing the JDK, it is highly recommended that you '''install the sources provided for Java''' as the sources are very useful when debugging Robocode. However, this is not a requirement.&lt;br /&gt;
&lt;br /&gt;
==== Setting up Java Environment Variables ====&lt;br /&gt;
&lt;br /&gt;
You must set up the environment variable named '''JAVA_HOME''' and extend another environment variable named '''PATH'''. You find information on how to setup JAVA_HOME and PATH on the net, e.g. [https://docs.oracle.com/cd/E19182-01/821-0917/inst_jdk_javahome_t/index.html here].&lt;br /&gt;
&lt;br /&gt;
'''JAVA_HOME must be set up point to the root directory of the JDK you intend to use.'''&lt;br /&gt;
&lt;br /&gt;
The PATH environment variable must be extended in order to locate the Java commands like 'java', 'javac' and lots of other tools in the JDK. Extending PATH is considered best practice when setting up the Java development environment, and makes it possible for other tools like e.g. Maven to locate the proper JDK tools. It also makes it possible for you to detirmine which JRE that is being used when running a Java application by writting &amp;lt;code&amp;gt;java -version&amp;lt;/code&amp;gt; in the command-line/shell, and detirmine which Java compiler that is being used by writting &amp;lt;code&amp;gt;javac -version&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
&lt;br /&gt;
'''Windows:'''&lt;br /&gt;
* JAVA_HOME is set to e.g. &amp;lt;code&amp;gt;JAVA_HOME=&amp;quot;C:\Program Files\Java\jdk1.8.0_162&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* PATH is extended, e.g. to &amp;lt;code&amp;gt;PATH=%JAVA_HOME%\bin;PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Linux / *nix:'''&lt;br /&gt;
* JAVA_HOME is set by e.g. &amp;lt;code&amp;gt;export JAVA_HOME=/usr/java/jdk1.8.0_162/bin/java&amp;lt;/code&amp;gt;. (Bash)&lt;br /&gt;
* PATH is extended, e.g. by &amp;lt;code&amp;gt;export PATH=$JAVA_HOME/bin:$PATH&amp;lt;/code&amp;gt;. (Bash)&lt;br /&gt;
&lt;br /&gt;
'''Mac OS X:'''&lt;br /&gt;
* JAVA_HOME is set by e.g. &amp;lt;code&amp;gt;export JAVA_HOME=$(/usr/libexec/java_home)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* PATH is extended, e.g. by &amp;lt;code&amp;gt;export PATH=${JAVA_HOME}/bin:$PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you want more information on how to set up your JAVA_HOME and PATH environment variables for your specific OS, please read the installation notes provided for the Oracle JDK here:&lt;br /&gt;
&lt;br /&gt;
'''Installation instructions from Oracle:'''&lt;br /&gt;
* [https://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html JDK 8 and JRE 8 Installation Start Here].&lt;br /&gt;
* [https://www.oracle.com/technetwork/java/javase/certconfig-2095354.html Oracle JDK 8 and JRE 8 Certified System Configurations Contents] for ''all'' supported systems.&lt;br /&gt;
&lt;br /&gt;
==== Required technical skills? ====&lt;br /&gt;
&lt;br /&gt;
In order to develop on Robocode, you need to know the basics of these tools:&lt;br /&gt;
&lt;br /&gt;
* Git and GitHub ([http://www.vogella.com/articles/Git/article.html Tutorial])&lt;br /&gt;
* Maven ([http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html Tutorial])&lt;br /&gt;
* Eclipse IDE ([http://www.vogella.com/articles/Eclipse/article.html Tutorial])&lt;br /&gt;
&lt;br /&gt;
Notice that you do not have to be an expert in Git/GitHub, Maven, or Eclipse. But you need some basic knowledge about these tools to understand how to build Robocode. In fact, trying to build Robocode might actually be a very good way of learning these tools, if you don't know them already or miss some practical experience with these. :-)&lt;br /&gt;
&lt;br /&gt;
Eclipse is not required for building Robocode, meaning that you are free to use any IDE of your choice. However, all set up for building Robocode has primarily been focused on Eclipse, and the same goes for this guide. If you manage to setup Robocode for e.g. IntelliJ IDEA or any other IDE, you are welcome to write a guide for how to set up Robocode for your particular IDE as other developers might be very interested in using the same IDE.&lt;br /&gt;
&lt;br /&gt;
All sources of Robocode are available at [https://github.com/robo-code/robocode GitHub]. At GitHub, you can download sources as a zipped file or create your own [https://help.github.com/articles/fork-a-repo fork], if you want to.&lt;br /&gt;
&lt;br /&gt;
In order to get build Robocode, Maven must be installed on your system. At present day, Maven 3.5.4 is the newest version and is able to build Robocode. Read more about how to install Maven [https://maven.apache.org/install.html here]. Note that the [https://github.com/takari/maven-wrapper Maven Wrapper] is being used by Robocode. Hence, you must run this Maven command from a command prompt or shell inside the your root directory for Robocode:&lt;br /&gt;
&lt;br /&gt;
  mvn -N io.takari:maven:wrapper -Dmaven=3.5.4&lt;br /&gt;
&lt;br /&gt;
This will create the Maven Wrapper files for you guaranteed to run as Maven version 3.5.4, even if you might have a newer Maven installed on your system. You'll get a directory named &amp;quot;.mvn&amp;quot; and these two script files &amp;quot;mvnw&amp;quot; and &amp;quot;mvnw.cmd&amp;quot;. You build Robocode by using the mvnassembly.sh or mvnassembly.cmd files, which makes use of the Maven Wrapper.&lt;br /&gt;
&lt;br /&gt;
You don't have to worry too much about how to set up Eclipse for Robocode as the provided sources contain all configuration files needed for Eclipse. Some of these files are generated using Maven's built-in support for Eclipse. However, you will need to do some basic pre-configuration of Eclipse before you'll be able to get started with working on Robocode. You should only need to set up a workspace for Robocode once. However, you will need to update the sources from the remote repository on GitHub once in a while, and merge changes with your sources in order to keep up-to-date with the current versions of Robocode, i.e. the origin/head of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
=== Getting sources from GitHub ===&lt;br /&gt;
&lt;br /&gt;
In the following, I assume that you want to '''Git clone''' the sources from GitHub using a [http://git-scm.com/downloads Git client]. This could be one of the Git GUI Clients (git-gui) recommended [http://git-scm.com/downloads/guis here].&lt;br /&gt;
You don't necessarily need a Git client for building Robocode, as you could simply download the sources as a plain .zip file from either [https://github.com/robo-code/robocode/archive/master.zip GitHub] or [https://sourceforge.net/projects/robocode/files/robocode%20sources/ SourceForge]. However, if you want to regularly update your local source files with the newest sources from the Git repository and the ability to commit and/or merge or fork changes, you will need to use a Git client in order to get access to files beside the files inside (Eclipse) project directories, e.g. if you want to check out the scripts located in the root of the Git repository for Robocode.&lt;br /&gt;
&lt;br /&gt;
The URL of the sources at GitHub is:&lt;br /&gt;
[https://github.com/robo-code/robocode.git https://github.com/robo-code/robocode.git]&lt;br /&gt;
&lt;br /&gt;
==== How to build distribution files? ====&lt;br /&gt;
&lt;br /&gt;
In order to build the distribution files containing the installer setup file (robocode-x.x.x-setup.jar) and a .zip file containing all the sources (robocode-x.x.x-src.zip) you must call the '''mvnassembly''' script from the command-line when standing within the root directory of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvnassembly&lt;br /&gt;
&lt;br /&gt;
On *nix:&lt;br /&gt;
  ./mvnassembly.sh&lt;br /&gt;
&lt;br /&gt;
This will build the distribution files, which will be put into the sub-directory named ''robocode.distribution/target''.&lt;br /&gt;
&lt;br /&gt;
'''mvnassembly''' is a script that compiles all sources of the Robocode game, creates javadoc html files, run test units, and finally creates the target distribution files. The first time this script is run, it will need to download a huge amount of .jar files from various Maven repositories and which contains Maven plugins etc. used for building Robocode. So please be patient with it the first time.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Eclipse for developing on Robocode ===&lt;br /&gt;
&lt;br /&gt;
Here follows a description of how to setup Eclipse for developing on Robocode.&lt;br /&gt;
&lt;br /&gt;
==== Software Requirements for Eclipse IDE ====&lt;br /&gt;
&lt;br /&gt;
Here follows the recommended software needed to start developing on Robocode with the Eclipse IDE:&lt;br /&gt;
&lt;br /&gt;
'''Required:'''&lt;br /&gt;
* Oracle JDK 6 ([http://www.oracle.com/technetwork/java/javase/downloads/index.html download]) must be pre-installed.&lt;br /&gt;
* Eclipse IDE for Java Developers([http://www.eclipse.org/downloads/ download]). The Juno, Kepler, Luna works fine for Robocode and supports Git.&lt;br /&gt;
&lt;br /&gt;
Please consult the [http://wiki.eclipse.org/Eclipse/Installation#Install_a_JVM installation notes] provided for Eclipse in order to find out how to install Eclipse for your specific OS.&lt;br /&gt;
&lt;br /&gt;
==== Create a workspace for Robocode ====&lt;br /&gt;
&lt;br /&gt;
When you have setup and installed Eclipse on your system (if you did not have it on your system already), a workspace must be created for Robocode.&lt;br /&gt;
&lt;br /&gt;
The first time you start up a newly installed Eclipse, it will ask for a directory for your workspace. I suggest that you create a workspace named '''robocode-workspace''' or similar and create the workspace on a partition or directory like e.g. &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; (on Windows) or &amp;lt;code&amp;gt;~&amp;lt;/code&amp;gt; (on Linux) - or any other directory of your choice. If you have already got a workspace, e.g. the default one suggested by Eclipse, you can create a new workspace if you wish by selecting 'File' -&amp;gt; 'Switch Workspace' -&amp;gt; 'Other...' from the menu.&lt;br /&gt;
&lt;br /&gt;
==== M2_REPO class path variable ====&lt;br /&gt;
&lt;br /&gt;
One of the first things you need to do in Eclipse is to set up the '''M2_REPO''' class path variable for Eclipse, which points to your local Maven 2 repository. That is, Eclipse uses the M2_REPO class path variable for locating the Maven repository containing various libraries used for compiling Robocode etc. But before you can setup the M2_REPO class path in Eclipse, you must run the 'mvnassembly' command described earlier if you have not already done that.&lt;br /&gt;
&lt;br /&gt;
When calling the 'mvnassembly' script or alternatively start off Maven within the root of the robocode sources by calling e.g. 'mvn clean install', Maven will download all required libraries from other sites into your local Maven repository. Note that you will need to locate your local Maven repository. Under Windows your Maven repository is put into your %USERPROFILE% directory, and on Linux is put into your home directory (~). The Maven repository will be put under .m2/repository.&lt;br /&gt;
&lt;br /&gt;
To setup the M2_REPO class path in Eclipse, you must go to the menu bar and select 'Window' -&amp;gt; 'Preferences'. On the Preferences window expand the 'Java' -&amp;gt; 'Build Path' and select the 'Classpath Variables'. On the page for the Classpath Variables, you click on the 'New...' button, and enter M2_REPO as name. Next, you click on the 'Folder...' button and navigate to where you have your .m2/repository directory located (in %USERPROFILE% under Windows, and ~ under Linux), e.g. &amp;lt;code&amp;gt;C:/Users/Flemming/.m2/repository&amp;lt;/code&amp;gt; (Windows) or &amp;lt;code&amp;gt;/home/fnl/.m2/repository&amp;lt;/code&amp;gt; (Linux).&lt;br /&gt;
&lt;br /&gt;
When Eclipse asks you if it should rebuild the workspace, you select 'Yes'.&lt;br /&gt;
&lt;br /&gt;
==== Configure JDK for your workspace ====&lt;br /&gt;
&lt;br /&gt;
You must setup which JDK that will be used for compiling (and running) Robocode in your workspace.&lt;br /&gt;
You do this by...&lt;br /&gt;
# selecting Window -&amp;gt; Preferences from the menu, and then unfold and select Java -&amp;gt; Installed JREs and press 'Add...' on the 'Installed JREs' page.&lt;br /&gt;
# Select 'Standard VM' on the 'JRE Type' page and press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# Press the 'Directory...' button and browse to where you have installed your JDK 6 and press 'Finish' or Enter. Make sure to select a JDK and ''not'' a JRE, as a JRE is not sufficient as it lacks the tools available with the JDK.&lt;br /&gt;
# When you get back to the 'Installed JREs' page, make sure to put a check mark in the JDK you just added and press 'OK' or Enter.&lt;br /&gt;
&lt;br /&gt;
==== Importing sources of Robocode using Git ====&lt;br /&gt;
&lt;br /&gt;
Importing the projects for Robocode into Eclipse from Git can be done from the Package Explorer, which can be opened from the menu by selecting Window -&amp;gt; Show View -&amp;gt; Package Explorer or by using the keyboard shortcut by pressing Alt+Shift+Q and P. In the Package Explorer, you...&lt;br /&gt;
&lt;br /&gt;
# Right-click the mouse and select 'Import...' in the popup menu that occurs.&lt;br /&gt;
# Unfold 'Git' in the 'Import' window and double-click 'Projects from Git'.&lt;br /&gt;
# On the 'Import Projects from Git' you select 'URI'.&lt;br /&gt;
# On the next page named 'Source Git Repository' to enter '''https://github.com/robo-code/robocode.git''' into the 'URI:' text field and press Enter or 'Next &amp;gt;'.&lt;br /&gt;
# On the 'Branch Selection' page you press 'Deselect All' and select the branch you want to work on. This would normally be 'master', which is the master branch of Robocode. When the branch selection is made, you press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# On the 'Local Destination' page, you must note the directory where your local files will be put. I recommend you use the directory suggested by Git (Eclipse) and press 'Finish' or Enter.&lt;br /&gt;
# On the 'Select a wizard to use for importing projects', make sure 'Import existing projects' is selected and press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# On 'Import Projects', you should deselect the first project named 'plugins' as you would normally not want to develop on plugins for Robocode - otherwise just omit deselecting 'plugins'. Press 'Finish' or Enter.&lt;br /&gt;
# All Robocode projects will now be imported into Eclipse and be visible in the Package Explorer.&lt;br /&gt;
# Now, select all projects (press Ctrl+A) and right-click the Package Explorer and select Replace With -&amp;gt; HEAD Revision on the popup menu that occurs, and press 'OK' or Enter to discard local changes on the dialog that appears.&lt;br /&gt;
&lt;br /&gt;
Congratulations, you should now be able to get started working on the Robocode sources in Eclipse. :-)&lt;br /&gt;
&lt;br /&gt;
==== Launch Robocode ====&lt;br /&gt;
&lt;br /&gt;
Before launching Robocode for the first time, you should make sure that it is cleaned and compiled first. You do this by selecting Project -&amp;gt; Clean... from the menu. You should also make sure that you have run the 'mvnassembly' described previously, which will download and update your local Maven repository, which is necessary for compiling and running Robocode.&lt;br /&gt;
&lt;br /&gt;
Please notice that it might be necessary to refresh the sources in Eclipse when files are changed outside the Eclipse editor, which is the case when running the 'mvnassembly' script. You can do this from the Package Explorer by right-clicking in this and select 'Refresh'.&lt;br /&gt;
&lt;br /&gt;
In order to start running or debugging Robocode, you should select the &amp;quot;Bug&amp;quot; (debug) or &amp;quot;Play&amp;quot; (run) button in the top of Eclipse under the menu. You should press the little arrow beside these green buttons in order to choose among: Robocode, RoboRumble, TeamRumble, and MeleeRumble. The 3 last ones are for running the RoboRumble@Home clients.&lt;br /&gt;
&lt;br /&gt;
==== How to run the unit tests? ====&lt;br /&gt;
&lt;br /&gt;
When you want to run the unit test from within Eclipse, you must do this from the the Package Explorer, where you right-click on the 'robocode.tests' project and select 'Run As' -&amp;gt; 'JUnit Test'. Now all available unit tests will run automatically.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can start the tests from the command-line by standing on your robocode workspace, and write the following Maven command.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvn test install&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  ./mvn.sh test install&lt;br /&gt;
&lt;br /&gt;
=== Robocode developers and contributions ===&lt;br /&gt;
&lt;br /&gt;
Robocode developers have discussion group at robocode-developers@googlegroups.com. Everybody interested in discussion about future of Robocode are welcome. We also welcome your contributions there. The discussion group is located here: http://groups.google.com/group/robocode-developers.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Robocode/Old Developers Guide for building Robocode|Old version]] of the Developer's Guide for building Robocode for Robocode versions prior to version 1.7.&lt;br /&gt;
* [http://code.google.com/p/robocode/source/browse/ Browse the sources] of Robocode.&lt;br /&gt;
* [http://sourceforge.net/project/showfiles.php?group_id=37202&amp;amp;package_id=218677 Download the sources] of Robocode.&lt;br /&gt;
* [http://groups.google.com/group/robocode-developers Robocode developers discussion group].&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* The [http://sourceforge.net/projects/robocode Robocode project] on SourceForge.&lt;br /&gt;
* [http://sourceforge.net/svn/?group_id=37202 How to access] the SVN Repository for Robocode.&lt;br /&gt;
* [http://www.eclipse.org/ Eclipse] - an open development platform supported by Robocode.&lt;br /&gt;
* [http://maven.apache.org/ Apache Maven] used for building Robocode.&lt;br /&gt;
* [http://maven.apache.org/guides/mini/guide-ide-eclipse.html Guide] to using Eclipse with Maven 2.x.&lt;br /&gt;
* [http://www.eclipse.org/subversive/ Eclipse Subversive] is a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://subclipse.tigris.org/ Subclipse] is also a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://tortoisesvn.net TortoiseSVN], a Subversion client for Windows.&lt;br /&gt;
* [http://www.open.collab.net/downloads/subversion/ CollabNets Subversion], a Subversion client for both Windows and Linux.&lt;br /&gt;
&lt;br /&gt;
[[Category:Robocode Documentation]]&lt;br /&gt;
[[Category:Eclipse IDE]]&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=55054</id>
		<title>Robocode/Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=55054"/>
		<updated>2018-10-19T23:34:02Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: /* Required technical skills? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide describes how to build the Robocode application, i.e. the game itself, and not how to build bots for Robocode.&lt;br /&gt;
&lt;br /&gt;
== Developer's Guide for building Robocode with Eclipse setup ==&lt;br /&gt;
&lt;br /&gt;
=== Notice ===&lt;br /&gt;
&lt;br /&gt;
This guide is intended for experienced Java developers, who want to work on the Robocode application, and describes all basic stuff required to compile and run Robocode within the [http://www.eclipse.org Eclipse] IDE.&lt;br /&gt;
&lt;br /&gt;
If you just need to browse the sources, you can do it from [https://github.com/robo-code/robocode here] or you can download the zipped sources from [http://sourceforge.net/projects/robocode/files/robocode%20sources/ here].&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Basically, all you need to get started with building Robocode is:&lt;br /&gt;
&lt;br /&gt;
* Oracle JDK 8 ([https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html Java SE Development Kit 8 Downloads]). Note that only version 6, 7, and 8 will work. Newer versions are not supported (yet) and are almost guaranteed to cause building problems.&lt;br /&gt;
* Source files for Robocode ([https://github.com/robo-code/robocode on GitHub]), which you get by doing a Git clone.&lt;br /&gt;
* An Internet connection.&lt;br /&gt;
&lt;br /&gt;
Other than that, you need to be a skilled Java developer in order to figure out how Robocode is put together. Robocode is a complex application and requires a big effort to grasp and understand. There is practically no documentation available that describe the internal logic, architecture, game rules, coding conventions etc. So you will probably be on your own when trying to figure out how Robocode it put together.&lt;br /&gt;
&lt;br /&gt;
An Internet connection is required for building Robocode distribution files as the build tool (Maven) needs access to [http://maven.apache.org/guides/introduction/introduction-to-repositories.html remote repositories], which contains various libraries and binaries. Some libraries are used for building Robocode, and others are used for running Robocode, and hence need to be put into the distribution files.&lt;br /&gt;
In order to get updates to the sources of Robocode when new versions emerge, an Internet connection is also critical to download changed sources and merge the changes with your version of the sources etc.&lt;br /&gt;
&lt;br /&gt;
Note that all sources of Robocode are for Java 6, meaning that Robocode is able to run on very old Java versions, which is intentional.&lt;br /&gt;
&lt;br /&gt;
==== Installing the JDK ====&lt;br /&gt;
&lt;br /&gt;
Robocode is being developed using Oracle's Java SE, and requires the Java Developer Kit ('''JDK'''), minimum version 6, to be pre-installed on the system used for building Robocode. Please note that a Java Runtime Environment ('''JRE''') is not enough as it does not contain the required developer tools needed for building Robocode. Currently, the Oracle JDK version 8 is recommended for building Robocode.&lt;br /&gt;
&lt;br /&gt;
Notice that when installing the JDK, it is highly recommended that you '''install the sources provided for Java''' as the sources are very useful when debugging Robocode. However, this is not a requirement.&lt;br /&gt;
&lt;br /&gt;
==== Setting up Java Environment Variables ====&lt;br /&gt;
&lt;br /&gt;
You must set up the environment variable named '''JAVA_HOME''' and extend another environment variable named '''PATH'''. You find information on how to setup JAVA_HOME and PATH on the net, e.g. [https://docs.oracle.com/cd/E19182-01/821-0917/inst_jdk_javahome_t/index.html here].&lt;br /&gt;
&lt;br /&gt;
'''JAVA_HOME must be set up point to the root directory of the JDK you intend to use.'''&lt;br /&gt;
&lt;br /&gt;
The PATH environment variable must be extended in order to locate the Java commands like 'java', 'javac' and lots of other tools in the JDK. Extending PATH is considered best practice when setting up the Java development environment, and makes it possible for other tools like e.g. Maven to locate the proper JDK tools. It also makes it possible for you to detirmine which JRE that is being used when running a Java application by writting &amp;lt;code&amp;gt;java -version&amp;lt;/code&amp;gt; in the command-line/shell, and detirmine which Java compiler that is being used by writting &amp;lt;code&amp;gt;javac -version&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
&lt;br /&gt;
'''Windows:'''&lt;br /&gt;
* JAVA_HOME is set to e.g. &amp;lt;code&amp;gt;JAVA_HOME=&amp;quot;C:\Program Files\Java\jdk1.8.0_162&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* PATH is extended, e.g. to &amp;lt;code&amp;gt;PATH=%JAVA_HOME%\bin;PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Linux / *nix:'''&lt;br /&gt;
* JAVA_HOME is set by e.g. &amp;lt;code&amp;gt;export JAVA_HOME=/usr/java/jdk1.8.0_162/bin/java&amp;lt;/code&amp;gt;. (Bash)&lt;br /&gt;
* PATH is extended, e.g. by &amp;lt;code&amp;gt;export PATH=$JAVA_HOME/bin:$PATH&amp;lt;/code&amp;gt;. (Bash)&lt;br /&gt;
&lt;br /&gt;
'''Mac OS X:'''&lt;br /&gt;
* JAVA_HOME is set by e.g. &amp;lt;code&amp;gt;export JAVA_HOME=$(/usr/libexec/java_home)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* PATH is extended, e.g. by &amp;lt;code&amp;gt;export PATH=${JAVA_HOME}/bin:$PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you want more information on how to set up your JAVA_HOME and PATH environment variables for your specific OS, please read the installation notes provided for the Oracle JDK here:&lt;br /&gt;
&lt;br /&gt;
'''Installation instructions from Oracle:'''&lt;br /&gt;
* [https://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html JDK 8 and JRE 8 Installation Start Here].&lt;br /&gt;
* [https://www.oracle.com/technetwork/java/javase/certconfig-2095354.html Oracle JDK 8 and JRE 8 Certified System Configurations Contents] for ''all'' supported systems.&lt;br /&gt;
&lt;br /&gt;
==== Required technical skills? ====&lt;br /&gt;
&lt;br /&gt;
In order to develop on Robocode, you need to know the basics of these tools:&lt;br /&gt;
&lt;br /&gt;
* Git and GitHub ([http://www.vogella.com/articles/Git/article.html Tutorial])&lt;br /&gt;
* Maven ([http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html Tutorial])&lt;br /&gt;
* Eclipse IDE ([http://www.vogella.com/articles/Eclipse/article.html Tutorial])&lt;br /&gt;
&lt;br /&gt;
Notice that you do not have to be an expert in Git/GitHub, Maven, or Eclipse. But you need some basic knowledge about these tools to understand how to build Robocode. In fact, trying to build Robocode might actually be a very good way of learning these tools, if you don't know them already or miss some practical experience with these. :-)&lt;br /&gt;
&lt;br /&gt;
Eclipse is not required for building Robocode, meaning that you are free to use any IDE of your choice. However, all set up for building Robocode has primarily been focused on Eclipse, and the same goes for this guide. If you manage to setup Robocode for e.g. IntelliJ IDEA or any other IDE, you are welcome to write a guide for how to set up Robocode for your particular IDE as other developers might be very interested in using the same IDE.&lt;br /&gt;
&lt;br /&gt;
All sources of Robocode are available at [https://github.com/robo-code/robocode GitHub]. At GitHub, you can download sources as a zipped file or create your own [https://help.github.com/articles/fork-a-repo fork], if you want to.&lt;br /&gt;
&lt;br /&gt;
In order to get build Robocode, Maven must be installed on your system. At present day, Maven 3.5.4 is the newest version and is able to build Robocode. Read more about how to install Maven [https://maven.apache.org/install.html here]. Note that the [https://github.com/takari/maven-wrapper Maven Wrapper] is being used by Robocode. Hence, you must run this Maven command from a command prompt or shell inside the your root directory for Robocode:&lt;br /&gt;
&lt;br /&gt;
  mvn -N io.takari:maven:wrapper -Dmaven=3.5.4&lt;br /&gt;
&lt;br /&gt;
This will create the Maven Wrapper files for you guaranteed to run as Maven version 3.5.4, even if you might have a newer Maven installed on your system. You'll get a directory named &amp;quot;.mvn&amp;quot; and these two script files &amp;quot;mvnw&amp;quot; and &amp;quot;mvnw.cmd&amp;quot;. You build Robocode by using the mvnassembly.sh or mvnassembly.cmd files, which makes use of the Maven Wrapper.&lt;br /&gt;
&lt;br /&gt;
You don't have to worry too much about how to set up Eclipse for Robocode as the provided sources contain all configuration files needed for Eclipse. Some of these files are generated using Maven's built-in support for Eclipse. However, you will need to do some basic pre-configuration of Eclipse before you'll be able to get started with working on Robocode. You should only need to set up a workspace for Robocode once. However, you will need to update the sources from the remote repository on GitHub once in a while, and merge changes with your sources in order to keep up-to-date with the current versions of Robocode, i.e. the origin/head of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
=== Checking out sources from GitHub ===&lt;br /&gt;
&lt;br /&gt;
In the following, I assume that you want to '''check out''' the sources from GitHub using some [http://git-scm.com/downloads Git client].  This could be one of the Git GUI Clients (git-gui) recommended [http://git-scm.com/downloads/guis here].&lt;br /&gt;
You don't necessarily need a Git client for building Robocode, as you could simply get the sources from a plain .zip file. However, if you want to update your local source files with the newest sources from the Git repository and the ability to commit and/or merge changes, you will need to use some Git client in order to get access to files beside the files inside (Eclipse) project directories, e.g. if you want to check out the scripts located in the root of the Git repository for Robocode.&lt;br /&gt;
&lt;br /&gt;
The URL of the sources at GitHub is:&lt;br /&gt;
[https://github.com/robo-code/robocode.git https://github.com/robo-code/robocode.git]&lt;br /&gt;
&lt;br /&gt;
==== How to build distribution files? ====&lt;br /&gt;
&lt;br /&gt;
In order to build the distribution files containing the installer setup file (robocode-x.x.x-setup.jar) and a .zip file containing all the sources (robocode-x.x.x-src.zip) you must call the '''mvnassembly''' script from the command-line when standing within the root directory of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvnassembly&lt;br /&gt;
&lt;br /&gt;
On *nix:&lt;br /&gt;
  ./mvnassembly.sh&lt;br /&gt;
&lt;br /&gt;
This will build the distribution files, which will be put into the sub-directory named ''robocode.distribution/target''.&lt;br /&gt;
&lt;br /&gt;
'''mvnassembly''' is a script that compiles all sources of the Robocode game, creates javadoc html files, run test units, and finally creates the target distribution files. The first time this script is run, it will need to download a huge amount of .jar files from various Maven repositories and which contains Maven plugins etc. used for building Robocode. So please be patient with it the first time.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Eclipse for developing on Robocode ===&lt;br /&gt;
&lt;br /&gt;
Here follows a description of how to setup Eclipse for developing on Robocode.&lt;br /&gt;
&lt;br /&gt;
==== Software Requirements for Eclipse IDE ====&lt;br /&gt;
&lt;br /&gt;
Here follows the recommended software needed to start developing on Robocode with the Eclipse IDE:&lt;br /&gt;
&lt;br /&gt;
'''Required:'''&lt;br /&gt;
* Oracle JDK 6 ([http://www.oracle.com/technetwork/java/javase/downloads/index.html download]) must be pre-installed.&lt;br /&gt;
* Eclipse IDE for Java Developers([http://www.eclipse.org/downloads/ download]). The Juno, Kepler, Luna works fine for Robocode and supports Git.&lt;br /&gt;
&lt;br /&gt;
Please consult the [http://wiki.eclipse.org/Eclipse/Installation#Install_a_JVM installation notes] provided for Eclipse in order to find out how to install Eclipse for your specific OS.&lt;br /&gt;
&lt;br /&gt;
==== Create a workspace for Robocode ====&lt;br /&gt;
&lt;br /&gt;
When you have setup and installed Eclipse on your system (if you did not have it on your system already), a workspace must be created for Robocode.&lt;br /&gt;
&lt;br /&gt;
The first time you start up a newly installed Eclipse, it will ask for a directory for your workspace. I suggest that you create a workspace named '''robocode-workspace''' or similar and create the workspace on a partition or directory like e.g. &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; (on Windows) or &amp;lt;code&amp;gt;~&amp;lt;/code&amp;gt; (on Linux) - or any other directory of your choice. If you have already got a workspace, e.g. the default one suggested by Eclipse, you can create a new workspace if you wish by selecting 'File' -&amp;gt; 'Switch Workspace' -&amp;gt; 'Other...' from the menu.&lt;br /&gt;
&lt;br /&gt;
==== M2_REPO class path variable ====&lt;br /&gt;
&lt;br /&gt;
One of the first things you need to do in Eclipse is to set up the '''M2_REPO''' class path variable for Eclipse, which points to your local Maven 2 repository. That is, Eclipse uses the M2_REPO class path variable for locating the Maven repository containing various libraries used for compiling Robocode etc. But before you can setup the M2_REPO class path in Eclipse, you must run the 'mvnassembly' command described earlier if you have not already done that.&lt;br /&gt;
&lt;br /&gt;
When calling the 'mvnassembly' script or alternatively start off Maven within the root of the robocode sources by calling e.g. 'mvn clean install', Maven will download all required libraries from other sites into your local Maven repository. Note that you will need to locate your local Maven repository. Under Windows your Maven repository is put into your %USERPROFILE% directory, and on Linux is put into your home directory (~). The Maven repository will be put under .m2/repository.&lt;br /&gt;
&lt;br /&gt;
To setup the M2_REPO class path in Eclipse, you must go to the menu bar and select 'Window' -&amp;gt; 'Preferences'. On the Preferences window expand the 'Java' -&amp;gt; 'Build Path' and select the 'Classpath Variables'. On the page for the Classpath Variables, you click on the 'New...' button, and enter M2_REPO as name. Next, you click on the 'Folder...' button and navigate to where you have your .m2/repository directory located (in %USERPROFILE% under Windows, and ~ under Linux), e.g. &amp;lt;code&amp;gt;C:/Users/Flemming/.m2/repository&amp;lt;/code&amp;gt; (Windows) or &amp;lt;code&amp;gt;/home/fnl/.m2/repository&amp;lt;/code&amp;gt; (Linux).&lt;br /&gt;
&lt;br /&gt;
When Eclipse asks you if it should rebuild the workspace, you select 'Yes'.&lt;br /&gt;
&lt;br /&gt;
==== Configure JDK for your workspace ====&lt;br /&gt;
&lt;br /&gt;
You must setup which JDK that will be used for compiling (and running) Robocode in your workspace.&lt;br /&gt;
You do this by...&lt;br /&gt;
# selecting Window -&amp;gt; Preferences from the menu, and then unfold and select Java -&amp;gt; Installed JREs and press 'Add...' on the 'Installed JREs' page.&lt;br /&gt;
# Select 'Standard VM' on the 'JRE Type' page and press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# Press the 'Directory...' button and browse to where you have installed your JDK 6 and press 'Finish' or Enter. Make sure to select a JDK and ''not'' a JRE, as a JRE is not sufficient as it lacks the tools available with the JDK.&lt;br /&gt;
# When you get back to the 'Installed JREs' page, make sure to put a check mark in the JDK you just added and press 'OK' or Enter.&lt;br /&gt;
&lt;br /&gt;
==== Importing sources of Robocode using Git ====&lt;br /&gt;
&lt;br /&gt;
Importing the projects for Robocode into Eclipse from Git can be done from the Package Explorer, which can be opened from the menu by selecting Window -&amp;gt; Show View -&amp;gt; Package Explorer or by using the keyboard shortcut by pressing Alt+Shift+Q and P. In the Package Explorer, you...&lt;br /&gt;
&lt;br /&gt;
# Right-click the mouse and select 'Import...' in the popup menu that occurs.&lt;br /&gt;
# Unfold 'Git' in the 'Import' window and double-click 'Projects from Git'.&lt;br /&gt;
# On the 'Import Projects from Git' you select 'URI'.&lt;br /&gt;
# On the next page named 'Source Git Repository' to enter '''https://github.com/robo-code/robocode.git''' into the 'URI:' text field and press Enter or 'Next &amp;gt;'.&lt;br /&gt;
# On the 'Branch Selection' page you press 'Deselect All' and select the branch you want to work on. This would normally be 'master', which is the master branch of Robocode. When the branch selection is made, you press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# On the 'Local Destination' page, you must note the directory where your local files will be put. I recommend you use the directory suggested by Git (Eclipse) and press 'Finish' or Enter.&lt;br /&gt;
# On the 'Select a wizard to use for importing projects', make sure 'Import existing projects' is selected and press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# On 'Import Projects', you should deselect the first project named 'plugins' as you would normally not want to develop on plugins for Robocode - otherwise just omit deselecting 'plugins'. Press 'Finish' or Enter.&lt;br /&gt;
# All Robocode projects will now be imported into Eclipse and be visible in the Package Explorer.&lt;br /&gt;
# Now, select all projects (press Ctrl+A) and right-click the Package Explorer and select Replace With -&amp;gt; HEAD Revision on the popup menu that occurs, and press 'OK' or Enter to discard local changes on the dialog that appears.&lt;br /&gt;
&lt;br /&gt;
Congratulations, you should now be able to get started working on the Robocode sources in Eclipse. :-)&lt;br /&gt;
&lt;br /&gt;
==== Launch Robocode ====&lt;br /&gt;
&lt;br /&gt;
Before launching Robocode for the first time, you should make sure that it is cleaned and compiled first. You do this by selecting Project -&amp;gt; Clean... from the menu. You should also make sure that you have run the 'mvnassembly' described previously, which will download and update your local Maven repository, which is necessary for compiling and running Robocode.&lt;br /&gt;
&lt;br /&gt;
Please notice that it might be necessary to refresh the sources in Eclipse when files are changed outside the Eclipse editor, which is the case when running the 'mvnassembly' script. You can do this from the Package Explorer by right-clicking in this and select 'Refresh'.&lt;br /&gt;
&lt;br /&gt;
In order to start running or debugging Robocode, you should select the &amp;quot;Bug&amp;quot; (debug) or &amp;quot;Play&amp;quot; (run) button in the top of Eclipse under the menu. You should press the little arrow beside these green buttons in order to choose among: Robocode, RoboRumble, TeamRumble, and MeleeRumble. The 3 last ones are for running the RoboRumble@Home clients.&lt;br /&gt;
&lt;br /&gt;
==== How to run the unit tests? ====&lt;br /&gt;
&lt;br /&gt;
When you want to run the unit test from within Eclipse, you must do this from the the Package Explorer, where you right-click on the 'robocode.tests' project and select 'Run As' -&amp;gt; 'JUnit Test'. Now all available unit tests will run automatically.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can start the tests from the command-line by standing on your robocode workspace, and write the following Maven command.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvn test install&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  ./mvn.sh test install&lt;br /&gt;
&lt;br /&gt;
=== Robocode developers and contributions ===&lt;br /&gt;
&lt;br /&gt;
Robocode developers have discussion group at robocode-developers@googlegroups.com. Everybody interested in discussion about future of Robocode are welcome. We also welcome your contributions there. The discussion group is located here: http://groups.google.com/group/robocode-developers.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Robocode/Old Developers Guide for building Robocode|Old version]] of the Developer's Guide for building Robocode for Robocode versions prior to version 1.7.&lt;br /&gt;
* [http://code.google.com/p/robocode/source/browse/ Browse the sources] of Robocode.&lt;br /&gt;
* [http://sourceforge.net/project/showfiles.php?group_id=37202&amp;amp;package_id=218677 Download the sources] of Robocode.&lt;br /&gt;
* [http://groups.google.com/group/robocode-developers Robocode developers discussion group].&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* The [http://sourceforge.net/projects/robocode Robocode project] on SourceForge.&lt;br /&gt;
* [http://sourceforge.net/svn/?group_id=37202 How to access] the SVN Repository for Robocode.&lt;br /&gt;
* [http://www.eclipse.org/ Eclipse] - an open development platform supported by Robocode.&lt;br /&gt;
* [http://maven.apache.org/ Apache Maven] used for building Robocode.&lt;br /&gt;
* [http://maven.apache.org/guides/mini/guide-ide-eclipse.html Guide] to using Eclipse with Maven 2.x.&lt;br /&gt;
* [http://www.eclipse.org/subversive/ Eclipse Subversive] is a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://subclipse.tigris.org/ Subclipse] is also a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://tortoisesvn.net TortoiseSVN], a Subversion client for Windows.&lt;br /&gt;
* [http://www.open.collab.net/downloads/subversion/ CollabNets Subversion], a Subversion client for both Windows and Linux.&lt;br /&gt;
&lt;br /&gt;
[[Category:Robocode Documentation]]&lt;br /&gt;
[[Category:Eclipse IDE]]&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=55053</id>
		<title>Robocode/Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=55053"/>
		<updated>2018-10-19T23:25:52Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: /* Required technical skills? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide describes how to build the Robocode application, i.e. the game itself, and not how to build bots for Robocode.&lt;br /&gt;
&lt;br /&gt;
== Developer's Guide for building Robocode with Eclipse setup ==&lt;br /&gt;
&lt;br /&gt;
=== Notice ===&lt;br /&gt;
&lt;br /&gt;
This guide is intended for experienced Java developers, who want to work on the Robocode application, and describes all basic stuff required to compile and run Robocode within the [http://www.eclipse.org Eclipse] IDE.&lt;br /&gt;
&lt;br /&gt;
If you just need to browse the sources, you can do it from [https://github.com/robo-code/robocode here] or you can download the zipped sources from [http://sourceforge.net/projects/robocode/files/robocode%20sources/ here].&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Basically, all you need to get started with building Robocode is:&lt;br /&gt;
&lt;br /&gt;
* Oracle JDK 8 ([https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html Java SE Development Kit 8 Downloads]). Note that only version 6, 7, and 8 will work. Newer versions are not supported (yet) and are almost guaranteed to cause building problems.&lt;br /&gt;
* Source files for Robocode ([https://github.com/robo-code/robocode on GitHub]), which you get by doing a Git clone.&lt;br /&gt;
* An Internet connection.&lt;br /&gt;
&lt;br /&gt;
Other than that, you need to be a skilled Java developer in order to figure out how Robocode is put together. Robocode is a complex application and requires a big effort to grasp and understand. There is practically no documentation available that describe the internal logic, architecture, game rules, coding conventions etc. So you will probably be on your own when trying to figure out how Robocode it put together.&lt;br /&gt;
&lt;br /&gt;
An Internet connection is required for building Robocode distribution files as the build tool (Maven) needs access to [http://maven.apache.org/guides/introduction/introduction-to-repositories.html remote repositories], which contains various libraries and binaries. Some libraries are used for building Robocode, and others are used for running Robocode, and hence need to be put into the distribution files.&lt;br /&gt;
In order to get updates to the sources of Robocode when new versions emerge, an Internet connection is also critical to download changed sources and merge the changes with your version of the sources etc.&lt;br /&gt;
&lt;br /&gt;
Note that all sources of Robocode are for Java 6, meaning that Robocode is able to run on very old Java versions, which is intentional.&lt;br /&gt;
&lt;br /&gt;
==== Installing the JDK ====&lt;br /&gt;
&lt;br /&gt;
Robocode is being developed using Oracle's Java SE, and requires the Java Developer Kit ('''JDK'''), minimum version 6, to be pre-installed on the system used for building Robocode. Please note that a Java Runtime Environment ('''JRE''') is not enough as it does not contain the required developer tools needed for building Robocode. Currently, the Oracle JDK version 8 is recommended for building Robocode.&lt;br /&gt;
&lt;br /&gt;
Notice that when installing the JDK, it is highly recommended that you '''install the sources provided for Java''' as the sources are very useful when debugging Robocode. However, this is not a requirement.&lt;br /&gt;
&lt;br /&gt;
==== Setting up Java Environment Variables ====&lt;br /&gt;
&lt;br /&gt;
You must set up the environment variable named '''JAVA_HOME''' and extend another environment variable named '''PATH'''. You find information on how to setup JAVA_HOME and PATH on the net, e.g. [https://docs.oracle.com/cd/E19182-01/821-0917/inst_jdk_javahome_t/index.html here].&lt;br /&gt;
&lt;br /&gt;
'''JAVA_HOME must be set up point to the root directory of the JDK you intend to use.'''&lt;br /&gt;
&lt;br /&gt;
The PATH environment variable must be extended in order to locate the Java commands like 'java', 'javac' and lots of other tools in the JDK. Extending PATH is considered best practice when setting up the Java development environment, and makes it possible for other tools like e.g. Maven to locate the proper JDK tools. It also makes it possible for you to detirmine which JRE that is being used when running a Java application by writting &amp;lt;code&amp;gt;java -version&amp;lt;/code&amp;gt; in the command-line/shell, and detirmine which Java compiler that is being used by writting &amp;lt;code&amp;gt;javac -version&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
&lt;br /&gt;
'''Windows:'''&lt;br /&gt;
* JAVA_HOME is set to e.g. &amp;lt;code&amp;gt;JAVA_HOME=&amp;quot;C:\Program Files\Java\jdk1.8.0_162&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* PATH is extended, e.g. to &amp;lt;code&amp;gt;PATH=%JAVA_HOME%\bin;PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Linux / *nix:'''&lt;br /&gt;
* JAVA_HOME is set by e.g. &amp;lt;code&amp;gt;export JAVA_HOME=/usr/java/jdk1.8.0_162/bin/java&amp;lt;/code&amp;gt;. (Bash)&lt;br /&gt;
* PATH is extended, e.g. by &amp;lt;code&amp;gt;export PATH=$JAVA_HOME/bin:$PATH&amp;lt;/code&amp;gt;. (Bash)&lt;br /&gt;
&lt;br /&gt;
'''Mac OS X:'''&lt;br /&gt;
* JAVA_HOME is set by e.g. &amp;lt;code&amp;gt;export JAVA_HOME=$(/usr/libexec/java_home)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* PATH is extended, e.g. by &amp;lt;code&amp;gt;export PATH=${JAVA_HOME}/bin:$PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you want more information on how to set up your JAVA_HOME and PATH environment variables for your specific OS, please read the installation notes provided for the Oracle JDK here:&lt;br /&gt;
&lt;br /&gt;
'''Installation instructions from Oracle:'''&lt;br /&gt;
* [https://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html JDK 8 and JRE 8 Installation Start Here].&lt;br /&gt;
* [https://www.oracle.com/technetwork/java/javase/certconfig-2095354.html Oracle JDK 8 and JRE 8 Certified System Configurations Contents] for ''all'' supported systems.&lt;br /&gt;
&lt;br /&gt;
==== Required technical skills? ====&lt;br /&gt;
&lt;br /&gt;
In order to develop on Robocode, you need to know the basics of these tools:&lt;br /&gt;
&lt;br /&gt;
* Git and GitHub ([http://www.vogella.com/articles/Git/article.html Tutorial])&lt;br /&gt;
* Maven ([http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html Tutorial])&lt;br /&gt;
* Eclipse IDE ([http://www.vogella.com/articles/Eclipse/article.html Tutorial])&lt;br /&gt;
&lt;br /&gt;
Notice that you do not have to be an expert in Git/GitHub, Maven, or Eclipse. But you need some basic knowledge about these tools to understand how to build Robocode. In fact, trying to build Robocode might actually be a very good way of learning these tools, if you don't know them already or miss some practical experience with these. :-)&lt;br /&gt;
&lt;br /&gt;
Eclipse is not required for building Robocode, meaning that you are free to use any IDE of your choice. However, all set up for building Robocode has primarily been focused on Eclipse, and the same goes for this guide. If you manage to setup Robocode for e.g. IntelliJ IDEA or any other IDE, you are welcome to write a guide for how to set up Robocode for your particular IDE as other developers might be very interested in using the same IDE.&lt;br /&gt;
&lt;br /&gt;
All sources of Robocode are available at [https://github.com/robo-code/robocode GitHub]. At GitHub, you can download sources as a zipped file or create your own [https://help.github.com/articles/fork-a-repo fork], if you want to.&lt;br /&gt;
&lt;br /&gt;
In order to get build Robocode, Maven must be installed on your system. At present day, Maven 3.5.4 is the newest version and is able to build Robocode. Read more about how to install Maven [https://maven.apache.org/install.html here]. Note that the [https://github.com/takari/maven-wrapper Maven Wrapper] is being used by Robocode. Hence, you must run this Maven command from a command prompt or shell inside the your root directory for Robocode:&lt;br /&gt;
&lt;br /&gt;
mvn -N io.takari:maven:wrapper -Dmaven=3.5.2&lt;br /&gt;
&lt;br /&gt;
Notice that the shell scripts (.sh files) should work under Unix and *nix like OSes including Max OS X. However, the shell scripts have only been tested under Linux (on Ubuntu), so there is no guarantee that these will run without issues on other *nix systems.&lt;br /&gt;
&lt;br /&gt;
You don't have to worry too much about how to setup Eclipse for Robocode as the provided sources contains all configuration files needed by Eclipse. Some of these files are generated using Maven's build-in support for Eclipse. However, you will need to do some basic pre-configuration of Eclipse before you'll be able to get started with working on Robocode. You should only need to set up a workspace for Robocode once. However, you will need to update the sources from the remote repository on GitHub once in a while, and merge changes with your sources in order to keep up-to-date with the current versions of Robocode, i.e. the trunk/head of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
=== Checking out sources from GitHub ===&lt;br /&gt;
&lt;br /&gt;
In the following, I assume that you want to '''check out''' the sources from GitHub using some [http://git-scm.com/downloads Git client].  This could be one of the Git GUI Clients (git-gui) recommended [http://git-scm.com/downloads/guis here].&lt;br /&gt;
You don't necessarily need a Git client for building Robocode, as you could simply get the sources from a plain .zip file. However, if you want to update your local source files with the newest sources from the Git repository and the ability to commit and/or merge changes, you will need to use some Git client in order to get access to files beside the files inside (Eclipse) project directories, e.g. if you want to check out the scripts located in the root of the Git repository for Robocode.&lt;br /&gt;
&lt;br /&gt;
The URL of the sources at GitHub is:&lt;br /&gt;
[https://github.com/robo-code/robocode.git https://github.com/robo-code/robocode.git]&lt;br /&gt;
&lt;br /&gt;
==== How to build distribution files? ====&lt;br /&gt;
&lt;br /&gt;
In order to build the distribution files containing the installer setup file (robocode-x.x.x-setup.jar) and a .zip file containing all the sources (robocode-x.x.x-src.zip) you must call the '''mvnassembly''' script from the command-line when standing within the root directory of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvnassembly&lt;br /&gt;
&lt;br /&gt;
On *nix:&lt;br /&gt;
  ./mvnassembly.sh&lt;br /&gt;
&lt;br /&gt;
This will build the distribution files, which will be put into the sub-directory named ''robocode.distribution/target''.&lt;br /&gt;
&lt;br /&gt;
'''mvnassembly''' is a script that compiles all sources of the Robocode game, creates javadoc html files, run test units, and finally creates the target distribution files. The first time this script is run, it will need to download a huge amount of .jar files from various Maven repositories and which contains Maven plugins etc. used for building Robocode. So please be patient with it the first time.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Eclipse for developing on Robocode ===&lt;br /&gt;
&lt;br /&gt;
Here follows a description of how to setup Eclipse for developing on Robocode.&lt;br /&gt;
&lt;br /&gt;
==== Software Requirements for Eclipse IDE ====&lt;br /&gt;
&lt;br /&gt;
Here follows the recommended software needed to start developing on Robocode with the Eclipse IDE:&lt;br /&gt;
&lt;br /&gt;
'''Required:'''&lt;br /&gt;
* Oracle JDK 6 ([http://www.oracle.com/technetwork/java/javase/downloads/index.html download]) must be pre-installed.&lt;br /&gt;
* Eclipse IDE for Java Developers([http://www.eclipse.org/downloads/ download]). The Juno, Kepler, Luna works fine for Robocode and supports Git.&lt;br /&gt;
&lt;br /&gt;
Please consult the [http://wiki.eclipse.org/Eclipse/Installation#Install_a_JVM installation notes] provided for Eclipse in order to find out how to install Eclipse for your specific OS.&lt;br /&gt;
&lt;br /&gt;
==== Create a workspace for Robocode ====&lt;br /&gt;
&lt;br /&gt;
When you have setup and installed Eclipse on your system (if you did not have it on your system already), a workspace must be created for Robocode.&lt;br /&gt;
&lt;br /&gt;
The first time you start up a newly installed Eclipse, it will ask for a directory for your workspace. I suggest that you create a workspace named '''robocode-workspace''' or similar and create the workspace on a partition or directory like e.g. &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; (on Windows) or &amp;lt;code&amp;gt;~&amp;lt;/code&amp;gt; (on Linux) - or any other directory of your choice. If you have already got a workspace, e.g. the default one suggested by Eclipse, you can create a new workspace if you wish by selecting 'File' -&amp;gt; 'Switch Workspace' -&amp;gt; 'Other...' from the menu.&lt;br /&gt;
&lt;br /&gt;
==== M2_REPO class path variable ====&lt;br /&gt;
&lt;br /&gt;
One of the first things you need to do in Eclipse is to set up the '''M2_REPO''' class path variable for Eclipse, which points to your local Maven 2 repository. That is, Eclipse uses the M2_REPO class path variable for locating the Maven repository containing various libraries used for compiling Robocode etc. But before you can setup the M2_REPO class path in Eclipse, you must run the 'mvnassembly' command described earlier if you have not already done that.&lt;br /&gt;
&lt;br /&gt;
When calling the 'mvnassembly' script or alternatively start off Maven within the root of the robocode sources by calling e.g. 'mvn clean install', Maven will download all required libraries from other sites into your local Maven repository. Note that you will need to locate your local Maven repository. Under Windows your Maven repository is put into your %USERPROFILE% directory, and on Linux is put into your home directory (~). The Maven repository will be put under .m2/repository.&lt;br /&gt;
&lt;br /&gt;
To setup the M2_REPO class path in Eclipse, you must go to the menu bar and select 'Window' -&amp;gt; 'Preferences'. On the Preferences window expand the 'Java' -&amp;gt; 'Build Path' and select the 'Classpath Variables'. On the page for the Classpath Variables, you click on the 'New...' button, and enter M2_REPO as name. Next, you click on the 'Folder...' button and navigate to where you have your .m2/repository directory located (in %USERPROFILE% under Windows, and ~ under Linux), e.g. &amp;lt;code&amp;gt;C:/Users/Flemming/.m2/repository&amp;lt;/code&amp;gt; (Windows) or &amp;lt;code&amp;gt;/home/fnl/.m2/repository&amp;lt;/code&amp;gt; (Linux).&lt;br /&gt;
&lt;br /&gt;
When Eclipse asks you if it should rebuild the workspace, you select 'Yes'.&lt;br /&gt;
&lt;br /&gt;
==== Configure JDK for your workspace ====&lt;br /&gt;
&lt;br /&gt;
You must setup which JDK that will be used for compiling (and running) Robocode in your workspace.&lt;br /&gt;
You do this by...&lt;br /&gt;
# selecting Window -&amp;gt; Preferences from the menu, and then unfold and select Java -&amp;gt; Installed JREs and press 'Add...' on the 'Installed JREs' page.&lt;br /&gt;
# Select 'Standard VM' on the 'JRE Type' page and press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# Press the 'Directory...' button and browse to where you have installed your JDK 6 and press 'Finish' or Enter. Make sure to select a JDK and ''not'' a JRE, as a JRE is not sufficient as it lacks the tools available with the JDK.&lt;br /&gt;
# When you get back to the 'Installed JREs' page, make sure to put a check mark in the JDK you just added and press 'OK' or Enter.&lt;br /&gt;
&lt;br /&gt;
==== Importing sources of Robocode using Git ====&lt;br /&gt;
&lt;br /&gt;
Importing the projects for Robocode into Eclipse from Git can be done from the Package Explorer, which can be opened from the menu by selecting Window -&amp;gt; Show View -&amp;gt; Package Explorer or by using the keyboard shortcut by pressing Alt+Shift+Q and P. In the Package Explorer, you...&lt;br /&gt;
&lt;br /&gt;
# Right-click the mouse and select 'Import...' in the popup menu that occurs.&lt;br /&gt;
# Unfold 'Git' in the 'Import' window and double-click 'Projects from Git'.&lt;br /&gt;
# On the 'Import Projects from Git' you select 'URI'.&lt;br /&gt;
# On the next page named 'Source Git Repository' to enter '''https://github.com/robo-code/robocode.git''' into the 'URI:' text field and press Enter or 'Next &amp;gt;'.&lt;br /&gt;
# On the 'Branch Selection' page you press 'Deselect All' and select the branch you want to work on. This would normally be 'master', which is the master branch of Robocode. When the branch selection is made, you press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# On the 'Local Destination' page, you must note the directory where your local files will be put. I recommend you use the directory suggested by Git (Eclipse) and press 'Finish' or Enter.&lt;br /&gt;
# On the 'Select a wizard to use for importing projects', make sure 'Import existing projects' is selected and press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# On 'Import Projects', you should deselect the first project named 'plugins' as you would normally not want to develop on plugins for Robocode - otherwise just omit deselecting 'plugins'. Press 'Finish' or Enter.&lt;br /&gt;
# All Robocode projects will now be imported into Eclipse and be visible in the Package Explorer.&lt;br /&gt;
# Now, select all projects (press Ctrl+A) and right-click the Package Explorer and select Replace With -&amp;gt; HEAD Revision on the popup menu that occurs, and press 'OK' or Enter to discard local changes on the dialog that appears.&lt;br /&gt;
&lt;br /&gt;
Congratulations, you should now be able to get started working on the Robocode sources in Eclipse. :-)&lt;br /&gt;
&lt;br /&gt;
==== Launch Robocode ====&lt;br /&gt;
&lt;br /&gt;
Before launching Robocode for the first time, you should make sure that it is cleaned and compiled first. You do this by selecting Project -&amp;gt; Clean... from the menu. You should also make sure that you have run the 'mvnassembly' described previously, which will download and update your local Maven repository, which is necessary for compiling and running Robocode.&lt;br /&gt;
&lt;br /&gt;
Please notice that it might be necessary to refresh the sources in Eclipse when files are changed outside the Eclipse editor, which is the case when running the 'mvnassembly' script. You can do this from the Package Explorer by right-clicking in this and select 'Refresh'.&lt;br /&gt;
&lt;br /&gt;
In order to start running or debugging Robocode, you should select the &amp;quot;Bug&amp;quot; (debug) or &amp;quot;Play&amp;quot; (run) button in the top of Eclipse under the menu. You should press the little arrow beside these green buttons in order to choose among: Robocode, RoboRumble, TeamRumble, and MeleeRumble. The 3 last ones are for running the RoboRumble@Home clients.&lt;br /&gt;
&lt;br /&gt;
==== How to run the unit tests? ====&lt;br /&gt;
&lt;br /&gt;
When you want to run the unit test from within Eclipse, you must do this from the the Package Explorer, where you right-click on the 'robocode.tests' project and select 'Run As' -&amp;gt; 'JUnit Test'. Now all available unit tests will run automatically.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can start the tests from the command-line by standing on your robocode workspace, and write the following Maven command.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvn test install&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  ./mvn.sh test install&lt;br /&gt;
&lt;br /&gt;
=== Robocode developers and contributions ===&lt;br /&gt;
&lt;br /&gt;
Robocode developers have discussion group at robocode-developers@googlegroups.com. Everybody interested in discussion about future of Robocode are welcome. We also welcome your contributions there. The discussion group is located here: http://groups.google.com/group/robocode-developers.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Robocode/Old Developers Guide for building Robocode|Old version]] of the Developer's Guide for building Robocode for Robocode versions prior to version 1.7.&lt;br /&gt;
* [http://code.google.com/p/robocode/source/browse/ Browse the sources] of Robocode.&lt;br /&gt;
* [http://sourceforge.net/project/showfiles.php?group_id=37202&amp;amp;package_id=218677 Download the sources] of Robocode.&lt;br /&gt;
* [http://groups.google.com/group/robocode-developers Robocode developers discussion group].&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* The [http://sourceforge.net/projects/robocode Robocode project] on SourceForge.&lt;br /&gt;
* [http://sourceforge.net/svn/?group_id=37202 How to access] the SVN Repository for Robocode.&lt;br /&gt;
* [http://www.eclipse.org/ Eclipse] - an open development platform supported by Robocode.&lt;br /&gt;
* [http://maven.apache.org/ Apache Maven] used for building Robocode.&lt;br /&gt;
* [http://maven.apache.org/guides/mini/guide-ide-eclipse.html Guide] to using Eclipse with Maven 2.x.&lt;br /&gt;
* [http://www.eclipse.org/subversive/ Eclipse Subversive] is a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://subclipse.tigris.org/ Subclipse] is also a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://tortoisesvn.net TortoiseSVN], a Subversion client for Windows.&lt;br /&gt;
* [http://www.open.collab.net/downloads/subversion/ CollabNets Subversion], a Subversion client for both Windows and Linux.&lt;br /&gt;
&lt;br /&gt;
[[Category:Robocode Documentation]]&lt;br /&gt;
[[Category:Eclipse IDE]]&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=55052</id>
		<title>Robocode/Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=55052"/>
		<updated>2018-10-19T23:12:00Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: /* Required technical skills? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide describes how to build the Robocode application, i.e. the game itself, and not how to build bots for Robocode.&lt;br /&gt;
&lt;br /&gt;
== Developer's Guide for building Robocode with Eclipse setup ==&lt;br /&gt;
&lt;br /&gt;
=== Notice ===&lt;br /&gt;
&lt;br /&gt;
This guide is intended for experienced Java developers, who want to work on the Robocode application, and describes all basic stuff required to compile and run Robocode within the [http://www.eclipse.org Eclipse] IDE.&lt;br /&gt;
&lt;br /&gt;
If you just need to browse the sources, you can do it from [https://github.com/robo-code/robocode here] or you can download the zipped sources from [http://sourceforge.net/projects/robocode/files/robocode%20sources/ here].&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Basically, all you need to get started with building Robocode is:&lt;br /&gt;
&lt;br /&gt;
* Oracle JDK 8 ([https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html Java SE Development Kit 8 Downloads]). Note that only version 6, 7, and 8 will work. Newer versions are not supported (yet) and are almost guaranteed to cause building problems.&lt;br /&gt;
* Source files for Robocode ([https://github.com/robo-code/robocode on GitHub]), which you get by doing a Git clone.&lt;br /&gt;
* An Internet connection.&lt;br /&gt;
&lt;br /&gt;
Other than that, you need to be a skilled Java developer in order to figure out how Robocode is put together. Robocode is a complex application and requires a big effort to grasp and understand. There is practically no documentation available that describe the internal logic, architecture, game rules, coding conventions etc. So you will probably be on your own when trying to figure out how Robocode it put together.&lt;br /&gt;
&lt;br /&gt;
An Internet connection is required for building Robocode distribution files as the build tool (Maven) needs access to [http://maven.apache.org/guides/introduction/introduction-to-repositories.html remote repositories], which contains various libraries and binaries. Some libraries are used for building Robocode, and others are used for running Robocode, and hence need to be put into the distribution files.&lt;br /&gt;
In order to get updates to the sources of Robocode when new versions emerge, an Internet connection is also critical to download changed sources and merge the changes with your version of the sources etc.&lt;br /&gt;
&lt;br /&gt;
Note that all sources of Robocode are for Java 6, meaning that Robocode is able to run on very old Java versions, which is intentional.&lt;br /&gt;
&lt;br /&gt;
==== Installing the JDK ====&lt;br /&gt;
&lt;br /&gt;
Robocode is being developed using Oracle's Java SE, and requires the Java Developer Kit ('''JDK'''), minimum version 6, to be pre-installed on the system used for building Robocode. Please note that a Java Runtime Environment ('''JRE''') is not enough as it does not contain the required developer tools needed for building Robocode. Currently, the Oracle JDK version 8 is recommended for building Robocode.&lt;br /&gt;
&lt;br /&gt;
Notice that when installing the JDK, it is highly recommended that you '''install the sources provided for Java''' as the sources are very useful when debugging Robocode. However, this is not a requirement.&lt;br /&gt;
&lt;br /&gt;
==== Setting up Java Environment Variables ====&lt;br /&gt;
&lt;br /&gt;
You must set up the environment variable named '''JAVA_HOME''' and extend another environment variable named '''PATH'''. You find information on how to setup JAVA_HOME and PATH on the net, e.g. [https://docs.oracle.com/cd/E19182-01/821-0917/inst_jdk_javahome_t/index.html here].&lt;br /&gt;
&lt;br /&gt;
'''JAVA_HOME must be set up point to the root directory of the JDK you intend to use.'''&lt;br /&gt;
&lt;br /&gt;
The PATH environment variable must be extended in order to locate the Java commands like 'java', 'javac' and lots of other tools in the JDK. Extending PATH is considered best practice when setting up the Java development environment, and makes it possible for other tools like e.g. Maven to locate the proper JDK tools. It also makes it possible for you to detirmine which JRE that is being used when running a Java application by writting &amp;lt;code&amp;gt;java -version&amp;lt;/code&amp;gt; in the command-line/shell, and detirmine which Java compiler that is being used by writting &amp;lt;code&amp;gt;javac -version&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
&lt;br /&gt;
'''Windows:'''&lt;br /&gt;
* JAVA_HOME is set to e.g. &amp;lt;code&amp;gt;JAVA_HOME=&amp;quot;C:\Program Files\Java\jdk1.8.0_162&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* PATH is extended, e.g. to &amp;lt;code&amp;gt;PATH=%JAVA_HOME%\bin;PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Linux / *nix:'''&lt;br /&gt;
* JAVA_HOME is set by e.g. &amp;lt;code&amp;gt;export JAVA_HOME=/usr/java/jdk1.8.0_162/bin/java&amp;lt;/code&amp;gt;. (Bash)&lt;br /&gt;
* PATH is extended, e.g. by &amp;lt;code&amp;gt;export PATH=$JAVA_HOME/bin:$PATH&amp;lt;/code&amp;gt;. (Bash)&lt;br /&gt;
&lt;br /&gt;
'''Mac OS X:'''&lt;br /&gt;
* JAVA_HOME is set by e.g. &amp;lt;code&amp;gt;export JAVA_HOME=$(/usr/libexec/java_home)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* PATH is extended, e.g. by &amp;lt;code&amp;gt;export PATH=${JAVA_HOME}/bin:$PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you want more information on how to set up your JAVA_HOME and PATH environment variables for your specific OS, please read the installation notes provided for the Oracle JDK here:&lt;br /&gt;
&lt;br /&gt;
'''Installation instructions from Oracle:'''&lt;br /&gt;
* [https://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html JDK 8 and JRE 8 Installation Start Here].&lt;br /&gt;
* [https://www.oracle.com/technetwork/java/javase/certconfig-2095354.html Oracle JDK 8 and JRE 8 Certified System Configurations Contents] for ''all'' supported systems.&lt;br /&gt;
&lt;br /&gt;
==== Required technical skills? ====&lt;br /&gt;
&lt;br /&gt;
In order to develop on Robocode, you need to know the basics of these tools:&lt;br /&gt;
&lt;br /&gt;
* Git and GitHub ([http://www.vogella.com/articles/Git/article.html Tutorial])&lt;br /&gt;
* Maven ([http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html Tutorial])&lt;br /&gt;
* Eclipse IDE ([http://www.vogella.com/articles/Eclipse/article.html Tutorial])&lt;br /&gt;
&lt;br /&gt;
Notice that you do not have to be an expert in Git/GitHub, Maven, or Eclipse. But you need some basic knowledge about these tools to understand how to build Robocode. In fact, trying to build Robocode might actually be a very good way of learning these tools, if you don't know them already or miss some practical experience with these. :-)&lt;br /&gt;
Eclipse is not required for building Robocode, meaning that you are free to use any IDE of your choice. However, all set up for building Robocode has primarily been focused on Eclipse, and the same goes for this guide. If you manage to setup Robocode for e.g. IntelliJ IDEA or any other IDE, you are welcome to write a guide for how to set up Robocode for your particular IDE as other developers might be very interested in using the same IDE.&lt;br /&gt;
&lt;br /&gt;
When you need to start editing the sources of Robocode, you naturally might want to use an IDE for compiling and run Robocode on the fly to quickly see the effect of your work. This is where [http://www.eclipse.org Eclipse IDE] comes into the picture for this guide, as many Java developers regards the Eclipse IDE as the best IDE for Java development. Eclipse comes free of charge, has a huge community, automatic compilation, a rich source code editor, a flexible window layout, and lots of plug-ins. Eclipse has been choosen as the primary IDE for building Robocode, and thus this guide only describes how to setup and build Robocode with this IDE.&lt;br /&gt;
If you want to use another IDE for developing Robocode you need to figure out how to set it up by yourself based on the details from this guide. And you are more than welcome to add a page beside this article that described how to setup everything for IDE of your choise and link to it from this article. :-)&lt;br /&gt;
&lt;br /&gt;
All sources of Robocode are available at [https://github.com/robo-code/robocode GitHub]. At GitHub, you can download sources as a zipped file or create your own [https://help.github.com/articles/fork-a-repo clone/fork], if you want to.&lt;br /&gt;
&lt;br /&gt;
Even though Maven is used as build tool, you don't need to pre-install it on your system. Batch (.bat) and shell (.sh) files are provided with the source files. These scripts will automatically download required libraries, scripts and tools required for building Robocode. Hence, no tools needs to be pre-installed in order to build Robocode beside the JDK and correct environment settings for JAVA_HOME and PATH.&lt;br /&gt;
&lt;br /&gt;
Notice that the shell scripts (.sh files) should work under Unix and *nix like OSes including Max OS X. However, the shell scripts have only been tested under Linux (on Ubuntu), so there is no guarantee that these will run without issues on other *nix systems.&lt;br /&gt;
&lt;br /&gt;
You don't have to worry too much about how to setup Eclipse for Robocode as the provided sources contains all configuration files needed by Eclipse. Some of these files are generated using Maven's build-in support for Eclipse. However, you will need to do some basic pre-configuration of Eclipse before you'll be able to get started with working on Robocode. You should only need to set up a workspace for Robocode once. However, you will need to update the sources from the remote repository on GitHub once in a while, and merge changes with your sources in order to keep up-to-date with the current versions of Robocode, i.e. the trunk/head of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
=== Checking out sources from GitHub ===&lt;br /&gt;
&lt;br /&gt;
In the following, I assume that you want to '''check out''' the sources from GitHub using some [http://git-scm.com/downloads Git client].  This could be one of the Git GUI Clients (git-gui) recommended [http://git-scm.com/downloads/guis here].&lt;br /&gt;
You don't necessarily need a Git client for building Robocode, as you could simply get the sources from a plain .zip file. However, if you want to update your local source files with the newest sources from the Git repository and the ability to commit and/or merge changes, you will need to use some Git client in order to get access to files beside the files inside (Eclipse) project directories, e.g. if you want to check out the scripts located in the root of the Git repository for Robocode.&lt;br /&gt;
&lt;br /&gt;
The URL of the sources at GitHub is:&lt;br /&gt;
[https://github.com/robo-code/robocode.git https://github.com/robo-code/robocode.git]&lt;br /&gt;
&lt;br /&gt;
==== How to build distribution files? ====&lt;br /&gt;
&lt;br /&gt;
In order to build the distribution files containing the installer setup file (robocode-x.x.x-setup.jar) and a .zip file containing all the sources (robocode-x.x.x-src.zip) you must call the '''mvnassembly''' script from the command-line when standing within the root directory of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvnassembly&lt;br /&gt;
&lt;br /&gt;
On *nix:&lt;br /&gt;
  ./mvnassembly.sh&lt;br /&gt;
&lt;br /&gt;
This will build the distribution files, which will be put into the sub-directory named ''robocode.distribution/target''.&lt;br /&gt;
&lt;br /&gt;
'''mvnassembly''' is a script that compiles all sources of the Robocode game, creates javadoc html files, run test units, and finally creates the target distribution files. The first time this script is run, it will need to download a huge amount of .jar files from various Maven repositories and which contains Maven plugins etc. used for building Robocode. So please be patient with it the first time.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Eclipse for developing on Robocode ===&lt;br /&gt;
&lt;br /&gt;
Here follows a description of how to setup Eclipse for developing on Robocode.&lt;br /&gt;
&lt;br /&gt;
==== Software Requirements for Eclipse IDE ====&lt;br /&gt;
&lt;br /&gt;
Here follows the recommended software needed to start developing on Robocode with the Eclipse IDE:&lt;br /&gt;
&lt;br /&gt;
'''Required:'''&lt;br /&gt;
* Oracle JDK 6 ([http://www.oracle.com/technetwork/java/javase/downloads/index.html download]) must be pre-installed.&lt;br /&gt;
* Eclipse IDE for Java Developers([http://www.eclipse.org/downloads/ download]). The Juno, Kepler, Luna works fine for Robocode and supports Git.&lt;br /&gt;
&lt;br /&gt;
Please consult the [http://wiki.eclipse.org/Eclipse/Installation#Install_a_JVM installation notes] provided for Eclipse in order to find out how to install Eclipse for your specific OS.&lt;br /&gt;
&lt;br /&gt;
==== Create a workspace for Robocode ====&lt;br /&gt;
&lt;br /&gt;
When you have setup and installed Eclipse on your system (if you did not have it on your system already), a workspace must be created for Robocode.&lt;br /&gt;
&lt;br /&gt;
The first time you start up a newly installed Eclipse, it will ask for a directory for your workspace. I suggest that you create a workspace named '''robocode-workspace''' or similar and create the workspace on a partition or directory like e.g. &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; (on Windows) or &amp;lt;code&amp;gt;~&amp;lt;/code&amp;gt; (on Linux) - or any other directory of your choice. If you have already got a workspace, e.g. the default one suggested by Eclipse, you can create a new workspace if you wish by selecting 'File' -&amp;gt; 'Switch Workspace' -&amp;gt; 'Other...' from the menu.&lt;br /&gt;
&lt;br /&gt;
==== M2_REPO class path variable ====&lt;br /&gt;
&lt;br /&gt;
One of the first things you need to do in Eclipse is to set up the '''M2_REPO''' class path variable for Eclipse, which points to your local Maven 2 repository. That is, Eclipse uses the M2_REPO class path variable for locating the Maven repository containing various libraries used for compiling Robocode etc. But before you can setup the M2_REPO class path in Eclipse, you must run the 'mvnassembly' command described earlier if you have not already done that.&lt;br /&gt;
&lt;br /&gt;
When calling the 'mvnassembly' script or alternatively start off Maven within the root of the robocode sources by calling e.g. 'mvn clean install', Maven will download all required libraries from other sites into your local Maven repository. Note that you will need to locate your local Maven repository. Under Windows your Maven repository is put into your %USERPROFILE% directory, and on Linux is put into your home directory (~). The Maven repository will be put under .m2/repository.&lt;br /&gt;
&lt;br /&gt;
To setup the M2_REPO class path in Eclipse, you must go to the menu bar and select 'Window' -&amp;gt; 'Preferences'. On the Preferences window expand the 'Java' -&amp;gt; 'Build Path' and select the 'Classpath Variables'. On the page for the Classpath Variables, you click on the 'New...' button, and enter M2_REPO as name. Next, you click on the 'Folder...' button and navigate to where you have your .m2/repository directory located (in %USERPROFILE% under Windows, and ~ under Linux), e.g. &amp;lt;code&amp;gt;C:/Users/Flemming/.m2/repository&amp;lt;/code&amp;gt; (Windows) or &amp;lt;code&amp;gt;/home/fnl/.m2/repository&amp;lt;/code&amp;gt; (Linux).&lt;br /&gt;
&lt;br /&gt;
When Eclipse asks you if it should rebuild the workspace, you select 'Yes'.&lt;br /&gt;
&lt;br /&gt;
==== Configure JDK for your workspace ====&lt;br /&gt;
&lt;br /&gt;
You must setup which JDK that will be used for compiling (and running) Robocode in your workspace.&lt;br /&gt;
You do this by...&lt;br /&gt;
# selecting Window -&amp;gt; Preferences from the menu, and then unfold and select Java -&amp;gt; Installed JREs and press 'Add...' on the 'Installed JREs' page.&lt;br /&gt;
# Select 'Standard VM' on the 'JRE Type' page and press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# Press the 'Directory...' button and browse to where you have installed your JDK 6 and press 'Finish' or Enter. Make sure to select a JDK and ''not'' a JRE, as a JRE is not sufficient as it lacks the tools available with the JDK.&lt;br /&gt;
# When you get back to the 'Installed JREs' page, make sure to put a check mark in the JDK you just added and press 'OK' or Enter.&lt;br /&gt;
&lt;br /&gt;
==== Importing sources of Robocode using Git ====&lt;br /&gt;
&lt;br /&gt;
Importing the projects for Robocode into Eclipse from Git can be done from the Package Explorer, which can be opened from the menu by selecting Window -&amp;gt; Show View -&amp;gt; Package Explorer or by using the keyboard shortcut by pressing Alt+Shift+Q and P. In the Package Explorer, you...&lt;br /&gt;
&lt;br /&gt;
# Right-click the mouse and select 'Import...' in the popup menu that occurs.&lt;br /&gt;
# Unfold 'Git' in the 'Import' window and double-click 'Projects from Git'.&lt;br /&gt;
# On the 'Import Projects from Git' you select 'URI'.&lt;br /&gt;
# On the next page named 'Source Git Repository' to enter '''https://github.com/robo-code/robocode.git''' into the 'URI:' text field and press Enter or 'Next &amp;gt;'.&lt;br /&gt;
# On the 'Branch Selection' page you press 'Deselect All' and select the branch you want to work on. This would normally be 'master', which is the master branch of Robocode. When the branch selection is made, you press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# On the 'Local Destination' page, you must note the directory where your local files will be put. I recommend you use the directory suggested by Git (Eclipse) and press 'Finish' or Enter.&lt;br /&gt;
# On the 'Select a wizard to use for importing projects', make sure 'Import existing projects' is selected and press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# On 'Import Projects', you should deselect the first project named 'plugins' as you would normally not want to develop on plugins for Robocode - otherwise just omit deselecting 'plugins'. Press 'Finish' or Enter.&lt;br /&gt;
# All Robocode projects will now be imported into Eclipse and be visible in the Package Explorer.&lt;br /&gt;
# Now, select all projects (press Ctrl+A) and right-click the Package Explorer and select Replace With -&amp;gt; HEAD Revision on the popup menu that occurs, and press 'OK' or Enter to discard local changes on the dialog that appears.&lt;br /&gt;
&lt;br /&gt;
Congratulations, you should now be able to get started working on the Robocode sources in Eclipse. :-)&lt;br /&gt;
&lt;br /&gt;
==== Launch Robocode ====&lt;br /&gt;
&lt;br /&gt;
Before launching Robocode for the first time, you should make sure that it is cleaned and compiled first. You do this by selecting Project -&amp;gt; Clean... from the menu. You should also make sure that you have run the 'mvnassembly' described previously, which will download and update your local Maven repository, which is necessary for compiling and running Robocode.&lt;br /&gt;
&lt;br /&gt;
Please notice that it might be necessary to refresh the sources in Eclipse when files are changed outside the Eclipse editor, which is the case when running the 'mvnassembly' script. You can do this from the Package Explorer by right-clicking in this and select 'Refresh'.&lt;br /&gt;
&lt;br /&gt;
In order to start running or debugging Robocode, you should select the &amp;quot;Bug&amp;quot; (debug) or &amp;quot;Play&amp;quot; (run) button in the top of Eclipse under the menu. You should press the little arrow beside these green buttons in order to choose among: Robocode, RoboRumble, TeamRumble, and MeleeRumble. The 3 last ones are for running the RoboRumble@Home clients.&lt;br /&gt;
&lt;br /&gt;
==== How to run the unit tests? ====&lt;br /&gt;
&lt;br /&gt;
When you want to run the unit test from within Eclipse, you must do this from the the Package Explorer, where you right-click on the 'robocode.tests' project and select 'Run As' -&amp;gt; 'JUnit Test'. Now all available unit tests will run automatically.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can start the tests from the command-line by standing on your robocode workspace, and write the following Maven command.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvn test install&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  ./mvn.sh test install&lt;br /&gt;
&lt;br /&gt;
=== Robocode developers and contributions ===&lt;br /&gt;
&lt;br /&gt;
Robocode developers have discussion group at robocode-developers@googlegroups.com. Everybody interested in discussion about future of Robocode are welcome. We also welcome your contributions there. The discussion group is located here: http://groups.google.com/group/robocode-developers.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Robocode/Old Developers Guide for building Robocode|Old version]] of the Developer's Guide for building Robocode for Robocode versions prior to version 1.7.&lt;br /&gt;
* [http://code.google.com/p/robocode/source/browse/ Browse the sources] of Robocode.&lt;br /&gt;
* [http://sourceforge.net/project/showfiles.php?group_id=37202&amp;amp;package_id=218677 Download the sources] of Robocode.&lt;br /&gt;
* [http://groups.google.com/group/robocode-developers Robocode developers discussion group].&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* The [http://sourceforge.net/projects/robocode Robocode project] on SourceForge.&lt;br /&gt;
* [http://sourceforge.net/svn/?group_id=37202 How to access] the SVN Repository for Robocode.&lt;br /&gt;
* [http://www.eclipse.org/ Eclipse] - an open development platform supported by Robocode.&lt;br /&gt;
* [http://maven.apache.org/ Apache Maven] used for building Robocode.&lt;br /&gt;
* [http://maven.apache.org/guides/mini/guide-ide-eclipse.html Guide] to using Eclipse with Maven 2.x.&lt;br /&gt;
* [http://www.eclipse.org/subversive/ Eclipse Subversive] is a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://subclipse.tigris.org/ Subclipse] is also a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://tortoisesvn.net TortoiseSVN], a Subversion client for Windows.&lt;br /&gt;
* [http://www.open.collab.net/downloads/subversion/ CollabNets Subversion], a Subversion client for both Windows and Linux.&lt;br /&gt;
&lt;br /&gt;
[[Category:Robocode Documentation]]&lt;br /&gt;
[[Category:Eclipse IDE]]&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=55051</id>
		<title>Robocode/Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=55051"/>
		<updated>2018-10-19T23:05:44Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: /* Setting up Java Environment Variables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide describes how to build the Robocode application, i.e. the game itself, and not how to build bots for Robocode.&lt;br /&gt;
&lt;br /&gt;
== Developer's Guide for building Robocode with Eclipse setup ==&lt;br /&gt;
&lt;br /&gt;
=== Notice ===&lt;br /&gt;
&lt;br /&gt;
This guide is intended for experienced Java developers, who want to work on the Robocode application, and describes all basic stuff required to compile and run Robocode within the [http://www.eclipse.org Eclipse] IDE.&lt;br /&gt;
&lt;br /&gt;
If you just need to browse the sources, you can do it from [https://github.com/robo-code/robocode here] or you can download the zipped sources from [http://sourceforge.net/projects/robocode/files/robocode%20sources/ here].&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Basically, all you need to get started with building Robocode is:&lt;br /&gt;
&lt;br /&gt;
* Oracle JDK 8 ([https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html Java SE Development Kit 8 Downloads]). Note that only version 6, 7, and 8 will work. Newer versions are not supported (yet) and are almost guaranteed to cause building problems.&lt;br /&gt;
* Source files for Robocode ([https://github.com/robo-code/robocode on GitHub]), which you get by doing a Git clone.&lt;br /&gt;
* An Internet connection.&lt;br /&gt;
&lt;br /&gt;
Other than that, you need to be a skilled Java developer in order to figure out how Robocode is put together. Robocode is a complex application and requires a big effort to grasp and understand. There is practically no documentation available that describe the internal logic, architecture, game rules, coding conventions etc. So you will probably be on your own when trying to figure out how Robocode it put together.&lt;br /&gt;
&lt;br /&gt;
An Internet connection is required for building Robocode distribution files as the build tool (Maven) needs access to [http://maven.apache.org/guides/introduction/introduction-to-repositories.html remote repositories], which contains various libraries and binaries. Some libraries are used for building Robocode, and others are used for running Robocode, and hence need to be put into the distribution files.&lt;br /&gt;
In order to get updates to the sources of Robocode when new versions emerge, an Internet connection is also critical to download changed sources and merge the changes with your version of the sources etc.&lt;br /&gt;
&lt;br /&gt;
Note that all sources of Robocode are for Java 6, meaning that Robocode is able to run on very old Java versions, which is intentional.&lt;br /&gt;
&lt;br /&gt;
==== Installing the JDK ====&lt;br /&gt;
&lt;br /&gt;
Robocode is being developed using Oracle's Java SE, and requires the Java Developer Kit ('''JDK'''), minimum version 6, to be pre-installed on the system used for building Robocode. Please note that a Java Runtime Environment ('''JRE''') is not enough as it does not contain the required developer tools needed for building Robocode. Currently, the Oracle JDK version 8 is recommended for building Robocode.&lt;br /&gt;
&lt;br /&gt;
Notice that when installing the JDK, it is highly recommended that you '''install the sources provided for Java''' as the sources are very useful when debugging Robocode. However, this is not a requirement.&lt;br /&gt;
&lt;br /&gt;
==== Setting up Java Environment Variables ====&lt;br /&gt;
&lt;br /&gt;
You must set up the environment variable named '''JAVA_HOME''' and extend another environment variable named '''PATH'''. You find information on how to setup JAVA_HOME and PATH on the net, e.g. [https://docs.oracle.com/cd/E19182-01/821-0917/inst_jdk_javahome_t/index.html here].&lt;br /&gt;
&lt;br /&gt;
'''JAVA_HOME must be set up point to the root directory of the JDK you intend to use.'''&lt;br /&gt;
&lt;br /&gt;
The PATH environment variable must be extended in order to locate the Java commands like 'java', 'javac' and lots of other tools in the JDK. Extending PATH is considered best practice when setting up the Java development environment, and makes it possible for other tools like e.g. Maven to locate the proper JDK tools. It also makes it possible for you to detirmine which JRE that is being used when running a Java application by writting &amp;lt;code&amp;gt;java -version&amp;lt;/code&amp;gt; in the command-line/shell, and detirmine which Java compiler that is being used by writting &amp;lt;code&amp;gt;javac -version&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
&lt;br /&gt;
'''Windows:'''&lt;br /&gt;
* JAVA_HOME is set to e.g. &amp;lt;code&amp;gt;JAVA_HOME=&amp;quot;C:\Program Files\Java\jdk1.8.0_162&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* PATH is extended, e.g. to &amp;lt;code&amp;gt;PATH=%JAVA_HOME%\bin;PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Linux / *nix:'''&lt;br /&gt;
* JAVA_HOME is set by e.g. &amp;lt;code&amp;gt;export JAVA_HOME=/usr/java/jdk1.8.0_162/bin/java&amp;lt;/code&amp;gt;. (Bash)&lt;br /&gt;
* PATH is extended, e.g. by &amp;lt;code&amp;gt;export PATH=$JAVA_HOME/bin:$PATH&amp;lt;/code&amp;gt;. (Bash)&lt;br /&gt;
&lt;br /&gt;
'''Mac OS X:'''&lt;br /&gt;
* JAVA_HOME is set by e.g. &amp;lt;code&amp;gt;export JAVA_HOME=$(/usr/libexec/java_home)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* PATH is extended, e.g. by &amp;lt;code&amp;gt;export PATH=${JAVA_HOME}/bin:$PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you want more information on how to set up your JAVA_HOME and PATH environment variables for your specific OS, please read the installation notes provided for the Oracle JDK here:&lt;br /&gt;
&lt;br /&gt;
'''Installation instructions from Oracle:'''&lt;br /&gt;
* [https://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html JDK 8 and JRE 8 Installation Start Here].&lt;br /&gt;
* [https://www.oracle.com/technetwork/java/javase/certconfig-2095354.html Oracle JDK 8 and JRE 8 Certified System Configurations Contents] for ''all'' supported systems.&lt;br /&gt;
&lt;br /&gt;
==== Required technical skills? ====&lt;br /&gt;
&lt;br /&gt;
In order to develop on Robocode, you need to know the basics of these tools:&lt;br /&gt;
&lt;br /&gt;
* Eclipse IDE ([http://www.vogella.com/articles/Eclipse/article.html Tutorial])&lt;br /&gt;
* Git and GitHub ([http://www.vogella.com/articles/Git/article.html Tutorial])&lt;br /&gt;
* Maven ([http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html Tutorial])&lt;br /&gt;
&lt;br /&gt;
Notice that you do not have to be an expert in Eclipse, Git/GitHub, and Maven. But you need some basic knowledge about these tools to understand how to build Robocode. In fact, trying to build Robocode might actually be a very good way of learning these tools, if you don't know them already or miss some practical experience with these. :-)&lt;br /&gt;
&lt;br /&gt;
When you need to start editing the sources of Robocode, you naturally might want to use an IDE for compiling and run Robocode on the fly to quickly see the effect of your work. This is where [http://www.eclipse.org Eclipse IDE] comes into the picture for this guide, as many Java developers regards the Eclipse IDE as the best IDE for Java development. Eclipse comes free of charge, has a huge community, automatic compilation, a rich source code editor, a flexible window layout, and lots of plug-ins. Eclipse has been choosen as the primary IDE for building Robocode, and thus this guide only describes how to setup and build Robocode with this IDE.&lt;br /&gt;
If you want to use another IDE for developing Robocode you need to figure out how to set it up by yourself based on the details from this guide. And you are more than welcome to add a page beside this article that described how to setup everything for IDE of your choise and link to it from this article. :-)&lt;br /&gt;
&lt;br /&gt;
All sources of Robocode are available at [https://github.com/robo-code/robocode GitHub]. At GitHub, you can download sources as a zipped file or create your own [https://help.github.com/articles/fork-a-repo clone/fork], if you want to.&lt;br /&gt;
&lt;br /&gt;
Even though Maven is used as build tool, you don't need to pre-install it on your system. Batch (.bat) and shell (.sh) files are provided with the source files. These scripts will automatically download required libraries, scripts and tools required for building Robocode. Hence, no tools needs to be pre-installed in order to build Robocode beside the JDK and correct environment settings for JAVA_HOME and PATH.&lt;br /&gt;
&lt;br /&gt;
Notice that the shell scripts (.sh files) should work under Unix and *nix like OSes including Max OS X. However, the shell scripts have only been tested under Linux (on Ubuntu), so there is no guarantee that these will run without issues on other *nix systems.&lt;br /&gt;
&lt;br /&gt;
You don't have to worry too much about how to setup Eclipse for Robocode as the provided sources contains all configuration files needed by Eclipse. Some of these files are generated using Maven's build-in support for Eclipse. However, you will need to do some basic pre-configuration of Eclipse before you'll be able to get started with working on Robocode. You should only need to set up a workspace for Robocode once. However, you will need to update the sources from the remote repository on GitHub once in a while, and merge changes with your sources in order to keep up-to-date with the current versions of Robocode, i.e. the trunk/head of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
=== Checking out sources from GitHub ===&lt;br /&gt;
&lt;br /&gt;
In the following, I assume that you want to '''check out''' the sources from GitHub using some [http://git-scm.com/downloads Git client].  This could be one of the Git GUI Clients (git-gui) recommended [http://git-scm.com/downloads/guis here].&lt;br /&gt;
You don't necessarily need a Git client for building Robocode, as you could simply get the sources from a plain .zip file. However, if you want to update your local source files with the newest sources from the Git repository and the ability to commit and/or merge changes, you will need to use some Git client in order to get access to files beside the files inside (Eclipse) project directories, e.g. if you want to check out the scripts located in the root of the Git repository for Robocode.&lt;br /&gt;
&lt;br /&gt;
The URL of the sources at GitHub is:&lt;br /&gt;
[https://github.com/robo-code/robocode.git https://github.com/robo-code/robocode.git]&lt;br /&gt;
&lt;br /&gt;
==== How to build distribution files? ====&lt;br /&gt;
&lt;br /&gt;
In order to build the distribution files containing the installer setup file (robocode-x.x.x-setup.jar) and a .zip file containing all the sources (robocode-x.x.x-src.zip) you must call the '''mvnassembly''' script from the command-line when standing within the root directory of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvnassembly&lt;br /&gt;
&lt;br /&gt;
On *nix:&lt;br /&gt;
  ./mvnassembly.sh&lt;br /&gt;
&lt;br /&gt;
This will build the distribution files, which will be put into the sub-directory named ''robocode.distribution/target''.&lt;br /&gt;
&lt;br /&gt;
'''mvnassembly''' is a script that compiles all sources of the Robocode game, creates javadoc html files, run test units, and finally creates the target distribution files. The first time this script is run, it will need to download a huge amount of .jar files from various Maven repositories and which contains Maven plugins etc. used for building Robocode. So please be patient with it the first time.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Eclipse for developing on Robocode ===&lt;br /&gt;
&lt;br /&gt;
Here follows a description of how to setup Eclipse for developing on Robocode.&lt;br /&gt;
&lt;br /&gt;
==== Software Requirements for Eclipse IDE ====&lt;br /&gt;
&lt;br /&gt;
Here follows the recommended software needed to start developing on Robocode with the Eclipse IDE:&lt;br /&gt;
&lt;br /&gt;
'''Required:'''&lt;br /&gt;
* Oracle JDK 6 ([http://www.oracle.com/technetwork/java/javase/downloads/index.html download]) must be pre-installed.&lt;br /&gt;
* Eclipse IDE for Java Developers([http://www.eclipse.org/downloads/ download]). The Juno, Kepler, Luna works fine for Robocode and supports Git.&lt;br /&gt;
&lt;br /&gt;
Please consult the [http://wiki.eclipse.org/Eclipse/Installation#Install_a_JVM installation notes] provided for Eclipse in order to find out how to install Eclipse for your specific OS.&lt;br /&gt;
&lt;br /&gt;
==== Create a workspace for Robocode ====&lt;br /&gt;
&lt;br /&gt;
When you have setup and installed Eclipse on your system (if you did not have it on your system already), a workspace must be created for Robocode.&lt;br /&gt;
&lt;br /&gt;
The first time you start up a newly installed Eclipse, it will ask for a directory for your workspace. I suggest that you create a workspace named '''robocode-workspace''' or similar and create the workspace on a partition or directory like e.g. &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; (on Windows) or &amp;lt;code&amp;gt;~&amp;lt;/code&amp;gt; (on Linux) - or any other directory of your choice. If you have already got a workspace, e.g. the default one suggested by Eclipse, you can create a new workspace if you wish by selecting 'File' -&amp;gt; 'Switch Workspace' -&amp;gt; 'Other...' from the menu.&lt;br /&gt;
&lt;br /&gt;
==== M2_REPO class path variable ====&lt;br /&gt;
&lt;br /&gt;
One of the first things you need to do in Eclipse is to set up the '''M2_REPO''' class path variable for Eclipse, which points to your local Maven 2 repository. That is, Eclipse uses the M2_REPO class path variable for locating the Maven repository containing various libraries used for compiling Robocode etc. But before you can setup the M2_REPO class path in Eclipse, you must run the 'mvnassembly' command described earlier if you have not already done that.&lt;br /&gt;
&lt;br /&gt;
When calling the 'mvnassembly' script or alternatively start off Maven within the root of the robocode sources by calling e.g. 'mvn clean install', Maven will download all required libraries from other sites into your local Maven repository. Note that you will need to locate your local Maven repository. Under Windows your Maven repository is put into your %USERPROFILE% directory, and on Linux is put into your home directory (~). The Maven repository will be put under .m2/repository.&lt;br /&gt;
&lt;br /&gt;
To setup the M2_REPO class path in Eclipse, you must go to the menu bar and select 'Window' -&amp;gt; 'Preferences'. On the Preferences window expand the 'Java' -&amp;gt; 'Build Path' and select the 'Classpath Variables'. On the page for the Classpath Variables, you click on the 'New...' button, and enter M2_REPO as name. Next, you click on the 'Folder...' button and navigate to where you have your .m2/repository directory located (in %USERPROFILE% under Windows, and ~ under Linux), e.g. &amp;lt;code&amp;gt;C:/Users/Flemming/.m2/repository&amp;lt;/code&amp;gt; (Windows) or &amp;lt;code&amp;gt;/home/fnl/.m2/repository&amp;lt;/code&amp;gt; (Linux).&lt;br /&gt;
&lt;br /&gt;
When Eclipse asks you if it should rebuild the workspace, you select 'Yes'.&lt;br /&gt;
&lt;br /&gt;
==== Configure JDK for your workspace ====&lt;br /&gt;
&lt;br /&gt;
You must setup which JDK that will be used for compiling (and running) Robocode in your workspace.&lt;br /&gt;
You do this by...&lt;br /&gt;
# selecting Window -&amp;gt; Preferences from the menu, and then unfold and select Java -&amp;gt; Installed JREs and press 'Add...' on the 'Installed JREs' page.&lt;br /&gt;
# Select 'Standard VM' on the 'JRE Type' page and press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# Press the 'Directory...' button and browse to where you have installed your JDK 6 and press 'Finish' or Enter. Make sure to select a JDK and ''not'' a JRE, as a JRE is not sufficient as it lacks the tools available with the JDK.&lt;br /&gt;
# When you get back to the 'Installed JREs' page, make sure to put a check mark in the JDK you just added and press 'OK' or Enter.&lt;br /&gt;
&lt;br /&gt;
==== Importing sources of Robocode using Git ====&lt;br /&gt;
&lt;br /&gt;
Importing the projects for Robocode into Eclipse from Git can be done from the Package Explorer, which can be opened from the menu by selecting Window -&amp;gt; Show View -&amp;gt; Package Explorer or by using the keyboard shortcut by pressing Alt+Shift+Q and P. In the Package Explorer, you...&lt;br /&gt;
&lt;br /&gt;
# Right-click the mouse and select 'Import...' in the popup menu that occurs.&lt;br /&gt;
# Unfold 'Git' in the 'Import' window and double-click 'Projects from Git'.&lt;br /&gt;
# On the 'Import Projects from Git' you select 'URI'.&lt;br /&gt;
# On the next page named 'Source Git Repository' to enter '''https://github.com/robo-code/robocode.git''' into the 'URI:' text field and press Enter or 'Next &amp;gt;'.&lt;br /&gt;
# On the 'Branch Selection' page you press 'Deselect All' and select the branch you want to work on. This would normally be 'master', which is the master branch of Robocode. When the branch selection is made, you press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# On the 'Local Destination' page, you must note the directory where your local files will be put. I recommend you use the directory suggested by Git (Eclipse) and press 'Finish' or Enter.&lt;br /&gt;
# On the 'Select a wizard to use for importing projects', make sure 'Import existing projects' is selected and press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# On 'Import Projects', you should deselect the first project named 'plugins' as you would normally not want to develop on plugins for Robocode - otherwise just omit deselecting 'plugins'. Press 'Finish' or Enter.&lt;br /&gt;
# All Robocode projects will now be imported into Eclipse and be visible in the Package Explorer.&lt;br /&gt;
# Now, select all projects (press Ctrl+A) and right-click the Package Explorer and select Replace With -&amp;gt; HEAD Revision on the popup menu that occurs, and press 'OK' or Enter to discard local changes on the dialog that appears.&lt;br /&gt;
&lt;br /&gt;
Congratulations, you should now be able to get started working on the Robocode sources in Eclipse. :-)&lt;br /&gt;
&lt;br /&gt;
==== Launch Robocode ====&lt;br /&gt;
&lt;br /&gt;
Before launching Robocode for the first time, you should make sure that it is cleaned and compiled first. You do this by selecting Project -&amp;gt; Clean... from the menu. You should also make sure that you have run the 'mvnassembly' described previously, which will download and update your local Maven repository, which is necessary for compiling and running Robocode.&lt;br /&gt;
&lt;br /&gt;
Please notice that it might be necessary to refresh the sources in Eclipse when files are changed outside the Eclipse editor, which is the case when running the 'mvnassembly' script. You can do this from the Package Explorer by right-clicking in this and select 'Refresh'.&lt;br /&gt;
&lt;br /&gt;
In order to start running or debugging Robocode, you should select the &amp;quot;Bug&amp;quot; (debug) or &amp;quot;Play&amp;quot; (run) button in the top of Eclipse under the menu. You should press the little arrow beside these green buttons in order to choose among: Robocode, RoboRumble, TeamRumble, and MeleeRumble. The 3 last ones are for running the RoboRumble@Home clients.&lt;br /&gt;
&lt;br /&gt;
==== How to run the unit tests? ====&lt;br /&gt;
&lt;br /&gt;
When you want to run the unit test from within Eclipse, you must do this from the the Package Explorer, where you right-click on the 'robocode.tests' project and select 'Run As' -&amp;gt; 'JUnit Test'. Now all available unit tests will run automatically.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can start the tests from the command-line by standing on your robocode workspace, and write the following Maven command.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvn test install&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  ./mvn.sh test install&lt;br /&gt;
&lt;br /&gt;
=== Robocode developers and contributions ===&lt;br /&gt;
&lt;br /&gt;
Robocode developers have discussion group at robocode-developers@googlegroups.com. Everybody interested in discussion about future of Robocode are welcome. We also welcome your contributions there. The discussion group is located here: http://groups.google.com/group/robocode-developers.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Robocode/Old Developers Guide for building Robocode|Old version]] of the Developer's Guide for building Robocode for Robocode versions prior to version 1.7.&lt;br /&gt;
* [http://code.google.com/p/robocode/source/browse/ Browse the sources] of Robocode.&lt;br /&gt;
* [http://sourceforge.net/project/showfiles.php?group_id=37202&amp;amp;package_id=218677 Download the sources] of Robocode.&lt;br /&gt;
* [http://groups.google.com/group/robocode-developers Robocode developers discussion group].&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* The [http://sourceforge.net/projects/robocode Robocode project] on SourceForge.&lt;br /&gt;
* [http://sourceforge.net/svn/?group_id=37202 How to access] the SVN Repository for Robocode.&lt;br /&gt;
* [http://www.eclipse.org/ Eclipse] - an open development platform supported by Robocode.&lt;br /&gt;
* [http://maven.apache.org/ Apache Maven] used for building Robocode.&lt;br /&gt;
* [http://maven.apache.org/guides/mini/guide-ide-eclipse.html Guide] to using Eclipse with Maven 2.x.&lt;br /&gt;
* [http://www.eclipse.org/subversive/ Eclipse Subversive] is a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://subclipse.tigris.org/ Subclipse] is also a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://tortoisesvn.net TortoiseSVN], a Subversion client for Windows.&lt;br /&gt;
* [http://www.open.collab.net/downloads/subversion/ CollabNets Subversion], a Subversion client for both Windows and Linux.&lt;br /&gt;
&lt;br /&gt;
[[Category:Robocode Documentation]]&lt;br /&gt;
[[Category:Eclipse IDE]]&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=55050</id>
		<title>Robocode/Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=55050"/>
		<updated>2018-10-19T23:05:12Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: /* Setting up Java Environment Variables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide describes how to build the Robocode application, i.e. the game itself, and not how to build bots for Robocode.&lt;br /&gt;
&lt;br /&gt;
== Developer's Guide for building Robocode with Eclipse setup ==&lt;br /&gt;
&lt;br /&gt;
=== Notice ===&lt;br /&gt;
&lt;br /&gt;
This guide is intended for experienced Java developers, who want to work on the Robocode application, and describes all basic stuff required to compile and run Robocode within the [http://www.eclipse.org Eclipse] IDE.&lt;br /&gt;
&lt;br /&gt;
If you just need to browse the sources, you can do it from [https://github.com/robo-code/robocode here] or you can download the zipped sources from [http://sourceforge.net/projects/robocode/files/robocode%20sources/ here].&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Basically, all you need to get started with building Robocode is:&lt;br /&gt;
&lt;br /&gt;
* Oracle JDK 8 ([https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html Java SE Development Kit 8 Downloads]). Note that only version 6, 7, and 8 will work. Newer versions are not supported (yet) and are almost guaranteed to cause building problems.&lt;br /&gt;
* Source files for Robocode ([https://github.com/robo-code/robocode on GitHub]), which you get by doing a Git clone.&lt;br /&gt;
* An Internet connection.&lt;br /&gt;
&lt;br /&gt;
Other than that, you need to be a skilled Java developer in order to figure out how Robocode is put together. Robocode is a complex application and requires a big effort to grasp and understand. There is practically no documentation available that describe the internal logic, architecture, game rules, coding conventions etc. So you will probably be on your own when trying to figure out how Robocode it put together.&lt;br /&gt;
&lt;br /&gt;
An Internet connection is required for building Robocode distribution files as the build tool (Maven) needs access to [http://maven.apache.org/guides/introduction/introduction-to-repositories.html remote repositories], which contains various libraries and binaries. Some libraries are used for building Robocode, and others are used for running Robocode, and hence need to be put into the distribution files.&lt;br /&gt;
In order to get updates to the sources of Robocode when new versions emerge, an Internet connection is also critical to download changed sources and merge the changes with your version of the sources etc.&lt;br /&gt;
&lt;br /&gt;
Note that all sources of Robocode are for Java 6, meaning that Robocode is able to run on very old Java versions, which is intentional.&lt;br /&gt;
&lt;br /&gt;
==== Installing the JDK ====&lt;br /&gt;
&lt;br /&gt;
Robocode is being developed using Oracle's Java SE, and requires the Java Developer Kit ('''JDK'''), minimum version 6, to be pre-installed on the system used for building Robocode. Please note that a Java Runtime Environment ('''JRE''') is not enough as it does not contain the required developer tools needed for building Robocode. Currently, the Oracle JDK version 8 is recommended for building Robocode.&lt;br /&gt;
&lt;br /&gt;
Notice that when installing the JDK, it is highly recommended that you '''install the sources provided for Java''' as the sources are very useful when debugging Robocode. However, this is not a requirement.&lt;br /&gt;
&lt;br /&gt;
==== Setting up Java Environment Variables ====&lt;br /&gt;
&lt;br /&gt;
You must set up the environment variable named '''JAVA_HOME''' and extend another environment variable named '''PATH'''. You find information on how to setup JAVA_HOME and PATH on the net, e.g. [https://docs.oracle.com/cd/E19182-01/821-0917/inst_jdk_javahome_t/index.html here].&lt;br /&gt;
&lt;br /&gt;
'''JAVA_HOME must be set up point to the root directory of the JDK you intend to use.'''&lt;br /&gt;
&lt;br /&gt;
The PATH environment variable must be extended in order to locate the Java commands like 'java', 'javac' and lots of other tools in the JDK. Extending PATH is considered best practice when setting up the Java development environment, and makes it possible for other tools like e.g. Maven to locate the proper JDK tools. It also makes it possible for you to detirmine which JRE that is being used when running a Java application by writting &amp;lt;code&amp;gt;java -version&amp;lt;/code&amp;gt; in the command-line/shell, and detirmine which Java compiler that is being used by writting &amp;lt;code&amp;gt;javac -version&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
&lt;br /&gt;
'''Windows:'''&lt;br /&gt;
* JAVA_HOME is set to e.g. &amp;lt;code&amp;gt;JAVA_HOME=&amp;quot;C:\Program Files\Java\jdk1.8.0_162&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* PATH is extended, e.g. to &amp;lt;code&amp;gt;PATH=%JAVA_HOME%\bin;PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Linux / *nix:'''&lt;br /&gt;
* JAVA_HOME is set by e.g. &amp;lt;code&amp;gt;export JAVA_HOME=/usr/java/jdk1.8.0_162/bin/java&amp;lt;/code&amp;gt;. (Bash)&lt;br /&gt;
* PATH is extended, e.g. by &amp;lt;code&amp;gt;export PATH=$JAVA_HOME/bin:$PATH&amp;lt;/code&amp;gt;. (Bash)&lt;br /&gt;
&lt;br /&gt;
'''Mac OS X:'''&lt;br /&gt;
* JAVA_HOME is set by e.g. &amp;lt;code&amp;gt;export JAVA_HOME=$(/usr/libexec/java_home)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* PATH is extended, e.g. by &amp;lt;code&amp;gt;export PATH=${JAVA_HOME}/bin:$PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you want more information on how to set up your JAVA_HOME and PATH environment variables for your specific OS, please read the installation notes provided for the Oracle JDK here:&lt;br /&gt;
&lt;br /&gt;
'''Installation instructions from Oracle:'''&lt;br /&gt;
* [https://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html JDK 8 and JRE 8 Installation Start Here].&lt;br /&gt;
* [https://www.oracle.com/technetwork/java/javase/certconfig-2095354.html Oracle JDK 8 and JRE 8 Certified System Configurations&lt;br /&gt;
Contents] for ''all'' supported systems.&lt;br /&gt;
&lt;br /&gt;
==== Required technical skills? ====&lt;br /&gt;
&lt;br /&gt;
In order to develop on Robocode, you need to know the basics of these tools:&lt;br /&gt;
&lt;br /&gt;
* Eclipse IDE ([http://www.vogella.com/articles/Eclipse/article.html Tutorial])&lt;br /&gt;
* Git and GitHub ([http://www.vogella.com/articles/Git/article.html Tutorial])&lt;br /&gt;
* Maven ([http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html Tutorial])&lt;br /&gt;
&lt;br /&gt;
Notice that you do not have to be an expert in Eclipse, Git/GitHub, and Maven. But you need some basic knowledge about these tools to understand how to build Robocode. In fact, trying to build Robocode might actually be a very good way of learning these tools, if you don't know them already or miss some practical experience with these. :-)&lt;br /&gt;
&lt;br /&gt;
When you need to start editing the sources of Robocode, you naturally might want to use an IDE for compiling and run Robocode on the fly to quickly see the effect of your work. This is where [http://www.eclipse.org Eclipse IDE] comes into the picture for this guide, as many Java developers regards the Eclipse IDE as the best IDE for Java development. Eclipse comes free of charge, has a huge community, automatic compilation, a rich source code editor, a flexible window layout, and lots of plug-ins. Eclipse has been choosen as the primary IDE for building Robocode, and thus this guide only describes how to setup and build Robocode with this IDE.&lt;br /&gt;
If you want to use another IDE for developing Robocode you need to figure out how to set it up by yourself based on the details from this guide. And you are more than welcome to add a page beside this article that described how to setup everything for IDE of your choise and link to it from this article. :-)&lt;br /&gt;
&lt;br /&gt;
All sources of Robocode are available at [https://github.com/robo-code/robocode GitHub]. At GitHub, you can download sources as a zipped file or create your own [https://help.github.com/articles/fork-a-repo clone/fork], if you want to.&lt;br /&gt;
&lt;br /&gt;
Even though Maven is used as build tool, you don't need to pre-install it on your system. Batch (.bat) and shell (.sh) files are provided with the source files. These scripts will automatically download required libraries, scripts and tools required for building Robocode. Hence, no tools needs to be pre-installed in order to build Robocode beside the JDK and correct environment settings for JAVA_HOME and PATH.&lt;br /&gt;
&lt;br /&gt;
Notice that the shell scripts (.sh files) should work under Unix and *nix like OSes including Max OS X. However, the shell scripts have only been tested under Linux (on Ubuntu), so there is no guarantee that these will run without issues on other *nix systems.&lt;br /&gt;
&lt;br /&gt;
You don't have to worry too much about how to setup Eclipse for Robocode as the provided sources contains all configuration files needed by Eclipse. Some of these files are generated using Maven's build-in support for Eclipse. However, you will need to do some basic pre-configuration of Eclipse before you'll be able to get started with working on Robocode. You should only need to set up a workspace for Robocode once. However, you will need to update the sources from the remote repository on GitHub once in a while, and merge changes with your sources in order to keep up-to-date with the current versions of Robocode, i.e. the trunk/head of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
=== Checking out sources from GitHub ===&lt;br /&gt;
&lt;br /&gt;
In the following, I assume that you want to '''check out''' the sources from GitHub using some [http://git-scm.com/downloads Git client].  This could be one of the Git GUI Clients (git-gui) recommended [http://git-scm.com/downloads/guis here].&lt;br /&gt;
You don't necessarily need a Git client for building Robocode, as you could simply get the sources from a plain .zip file. However, if you want to update your local source files with the newest sources from the Git repository and the ability to commit and/or merge changes, you will need to use some Git client in order to get access to files beside the files inside (Eclipse) project directories, e.g. if you want to check out the scripts located in the root of the Git repository for Robocode.&lt;br /&gt;
&lt;br /&gt;
The URL of the sources at GitHub is:&lt;br /&gt;
[https://github.com/robo-code/robocode.git https://github.com/robo-code/robocode.git]&lt;br /&gt;
&lt;br /&gt;
==== How to build distribution files? ====&lt;br /&gt;
&lt;br /&gt;
In order to build the distribution files containing the installer setup file (robocode-x.x.x-setup.jar) and a .zip file containing all the sources (robocode-x.x.x-src.zip) you must call the '''mvnassembly''' script from the command-line when standing within the root directory of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvnassembly&lt;br /&gt;
&lt;br /&gt;
On *nix:&lt;br /&gt;
  ./mvnassembly.sh&lt;br /&gt;
&lt;br /&gt;
This will build the distribution files, which will be put into the sub-directory named ''robocode.distribution/target''.&lt;br /&gt;
&lt;br /&gt;
'''mvnassembly''' is a script that compiles all sources of the Robocode game, creates javadoc html files, run test units, and finally creates the target distribution files. The first time this script is run, it will need to download a huge amount of .jar files from various Maven repositories and which contains Maven plugins etc. used for building Robocode. So please be patient with it the first time.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Eclipse for developing on Robocode ===&lt;br /&gt;
&lt;br /&gt;
Here follows a description of how to setup Eclipse for developing on Robocode.&lt;br /&gt;
&lt;br /&gt;
==== Software Requirements for Eclipse IDE ====&lt;br /&gt;
&lt;br /&gt;
Here follows the recommended software needed to start developing on Robocode with the Eclipse IDE:&lt;br /&gt;
&lt;br /&gt;
'''Required:'''&lt;br /&gt;
* Oracle JDK 6 ([http://www.oracle.com/technetwork/java/javase/downloads/index.html download]) must be pre-installed.&lt;br /&gt;
* Eclipse IDE for Java Developers([http://www.eclipse.org/downloads/ download]). The Juno, Kepler, Luna works fine for Robocode and supports Git.&lt;br /&gt;
&lt;br /&gt;
Please consult the [http://wiki.eclipse.org/Eclipse/Installation#Install_a_JVM installation notes] provided for Eclipse in order to find out how to install Eclipse for your specific OS.&lt;br /&gt;
&lt;br /&gt;
==== Create a workspace for Robocode ====&lt;br /&gt;
&lt;br /&gt;
When you have setup and installed Eclipse on your system (if you did not have it on your system already), a workspace must be created for Robocode.&lt;br /&gt;
&lt;br /&gt;
The first time you start up a newly installed Eclipse, it will ask for a directory for your workspace. I suggest that you create a workspace named '''robocode-workspace''' or similar and create the workspace on a partition or directory like e.g. &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; (on Windows) or &amp;lt;code&amp;gt;~&amp;lt;/code&amp;gt; (on Linux) - or any other directory of your choice. If you have already got a workspace, e.g. the default one suggested by Eclipse, you can create a new workspace if you wish by selecting 'File' -&amp;gt; 'Switch Workspace' -&amp;gt; 'Other...' from the menu.&lt;br /&gt;
&lt;br /&gt;
==== M2_REPO class path variable ====&lt;br /&gt;
&lt;br /&gt;
One of the first things you need to do in Eclipse is to set up the '''M2_REPO''' class path variable for Eclipse, which points to your local Maven 2 repository. That is, Eclipse uses the M2_REPO class path variable for locating the Maven repository containing various libraries used for compiling Robocode etc. But before you can setup the M2_REPO class path in Eclipse, you must run the 'mvnassembly' command described earlier if you have not already done that.&lt;br /&gt;
&lt;br /&gt;
When calling the 'mvnassembly' script or alternatively start off Maven within the root of the robocode sources by calling e.g. 'mvn clean install', Maven will download all required libraries from other sites into your local Maven repository. Note that you will need to locate your local Maven repository. Under Windows your Maven repository is put into your %USERPROFILE% directory, and on Linux is put into your home directory (~). The Maven repository will be put under .m2/repository.&lt;br /&gt;
&lt;br /&gt;
To setup the M2_REPO class path in Eclipse, you must go to the menu bar and select 'Window' -&amp;gt; 'Preferences'. On the Preferences window expand the 'Java' -&amp;gt; 'Build Path' and select the 'Classpath Variables'. On the page for the Classpath Variables, you click on the 'New...' button, and enter M2_REPO as name. Next, you click on the 'Folder...' button and navigate to where you have your .m2/repository directory located (in %USERPROFILE% under Windows, and ~ under Linux), e.g. &amp;lt;code&amp;gt;C:/Users/Flemming/.m2/repository&amp;lt;/code&amp;gt; (Windows) or &amp;lt;code&amp;gt;/home/fnl/.m2/repository&amp;lt;/code&amp;gt; (Linux).&lt;br /&gt;
&lt;br /&gt;
When Eclipse asks you if it should rebuild the workspace, you select 'Yes'.&lt;br /&gt;
&lt;br /&gt;
==== Configure JDK for your workspace ====&lt;br /&gt;
&lt;br /&gt;
You must setup which JDK that will be used for compiling (and running) Robocode in your workspace.&lt;br /&gt;
You do this by...&lt;br /&gt;
# selecting Window -&amp;gt; Preferences from the menu, and then unfold and select Java -&amp;gt; Installed JREs and press 'Add...' on the 'Installed JREs' page.&lt;br /&gt;
# Select 'Standard VM' on the 'JRE Type' page and press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# Press the 'Directory...' button and browse to where you have installed your JDK 6 and press 'Finish' or Enter. Make sure to select a JDK and ''not'' a JRE, as a JRE is not sufficient as it lacks the tools available with the JDK.&lt;br /&gt;
# When you get back to the 'Installed JREs' page, make sure to put a check mark in the JDK you just added and press 'OK' or Enter.&lt;br /&gt;
&lt;br /&gt;
==== Importing sources of Robocode using Git ====&lt;br /&gt;
&lt;br /&gt;
Importing the projects for Robocode into Eclipse from Git can be done from the Package Explorer, which can be opened from the menu by selecting Window -&amp;gt; Show View -&amp;gt; Package Explorer or by using the keyboard shortcut by pressing Alt+Shift+Q and P. In the Package Explorer, you...&lt;br /&gt;
&lt;br /&gt;
# Right-click the mouse and select 'Import...' in the popup menu that occurs.&lt;br /&gt;
# Unfold 'Git' in the 'Import' window and double-click 'Projects from Git'.&lt;br /&gt;
# On the 'Import Projects from Git' you select 'URI'.&lt;br /&gt;
# On the next page named 'Source Git Repository' to enter '''https://github.com/robo-code/robocode.git''' into the 'URI:' text field and press Enter or 'Next &amp;gt;'.&lt;br /&gt;
# On the 'Branch Selection' page you press 'Deselect All' and select the branch you want to work on. This would normally be 'master', which is the master branch of Robocode. When the branch selection is made, you press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# On the 'Local Destination' page, you must note the directory where your local files will be put. I recommend you use the directory suggested by Git (Eclipse) and press 'Finish' or Enter.&lt;br /&gt;
# On the 'Select a wizard to use for importing projects', make sure 'Import existing projects' is selected and press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# On 'Import Projects', you should deselect the first project named 'plugins' as you would normally not want to develop on plugins for Robocode - otherwise just omit deselecting 'plugins'. Press 'Finish' or Enter.&lt;br /&gt;
# All Robocode projects will now be imported into Eclipse and be visible in the Package Explorer.&lt;br /&gt;
# Now, select all projects (press Ctrl+A) and right-click the Package Explorer and select Replace With -&amp;gt; HEAD Revision on the popup menu that occurs, and press 'OK' or Enter to discard local changes on the dialog that appears.&lt;br /&gt;
&lt;br /&gt;
Congratulations, you should now be able to get started working on the Robocode sources in Eclipse. :-)&lt;br /&gt;
&lt;br /&gt;
==== Launch Robocode ====&lt;br /&gt;
&lt;br /&gt;
Before launching Robocode for the first time, you should make sure that it is cleaned and compiled first. You do this by selecting Project -&amp;gt; Clean... from the menu. You should also make sure that you have run the 'mvnassembly' described previously, which will download and update your local Maven repository, which is necessary for compiling and running Robocode.&lt;br /&gt;
&lt;br /&gt;
Please notice that it might be necessary to refresh the sources in Eclipse when files are changed outside the Eclipse editor, which is the case when running the 'mvnassembly' script. You can do this from the Package Explorer by right-clicking in this and select 'Refresh'.&lt;br /&gt;
&lt;br /&gt;
In order to start running or debugging Robocode, you should select the &amp;quot;Bug&amp;quot; (debug) or &amp;quot;Play&amp;quot; (run) button in the top of Eclipse under the menu. You should press the little arrow beside these green buttons in order to choose among: Robocode, RoboRumble, TeamRumble, and MeleeRumble. The 3 last ones are for running the RoboRumble@Home clients.&lt;br /&gt;
&lt;br /&gt;
==== How to run the unit tests? ====&lt;br /&gt;
&lt;br /&gt;
When you want to run the unit test from within Eclipse, you must do this from the the Package Explorer, where you right-click on the 'robocode.tests' project and select 'Run As' -&amp;gt; 'JUnit Test'. Now all available unit tests will run automatically.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can start the tests from the command-line by standing on your robocode workspace, and write the following Maven command.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvn test install&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  ./mvn.sh test install&lt;br /&gt;
&lt;br /&gt;
=== Robocode developers and contributions ===&lt;br /&gt;
&lt;br /&gt;
Robocode developers have discussion group at robocode-developers@googlegroups.com. Everybody interested in discussion about future of Robocode are welcome. We also welcome your contributions there. The discussion group is located here: http://groups.google.com/group/robocode-developers.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Robocode/Old Developers Guide for building Robocode|Old version]] of the Developer's Guide for building Robocode for Robocode versions prior to version 1.7.&lt;br /&gt;
* [http://code.google.com/p/robocode/source/browse/ Browse the sources] of Robocode.&lt;br /&gt;
* [http://sourceforge.net/project/showfiles.php?group_id=37202&amp;amp;package_id=218677 Download the sources] of Robocode.&lt;br /&gt;
* [http://groups.google.com/group/robocode-developers Robocode developers discussion group].&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* The [http://sourceforge.net/projects/robocode Robocode project] on SourceForge.&lt;br /&gt;
* [http://sourceforge.net/svn/?group_id=37202 How to access] the SVN Repository for Robocode.&lt;br /&gt;
* [http://www.eclipse.org/ Eclipse] - an open development platform supported by Robocode.&lt;br /&gt;
* [http://maven.apache.org/ Apache Maven] used for building Robocode.&lt;br /&gt;
* [http://maven.apache.org/guides/mini/guide-ide-eclipse.html Guide] to using Eclipse with Maven 2.x.&lt;br /&gt;
* [http://www.eclipse.org/subversive/ Eclipse Subversive] is a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://subclipse.tigris.org/ Subclipse] is also a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://tortoisesvn.net TortoiseSVN], a Subversion client for Windows.&lt;br /&gt;
* [http://www.open.collab.net/downloads/subversion/ CollabNets Subversion], a Subversion client for both Windows and Linux.&lt;br /&gt;
&lt;br /&gt;
[[Category:Robocode Documentation]]&lt;br /&gt;
[[Category:Eclipse IDE]]&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=55049</id>
		<title>Robocode/Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=55049"/>
		<updated>2018-10-19T22:59:41Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: /* Setting up Java Environment Variables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide describes how to build the Robocode application, i.e. the game itself, and not how to build bots for Robocode.&lt;br /&gt;
&lt;br /&gt;
== Developer's Guide for building Robocode with Eclipse setup ==&lt;br /&gt;
&lt;br /&gt;
=== Notice ===&lt;br /&gt;
&lt;br /&gt;
This guide is intended for experienced Java developers, who want to work on the Robocode application, and describes all basic stuff required to compile and run Robocode within the [http://www.eclipse.org Eclipse] IDE.&lt;br /&gt;
&lt;br /&gt;
If you just need to browse the sources, you can do it from [https://github.com/robo-code/robocode here] or you can download the zipped sources from [http://sourceforge.net/projects/robocode/files/robocode%20sources/ here].&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Basically, all you need to get started with building Robocode is:&lt;br /&gt;
&lt;br /&gt;
* Oracle JDK 8 ([https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html Java SE Development Kit 8 Downloads]). Note that only version 6, 7, and 8 will work. Newer versions are not supported (yet) and are almost guaranteed to cause building problems.&lt;br /&gt;
* Source files for Robocode ([https://github.com/robo-code/robocode on GitHub]), which you get by doing a Git clone.&lt;br /&gt;
* An Internet connection.&lt;br /&gt;
&lt;br /&gt;
Other than that, you need to be a skilled Java developer in order to figure out how Robocode is put together. Robocode is a complex application and requires a big effort to grasp and understand. There is practically no documentation available that describe the internal logic, architecture, game rules, coding conventions etc. So you will probably be on your own when trying to figure out how Robocode it put together.&lt;br /&gt;
&lt;br /&gt;
An Internet connection is required for building Robocode distribution files as the build tool (Maven) needs access to [http://maven.apache.org/guides/introduction/introduction-to-repositories.html remote repositories], which contains various libraries and binaries. Some libraries are used for building Robocode, and others are used for running Robocode, and hence need to be put into the distribution files.&lt;br /&gt;
In order to get updates to the sources of Robocode when new versions emerge, an Internet connection is also critical to download changed sources and merge the changes with your version of the sources etc.&lt;br /&gt;
&lt;br /&gt;
Note that all sources of Robocode are for Java 6, meaning that Robocode is able to run on very old Java versions, which is intentional.&lt;br /&gt;
&lt;br /&gt;
==== Installing the JDK ====&lt;br /&gt;
&lt;br /&gt;
Robocode is being developed using Oracle's Java SE, and requires the Java Developer Kit ('''JDK'''), minimum version 6, to be pre-installed on the system used for building Robocode. Please note that a Java Runtime Environment ('''JRE''') is not enough as it does not contain the required developer tools needed for building Robocode. Currently, the Oracle JDK version 8 is recommended for building Robocode.&lt;br /&gt;
&lt;br /&gt;
Notice that when installing the JDK, it is highly recommended that you '''install the sources provided for Java''' as the sources are very useful when debugging Robocode. However, this is not a requirement.&lt;br /&gt;
&lt;br /&gt;
==== Setting up Java Environment Variables ====&lt;br /&gt;
&lt;br /&gt;
You must set up the environment variable named '''JAVA_HOME''' and extend another environment variable named '''PATH'''. You find information on how to setup JAVA_HOME and PATH on the net, e.g. [https://docs.oracle.com/cd/E19182-01/821-0917/inst_jdk_javahome_t/index.html here].&lt;br /&gt;
&lt;br /&gt;
'''JAVA_HOME must be set up point to the root directory of the JDK you intend to use.'''&lt;br /&gt;
&lt;br /&gt;
The PATH environment variable must be extended in order to locate the Java commands like 'java', 'javac' and lots of other tools in the JDK. Extending PATH is considered best practice when setting up the Java development environment, and makes it possible for other tools like e.g. Maven to locate the proper JDK tools. It also makes it possible for you to detirmine which JRE that is being used when running a Java application by writting &amp;lt;code&amp;gt;java -version&amp;lt;/code&amp;gt; in the command-line/shell, and detirmine which Java compiler that is being used by writting &amp;lt;code&amp;gt;javac -version&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
&lt;br /&gt;
'''Windows:'''&lt;br /&gt;
* JAVA_HOME is set to e.g. &amp;lt;code&amp;gt;JAVA_HOME=&amp;quot;C:\Program Files\Java\jdk1.8.0_162&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* PATH is extended, e.g. to &amp;lt;code&amp;gt;PATH=%JAVA_HOME%\bin;PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Linux / *nix:'''&lt;br /&gt;
* JAVA_HOME is set by e.g. &amp;lt;code&amp;gt;export JAVA_HOME=/usr/java/jdk1.8.0_162/bin/java&amp;lt;/code&amp;gt;. (Bash)&lt;br /&gt;
* PATH is extended, e.g. by &amp;lt;code&amp;gt;export PATH=$JAVA_HOME/bin:$PATH&amp;lt;/code&amp;gt;. (Bash)&lt;br /&gt;
&lt;br /&gt;
'''Mac OS X:'''&lt;br /&gt;
* JAVA_HOME is set by e.g. &amp;lt;code&amp;gt;export JAVA_HOME=$(/usr/libexec/java_home)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* PATH is extended, e.g. by &amp;lt;code&amp;gt;export PATH=${JAVA_HOME}/bin:$PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you want more information on how to set up your JAVA_HOME and PATH environment variables for your specific OS, please read the installation notes provided for the Oracle JDK here:&lt;br /&gt;
&lt;br /&gt;
'''Installation Notes from Oracle:'''&lt;br /&gt;
* [http://www.oracle.com/technetwork/java/javase/index-137561.html Installation Notes] for Windows, Linux, Solaris, and Mac.&lt;br /&gt;
* [http://www.oracle.com/technetwork/java/javase/system-configurations-135212.html Certified System Configurations for Java] for ''all'' supported systems.&lt;br /&gt;
&lt;br /&gt;
==== Required technical skills? ====&lt;br /&gt;
&lt;br /&gt;
In order to develop on Robocode, you need to know the basics of these tools:&lt;br /&gt;
&lt;br /&gt;
* Eclipse IDE ([http://www.vogella.com/articles/Eclipse/article.html Tutorial])&lt;br /&gt;
* Git and GitHub ([http://www.vogella.com/articles/Git/article.html Tutorial])&lt;br /&gt;
* Maven ([http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html Tutorial])&lt;br /&gt;
&lt;br /&gt;
Notice that you do not have to be an expert in Eclipse, Git/GitHub, and Maven. But you need some basic knowledge about these tools to understand how to build Robocode. In fact, trying to build Robocode might actually be a very good way of learning these tools, if you don't know them already or miss some practical experience with these. :-)&lt;br /&gt;
&lt;br /&gt;
When you need to start editing the sources of Robocode, you naturally might want to use an IDE for compiling and run Robocode on the fly to quickly see the effect of your work. This is where [http://www.eclipse.org Eclipse IDE] comes into the picture for this guide, as many Java developers regards the Eclipse IDE as the best IDE for Java development. Eclipse comes free of charge, has a huge community, automatic compilation, a rich source code editor, a flexible window layout, and lots of plug-ins. Eclipse has been choosen as the primary IDE for building Robocode, and thus this guide only describes how to setup and build Robocode with this IDE.&lt;br /&gt;
If you want to use another IDE for developing Robocode you need to figure out how to set it up by yourself based on the details from this guide. And you are more than welcome to add a page beside this article that described how to setup everything for IDE of your choise and link to it from this article. :-)&lt;br /&gt;
&lt;br /&gt;
All sources of Robocode are available at [https://github.com/robo-code/robocode GitHub]. At GitHub, you can download sources as a zipped file or create your own [https://help.github.com/articles/fork-a-repo clone/fork], if you want to.&lt;br /&gt;
&lt;br /&gt;
Even though Maven is used as build tool, you don't need to pre-install it on your system. Batch (.bat) and shell (.sh) files are provided with the source files. These scripts will automatically download required libraries, scripts and tools required for building Robocode. Hence, no tools needs to be pre-installed in order to build Robocode beside the JDK and correct environment settings for JAVA_HOME and PATH.&lt;br /&gt;
&lt;br /&gt;
Notice that the shell scripts (.sh files) should work under Unix and *nix like OSes including Max OS X. However, the shell scripts have only been tested under Linux (on Ubuntu), so there is no guarantee that these will run without issues on other *nix systems.&lt;br /&gt;
&lt;br /&gt;
You don't have to worry too much about how to setup Eclipse for Robocode as the provided sources contains all configuration files needed by Eclipse. Some of these files are generated using Maven's build-in support for Eclipse. However, you will need to do some basic pre-configuration of Eclipse before you'll be able to get started with working on Robocode. You should only need to set up a workspace for Robocode once. However, you will need to update the sources from the remote repository on GitHub once in a while, and merge changes with your sources in order to keep up-to-date with the current versions of Robocode, i.e. the trunk/head of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
=== Checking out sources from GitHub ===&lt;br /&gt;
&lt;br /&gt;
In the following, I assume that you want to '''check out''' the sources from GitHub using some [http://git-scm.com/downloads Git client].  This could be one of the Git GUI Clients (git-gui) recommended [http://git-scm.com/downloads/guis here].&lt;br /&gt;
You don't necessarily need a Git client for building Robocode, as you could simply get the sources from a plain .zip file. However, if you want to update your local source files with the newest sources from the Git repository and the ability to commit and/or merge changes, you will need to use some Git client in order to get access to files beside the files inside (Eclipse) project directories, e.g. if you want to check out the scripts located in the root of the Git repository for Robocode.&lt;br /&gt;
&lt;br /&gt;
The URL of the sources at GitHub is:&lt;br /&gt;
[https://github.com/robo-code/robocode.git https://github.com/robo-code/robocode.git]&lt;br /&gt;
&lt;br /&gt;
==== How to build distribution files? ====&lt;br /&gt;
&lt;br /&gt;
In order to build the distribution files containing the installer setup file (robocode-x.x.x-setup.jar) and a .zip file containing all the sources (robocode-x.x.x-src.zip) you must call the '''mvnassembly''' script from the command-line when standing within the root directory of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvnassembly&lt;br /&gt;
&lt;br /&gt;
On *nix:&lt;br /&gt;
  ./mvnassembly.sh&lt;br /&gt;
&lt;br /&gt;
This will build the distribution files, which will be put into the sub-directory named ''robocode.distribution/target''.&lt;br /&gt;
&lt;br /&gt;
'''mvnassembly''' is a script that compiles all sources of the Robocode game, creates javadoc html files, run test units, and finally creates the target distribution files. The first time this script is run, it will need to download a huge amount of .jar files from various Maven repositories and which contains Maven plugins etc. used for building Robocode. So please be patient with it the first time.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Eclipse for developing on Robocode ===&lt;br /&gt;
&lt;br /&gt;
Here follows a description of how to setup Eclipse for developing on Robocode.&lt;br /&gt;
&lt;br /&gt;
==== Software Requirements for Eclipse IDE ====&lt;br /&gt;
&lt;br /&gt;
Here follows the recommended software needed to start developing on Robocode with the Eclipse IDE:&lt;br /&gt;
&lt;br /&gt;
'''Required:'''&lt;br /&gt;
* Oracle JDK 6 ([http://www.oracle.com/technetwork/java/javase/downloads/index.html download]) must be pre-installed.&lt;br /&gt;
* Eclipse IDE for Java Developers([http://www.eclipse.org/downloads/ download]). The Juno, Kepler, Luna works fine for Robocode and supports Git.&lt;br /&gt;
&lt;br /&gt;
Please consult the [http://wiki.eclipse.org/Eclipse/Installation#Install_a_JVM installation notes] provided for Eclipse in order to find out how to install Eclipse for your specific OS.&lt;br /&gt;
&lt;br /&gt;
==== Create a workspace for Robocode ====&lt;br /&gt;
&lt;br /&gt;
When you have setup and installed Eclipse on your system (if you did not have it on your system already), a workspace must be created for Robocode.&lt;br /&gt;
&lt;br /&gt;
The first time you start up a newly installed Eclipse, it will ask for a directory for your workspace. I suggest that you create a workspace named '''robocode-workspace''' or similar and create the workspace on a partition or directory like e.g. &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; (on Windows) or &amp;lt;code&amp;gt;~&amp;lt;/code&amp;gt; (on Linux) - or any other directory of your choice. If you have already got a workspace, e.g. the default one suggested by Eclipse, you can create a new workspace if you wish by selecting 'File' -&amp;gt; 'Switch Workspace' -&amp;gt; 'Other...' from the menu.&lt;br /&gt;
&lt;br /&gt;
==== M2_REPO class path variable ====&lt;br /&gt;
&lt;br /&gt;
One of the first things you need to do in Eclipse is to set up the '''M2_REPO''' class path variable for Eclipse, which points to your local Maven 2 repository. That is, Eclipse uses the M2_REPO class path variable for locating the Maven repository containing various libraries used for compiling Robocode etc. But before you can setup the M2_REPO class path in Eclipse, you must run the 'mvnassembly' command described earlier if you have not already done that.&lt;br /&gt;
&lt;br /&gt;
When calling the 'mvnassembly' script or alternatively start off Maven within the root of the robocode sources by calling e.g. 'mvn clean install', Maven will download all required libraries from other sites into your local Maven repository. Note that you will need to locate your local Maven repository. Under Windows your Maven repository is put into your %USERPROFILE% directory, and on Linux is put into your home directory (~). The Maven repository will be put under .m2/repository.&lt;br /&gt;
&lt;br /&gt;
To setup the M2_REPO class path in Eclipse, you must go to the menu bar and select 'Window' -&amp;gt; 'Preferences'. On the Preferences window expand the 'Java' -&amp;gt; 'Build Path' and select the 'Classpath Variables'. On the page for the Classpath Variables, you click on the 'New...' button, and enter M2_REPO as name. Next, you click on the 'Folder...' button and navigate to where you have your .m2/repository directory located (in %USERPROFILE% under Windows, and ~ under Linux), e.g. &amp;lt;code&amp;gt;C:/Users/Flemming/.m2/repository&amp;lt;/code&amp;gt; (Windows) or &amp;lt;code&amp;gt;/home/fnl/.m2/repository&amp;lt;/code&amp;gt; (Linux).&lt;br /&gt;
&lt;br /&gt;
When Eclipse asks you if it should rebuild the workspace, you select 'Yes'.&lt;br /&gt;
&lt;br /&gt;
==== Configure JDK for your workspace ====&lt;br /&gt;
&lt;br /&gt;
You must setup which JDK that will be used for compiling (and running) Robocode in your workspace.&lt;br /&gt;
You do this by...&lt;br /&gt;
# selecting Window -&amp;gt; Preferences from the menu, and then unfold and select Java -&amp;gt; Installed JREs and press 'Add...' on the 'Installed JREs' page.&lt;br /&gt;
# Select 'Standard VM' on the 'JRE Type' page and press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# Press the 'Directory...' button and browse to where you have installed your JDK 6 and press 'Finish' or Enter. Make sure to select a JDK and ''not'' a JRE, as a JRE is not sufficient as it lacks the tools available with the JDK.&lt;br /&gt;
# When you get back to the 'Installed JREs' page, make sure to put a check mark in the JDK you just added and press 'OK' or Enter.&lt;br /&gt;
&lt;br /&gt;
==== Importing sources of Robocode using Git ====&lt;br /&gt;
&lt;br /&gt;
Importing the projects for Robocode into Eclipse from Git can be done from the Package Explorer, which can be opened from the menu by selecting Window -&amp;gt; Show View -&amp;gt; Package Explorer or by using the keyboard shortcut by pressing Alt+Shift+Q and P. In the Package Explorer, you...&lt;br /&gt;
&lt;br /&gt;
# Right-click the mouse and select 'Import...' in the popup menu that occurs.&lt;br /&gt;
# Unfold 'Git' in the 'Import' window and double-click 'Projects from Git'.&lt;br /&gt;
# On the 'Import Projects from Git' you select 'URI'.&lt;br /&gt;
# On the next page named 'Source Git Repository' to enter '''https://github.com/robo-code/robocode.git''' into the 'URI:' text field and press Enter or 'Next &amp;gt;'.&lt;br /&gt;
# On the 'Branch Selection' page you press 'Deselect All' and select the branch you want to work on. This would normally be 'master', which is the master branch of Robocode. When the branch selection is made, you press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# On the 'Local Destination' page, you must note the directory where your local files will be put. I recommend you use the directory suggested by Git (Eclipse) and press 'Finish' or Enter.&lt;br /&gt;
# On the 'Select a wizard to use for importing projects', make sure 'Import existing projects' is selected and press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# On 'Import Projects', you should deselect the first project named 'plugins' as you would normally not want to develop on plugins for Robocode - otherwise just omit deselecting 'plugins'. Press 'Finish' or Enter.&lt;br /&gt;
# All Robocode projects will now be imported into Eclipse and be visible in the Package Explorer.&lt;br /&gt;
# Now, select all projects (press Ctrl+A) and right-click the Package Explorer and select Replace With -&amp;gt; HEAD Revision on the popup menu that occurs, and press 'OK' or Enter to discard local changes on the dialog that appears.&lt;br /&gt;
&lt;br /&gt;
Congratulations, you should now be able to get started working on the Robocode sources in Eclipse. :-)&lt;br /&gt;
&lt;br /&gt;
==== Launch Robocode ====&lt;br /&gt;
&lt;br /&gt;
Before launching Robocode for the first time, you should make sure that it is cleaned and compiled first. You do this by selecting Project -&amp;gt; Clean... from the menu. You should also make sure that you have run the 'mvnassembly' described previously, which will download and update your local Maven repository, which is necessary for compiling and running Robocode.&lt;br /&gt;
&lt;br /&gt;
Please notice that it might be necessary to refresh the sources in Eclipse when files are changed outside the Eclipse editor, which is the case when running the 'mvnassembly' script. You can do this from the Package Explorer by right-clicking in this and select 'Refresh'.&lt;br /&gt;
&lt;br /&gt;
In order to start running or debugging Robocode, you should select the &amp;quot;Bug&amp;quot; (debug) or &amp;quot;Play&amp;quot; (run) button in the top of Eclipse under the menu. You should press the little arrow beside these green buttons in order to choose among: Robocode, RoboRumble, TeamRumble, and MeleeRumble. The 3 last ones are for running the RoboRumble@Home clients.&lt;br /&gt;
&lt;br /&gt;
==== How to run the unit tests? ====&lt;br /&gt;
&lt;br /&gt;
When you want to run the unit test from within Eclipse, you must do this from the the Package Explorer, where you right-click on the 'robocode.tests' project and select 'Run As' -&amp;gt; 'JUnit Test'. Now all available unit tests will run automatically.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can start the tests from the command-line by standing on your robocode workspace, and write the following Maven command.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvn test install&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  ./mvn.sh test install&lt;br /&gt;
&lt;br /&gt;
=== Robocode developers and contributions ===&lt;br /&gt;
&lt;br /&gt;
Robocode developers have discussion group at robocode-developers@googlegroups.com. Everybody interested in discussion about future of Robocode are welcome. We also welcome your contributions there. The discussion group is located here: http://groups.google.com/group/robocode-developers.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Robocode/Old Developers Guide for building Robocode|Old version]] of the Developer's Guide for building Robocode for Robocode versions prior to version 1.7.&lt;br /&gt;
* [http://code.google.com/p/robocode/source/browse/ Browse the sources] of Robocode.&lt;br /&gt;
* [http://sourceforge.net/project/showfiles.php?group_id=37202&amp;amp;package_id=218677 Download the sources] of Robocode.&lt;br /&gt;
* [http://groups.google.com/group/robocode-developers Robocode developers discussion group].&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* The [http://sourceforge.net/projects/robocode Robocode project] on SourceForge.&lt;br /&gt;
* [http://sourceforge.net/svn/?group_id=37202 How to access] the SVN Repository for Robocode.&lt;br /&gt;
* [http://www.eclipse.org/ Eclipse] - an open development platform supported by Robocode.&lt;br /&gt;
* [http://maven.apache.org/ Apache Maven] used for building Robocode.&lt;br /&gt;
* [http://maven.apache.org/guides/mini/guide-ide-eclipse.html Guide] to using Eclipse with Maven 2.x.&lt;br /&gt;
* [http://www.eclipse.org/subversive/ Eclipse Subversive] is a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://subclipse.tigris.org/ Subclipse] is also a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://tortoisesvn.net TortoiseSVN], a Subversion client for Windows.&lt;br /&gt;
* [http://www.open.collab.net/downloads/subversion/ CollabNets Subversion], a Subversion client for both Windows and Linux.&lt;br /&gt;
&lt;br /&gt;
[[Category:Robocode Documentation]]&lt;br /&gt;
[[Category:Eclipse IDE]]&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=55048</id>
		<title>Robocode/Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=55048"/>
		<updated>2018-10-19T22:57:55Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: /* Setting up Java Environment Variables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide describes how to build the Robocode application, i.e. the game itself, and not how to build bots for Robocode.&lt;br /&gt;
&lt;br /&gt;
== Developer's Guide for building Robocode with Eclipse setup ==&lt;br /&gt;
&lt;br /&gt;
=== Notice ===&lt;br /&gt;
&lt;br /&gt;
This guide is intended for experienced Java developers, who want to work on the Robocode application, and describes all basic stuff required to compile and run Robocode within the [http://www.eclipse.org Eclipse] IDE.&lt;br /&gt;
&lt;br /&gt;
If you just need to browse the sources, you can do it from [https://github.com/robo-code/robocode here] or you can download the zipped sources from [http://sourceforge.net/projects/robocode/files/robocode%20sources/ here].&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Basically, all you need to get started with building Robocode is:&lt;br /&gt;
&lt;br /&gt;
* Oracle JDK 8 ([https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html Java SE Development Kit 8 Downloads]). Note that only version 6, 7, and 8 will work. Newer versions are not supported (yet) and are almost guaranteed to cause building problems.&lt;br /&gt;
* Source files for Robocode ([https://github.com/robo-code/robocode on GitHub]), which you get by doing a Git clone.&lt;br /&gt;
* An Internet connection.&lt;br /&gt;
&lt;br /&gt;
Other than that, you need to be a skilled Java developer in order to figure out how Robocode is put together. Robocode is a complex application and requires a big effort to grasp and understand. There is practically no documentation available that describe the internal logic, architecture, game rules, coding conventions etc. So you will probably be on your own when trying to figure out how Robocode it put together.&lt;br /&gt;
&lt;br /&gt;
An Internet connection is required for building Robocode distribution files as the build tool (Maven) needs access to [http://maven.apache.org/guides/introduction/introduction-to-repositories.html remote repositories], which contains various libraries and binaries. Some libraries are used for building Robocode, and others are used for running Robocode, and hence need to be put into the distribution files.&lt;br /&gt;
In order to get updates to the sources of Robocode when new versions emerge, an Internet connection is also critical to download changed sources and merge the changes with your version of the sources etc.&lt;br /&gt;
&lt;br /&gt;
Note that all sources of Robocode are for Java 6, meaning that Robocode is able to run on very old Java versions, which is intentional.&lt;br /&gt;
&lt;br /&gt;
==== Installing the JDK ====&lt;br /&gt;
&lt;br /&gt;
Robocode is being developed using Oracle's Java SE, and requires the Java Developer Kit ('''JDK'''), minimum version 6, to be pre-installed on the system used for building Robocode. Please note that a Java Runtime Environment ('''JRE''') is not enough as it does not contain the required developer tools needed for building Robocode. Currently, the Oracle JDK version 8 is recommended for building Robocode.&lt;br /&gt;
&lt;br /&gt;
Notice that when installing the JDK, it is highly recommended that you '''install the sources provided for Java''' as the sources are very useful when debugging Robocode. However, this is not a requirement.&lt;br /&gt;
&lt;br /&gt;
==== Setting up Java Environment Variables ====&lt;br /&gt;
&lt;br /&gt;
You must set up the environment variable named '''JAVA_HOME''' and extend another environment variable named '''PATH'''. You find information on how to setup JAVA_HOME and PATH on the net, e.g. [https://docs.oracle.com/cd/E19182-01/821-0917/inst_jdk_javahome_t/index.html here].&lt;br /&gt;
&lt;br /&gt;
'''JAVA_HOME must be set up point to the root directory of the JDK you intend to use.'''&lt;br /&gt;
&lt;br /&gt;
The PATH environment variable must be extended in order to locate the Java commands like 'java', 'javac' and lots of other tools in the JDK. Extending PATH is considered best practice when setting up the Java development environment, and makes it possible for other tools like e.g. Maven to locate the proper JDK tools. It also makes it possible for you to detirmine which JRE that is being used when running a Java application by writting &amp;lt;code&amp;gt;java -version&amp;lt;/code&amp;gt; in the command-line/shell, and detirmine which Java compiler that is being used by writting &amp;lt;code&amp;gt;javac -version&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
&lt;br /&gt;
'''Windows:'''&lt;br /&gt;
* JAVA_HOME is set to e.g. &amp;lt;code&amp;gt;JAVA_HOME=&amp;quot;C:\Program Files\Java\jdk1.6.0_45&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* PATH is extended, e.g. to &amp;lt;code&amp;gt;PATH=%JAVA_HOME%\bin;PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Linux / *nix:'''&lt;br /&gt;
* JAVA_HOME is set by e.g. &amp;lt;code&amp;gt;export JAVA_HOME=/usr/java/jdk1.6.0_45/bin/java&amp;lt;/code&amp;gt;. (Bash)&lt;br /&gt;
* PATH is extended, e.g. by &amp;lt;code&amp;gt;export PATH=$JAVA_HOME/bin:$PATH&amp;lt;/code&amp;gt;. (Bash)&lt;br /&gt;
&lt;br /&gt;
'''Mac OS X:'''&lt;br /&gt;
* JAVA_HOME is set by e.g. &amp;lt;code&amp;gt;export JAVA_HOME=$(/usr/libexec/java_home)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* PATH is extended, e.g. by &amp;lt;code&amp;gt;export PATH=${JAVA_HOME}/bin:$PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you want more information of how to set up your JAVA_HOME and PATH environment variables for your specific OS, please read the installation notes provided for the Oracle JDK here:&lt;br /&gt;
&lt;br /&gt;
'''Installation Notes from Oracle:'''&lt;br /&gt;
* [http://www.oracle.com/technetwork/java/javase/index-137561.html Installation Notes] for Windows, Linux, Solaris, and Mac.&lt;br /&gt;
* [http://www.oracle.com/technetwork/java/javase/system-configurations-135212.html Certified System Configurations for Java] for ''all'' supported systems.&lt;br /&gt;
&lt;br /&gt;
==== Required technical skills? ====&lt;br /&gt;
&lt;br /&gt;
In order to develop on Robocode, you need to know the basics of these tools:&lt;br /&gt;
&lt;br /&gt;
* Eclipse IDE ([http://www.vogella.com/articles/Eclipse/article.html Tutorial])&lt;br /&gt;
* Git and GitHub ([http://www.vogella.com/articles/Git/article.html Tutorial])&lt;br /&gt;
* Maven ([http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html Tutorial])&lt;br /&gt;
&lt;br /&gt;
Notice that you do not have to be an expert in Eclipse, Git/GitHub, and Maven. But you need some basic knowledge about these tools to understand how to build Robocode. In fact, trying to build Robocode might actually be a very good way of learning these tools, if you don't know them already or miss some practical experience with these. :-)&lt;br /&gt;
&lt;br /&gt;
When you need to start editing the sources of Robocode, you naturally might want to use an IDE for compiling and run Robocode on the fly to quickly see the effect of your work. This is where [http://www.eclipse.org Eclipse IDE] comes into the picture for this guide, as many Java developers regards the Eclipse IDE as the best IDE for Java development. Eclipse comes free of charge, has a huge community, automatic compilation, a rich source code editor, a flexible window layout, and lots of plug-ins. Eclipse has been choosen as the primary IDE for building Robocode, and thus this guide only describes how to setup and build Robocode with this IDE.&lt;br /&gt;
If you want to use another IDE for developing Robocode you need to figure out how to set it up by yourself based on the details from this guide. And you are more than welcome to add a page beside this article that described how to setup everything for IDE of your choise and link to it from this article. :-)&lt;br /&gt;
&lt;br /&gt;
All sources of Robocode are available at [https://github.com/robo-code/robocode GitHub]. At GitHub, you can download sources as a zipped file or create your own [https://help.github.com/articles/fork-a-repo clone/fork], if you want to.&lt;br /&gt;
&lt;br /&gt;
Even though Maven is used as build tool, you don't need to pre-install it on your system. Batch (.bat) and shell (.sh) files are provided with the source files. These scripts will automatically download required libraries, scripts and tools required for building Robocode. Hence, no tools needs to be pre-installed in order to build Robocode beside the JDK and correct environment settings for JAVA_HOME and PATH.&lt;br /&gt;
&lt;br /&gt;
Notice that the shell scripts (.sh files) should work under Unix and *nix like OSes including Max OS X. However, the shell scripts have only been tested under Linux (on Ubuntu), so there is no guarantee that these will run without issues on other *nix systems.&lt;br /&gt;
&lt;br /&gt;
You don't have to worry too much about how to setup Eclipse for Robocode as the provided sources contains all configuration files needed by Eclipse. Some of these files are generated using Maven's build-in support for Eclipse. However, you will need to do some basic pre-configuration of Eclipse before you'll be able to get started with working on Robocode. You should only need to set up a workspace for Robocode once. However, you will need to update the sources from the remote repository on GitHub once in a while, and merge changes with your sources in order to keep up-to-date with the current versions of Robocode, i.e. the trunk/head of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
=== Checking out sources from GitHub ===&lt;br /&gt;
&lt;br /&gt;
In the following, I assume that you want to '''check out''' the sources from GitHub using some [http://git-scm.com/downloads Git client].  This could be one of the Git GUI Clients (git-gui) recommended [http://git-scm.com/downloads/guis here].&lt;br /&gt;
You don't necessarily need a Git client for building Robocode, as you could simply get the sources from a plain .zip file. However, if you want to update your local source files with the newest sources from the Git repository and the ability to commit and/or merge changes, you will need to use some Git client in order to get access to files beside the files inside (Eclipse) project directories, e.g. if you want to check out the scripts located in the root of the Git repository for Robocode.&lt;br /&gt;
&lt;br /&gt;
The URL of the sources at GitHub is:&lt;br /&gt;
[https://github.com/robo-code/robocode.git https://github.com/robo-code/robocode.git]&lt;br /&gt;
&lt;br /&gt;
==== How to build distribution files? ====&lt;br /&gt;
&lt;br /&gt;
In order to build the distribution files containing the installer setup file (robocode-x.x.x-setup.jar) and a .zip file containing all the sources (robocode-x.x.x-src.zip) you must call the '''mvnassembly''' script from the command-line when standing within the root directory of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvnassembly&lt;br /&gt;
&lt;br /&gt;
On *nix:&lt;br /&gt;
  ./mvnassembly.sh&lt;br /&gt;
&lt;br /&gt;
This will build the distribution files, which will be put into the sub-directory named ''robocode.distribution/target''.&lt;br /&gt;
&lt;br /&gt;
'''mvnassembly''' is a script that compiles all sources of the Robocode game, creates javadoc html files, run test units, and finally creates the target distribution files. The first time this script is run, it will need to download a huge amount of .jar files from various Maven repositories and which contains Maven plugins etc. used for building Robocode. So please be patient with it the first time.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Eclipse for developing on Robocode ===&lt;br /&gt;
&lt;br /&gt;
Here follows a description of how to setup Eclipse for developing on Robocode.&lt;br /&gt;
&lt;br /&gt;
==== Software Requirements for Eclipse IDE ====&lt;br /&gt;
&lt;br /&gt;
Here follows the recommended software needed to start developing on Robocode with the Eclipse IDE:&lt;br /&gt;
&lt;br /&gt;
'''Required:'''&lt;br /&gt;
* Oracle JDK 6 ([http://www.oracle.com/technetwork/java/javase/downloads/index.html download]) must be pre-installed.&lt;br /&gt;
* Eclipse IDE for Java Developers([http://www.eclipse.org/downloads/ download]). The Juno, Kepler, Luna works fine for Robocode and supports Git.&lt;br /&gt;
&lt;br /&gt;
Please consult the [http://wiki.eclipse.org/Eclipse/Installation#Install_a_JVM installation notes] provided for Eclipse in order to find out how to install Eclipse for your specific OS.&lt;br /&gt;
&lt;br /&gt;
==== Create a workspace for Robocode ====&lt;br /&gt;
&lt;br /&gt;
When you have setup and installed Eclipse on your system (if you did not have it on your system already), a workspace must be created for Robocode.&lt;br /&gt;
&lt;br /&gt;
The first time you start up a newly installed Eclipse, it will ask for a directory for your workspace. I suggest that you create a workspace named '''robocode-workspace''' or similar and create the workspace on a partition or directory like e.g. &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; (on Windows) or &amp;lt;code&amp;gt;~&amp;lt;/code&amp;gt; (on Linux) - or any other directory of your choice. If you have already got a workspace, e.g. the default one suggested by Eclipse, you can create a new workspace if you wish by selecting 'File' -&amp;gt; 'Switch Workspace' -&amp;gt; 'Other...' from the menu.&lt;br /&gt;
&lt;br /&gt;
==== M2_REPO class path variable ====&lt;br /&gt;
&lt;br /&gt;
One of the first things you need to do in Eclipse is to set up the '''M2_REPO''' class path variable for Eclipse, which points to your local Maven 2 repository. That is, Eclipse uses the M2_REPO class path variable for locating the Maven repository containing various libraries used for compiling Robocode etc. But before you can setup the M2_REPO class path in Eclipse, you must run the 'mvnassembly' command described earlier if you have not already done that.&lt;br /&gt;
&lt;br /&gt;
When calling the 'mvnassembly' script or alternatively start off Maven within the root of the robocode sources by calling e.g. 'mvn clean install', Maven will download all required libraries from other sites into your local Maven repository. Note that you will need to locate your local Maven repository. Under Windows your Maven repository is put into your %USERPROFILE% directory, and on Linux is put into your home directory (~). The Maven repository will be put under .m2/repository.&lt;br /&gt;
&lt;br /&gt;
To setup the M2_REPO class path in Eclipse, you must go to the menu bar and select 'Window' -&amp;gt; 'Preferences'. On the Preferences window expand the 'Java' -&amp;gt; 'Build Path' and select the 'Classpath Variables'. On the page for the Classpath Variables, you click on the 'New...' button, and enter M2_REPO as name. Next, you click on the 'Folder...' button and navigate to where you have your .m2/repository directory located (in %USERPROFILE% under Windows, and ~ under Linux), e.g. &amp;lt;code&amp;gt;C:/Users/Flemming/.m2/repository&amp;lt;/code&amp;gt; (Windows) or &amp;lt;code&amp;gt;/home/fnl/.m2/repository&amp;lt;/code&amp;gt; (Linux).&lt;br /&gt;
&lt;br /&gt;
When Eclipse asks you if it should rebuild the workspace, you select 'Yes'.&lt;br /&gt;
&lt;br /&gt;
==== Configure JDK for your workspace ====&lt;br /&gt;
&lt;br /&gt;
You must setup which JDK that will be used for compiling (and running) Robocode in your workspace.&lt;br /&gt;
You do this by...&lt;br /&gt;
# selecting Window -&amp;gt; Preferences from the menu, and then unfold and select Java -&amp;gt; Installed JREs and press 'Add...' on the 'Installed JREs' page.&lt;br /&gt;
# Select 'Standard VM' on the 'JRE Type' page and press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# Press the 'Directory...' button and browse to where you have installed your JDK 6 and press 'Finish' or Enter. Make sure to select a JDK and ''not'' a JRE, as a JRE is not sufficient as it lacks the tools available with the JDK.&lt;br /&gt;
# When you get back to the 'Installed JREs' page, make sure to put a check mark in the JDK you just added and press 'OK' or Enter.&lt;br /&gt;
&lt;br /&gt;
==== Importing sources of Robocode using Git ====&lt;br /&gt;
&lt;br /&gt;
Importing the projects for Robocode into Eclipse from Git can be done from the Package Explorer, which can be opened from the menu by selecting Window -&amp;gt; Show View -&amp;gt; Package Explorer or by using the keyboard shortcut by pressing Alt+Shift+Q and P. In the Package Explorer, you...&lt;br /&gt;
&lt;br /&gt;
# Right-click the mouse and select 'Import...' in the popup menu that occurs.&lt;br /&gt;
# Unfold 'Git' in the 'Import' window and double-click 'Projects from Git'.&lt;br /&gt;
# On the 'Import Projects from Git' you select 'URI'.&lt;br /&gt;
# On the next page named 'Source Git Repository' to enter '''https://github.com/robo-code/robocode.git''' into the 'URI:' text field and press Enter or 'Next &amp;gt;'.&lt;br /&gt;
# On the 'Branch Selection' page you press 'Deselect All' and select the branch you want to work on. This would normally be 'master', which is the master branch of Robocode. When the branch selection is made, you press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# On the 'Local Destination' page, you must note the directory where your local files will be put. I recommend you use the directory suggested by Git (Eclipse) and press 'Finish' or Enter.&lt;br /&gt;
# On the 'Select a wizard to use for importing projects', make sure 'Import existing projects' is selected and press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# On 'Import Projects', you should deselect the first project named 'plugins' as you would normally not want to develop on plugins for Robocode - otherwise just omit deselecting 'plugins'. Press 'Finish' or Enter.&lt;br /&gt;
# All Robocode projects will now be imported into Eclipse and be visible in the Package Explorer.&lt;br /&gt;
# Now, select all projects (press Ctrl+A) and right-click the Package Explorer and select Replace With -&amp;gt; HEAD Revision on the popup menu that occurs, and press 'OK' or Enter to discard local changes on the dialog that appears.&lt;br /&gt;
&lt;br /&gt;
Congratulations, you should now be able to get started working on the Robocode sources in Eclipse. :-)&lt;br /&gt;
&lt;br /&gt;
==== Launch Robocode ====&lt;br /&gt;
&lt;br /&gt;
Before launching Robocode for the first time, you should make sure that it is cleaned and compiled first. You do this by selecting Project -&amp;gt; Clean... from the menu. You should also make sure that you have run the 'mvnassembly' described previously, which will download and update your local Maven repository, which is necessary for compiling and running Robocode.&lt;br /&gt;
&lt;br /&gt;
Please notice that it might be necessary to refresh the sources in Eclipse when files are changed outside the Eclipse editor, which is the case when running the 'mvnassembly' script. You can do this from the Package Explorer by right-clicking in this and select 'Refresh'.&lt;br /&gt;
&lt;br /&gt;
In order to start running or debugging Robocode, you should select the &amp;quot;Bug&amp;quot; (debug) or &amp;quot;Play&amp;quot; (run) button in the top of Eclipse under the menu. You should press the little arrow beside these green buttons in order to choose among: Robocode, RoboRumble, TeamRumble, and MeleeRumble. The 3 last ones are for running the RoboRumble@Home clients.&lt;br /&gt;
&lt;br /&gt;
==== How to run the unit tests? ====&lt;br /&gt;
&lt;br /&gt;
When you want to run the unit test from within Eclipse, you must do this from the the Package Explorer, where you right-click on the 'robocode.tests' project and select 'Run As' -&amp;gt; 'JUnit Test'. Now all available unit tests will run automatically.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can start the tests from the command-line by standing on your robocode workspace, and write the following Maven command.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvn test install&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  ./mvn.sh test install&lt;br /&gt;
&lt;br /&gt;
=== Robocode developers and contributions ===&lt;br /&gt;
&lt;br /&gt;
Robocode developers have discussion group at robocode-developers@googlegroups.com. Everybody interested in discussion about future of Robocode are welcome. We also welcome your contributions there. The discussion group is located here: http://groups.google.com/group/robocode-developers.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Robocode/Old Developers Guide for building Robocode|Old version]] of the Developer's Guide for building Robocode for Robocode versions prior to version 1.7.&lt;br /&gt;
* [http://code.google.com/p/robocode/source/browse/ Browse the sources] of Robocode.&lt;br /&gt;
* [http://sourceforge.net/project/showfiles.php?group_id=37202&amp;amp;package_id=218677 Download the sources] of Robocode.&lt;br /&gt;
* [http://groups.google.com/group/robocode-developers Robocode developers discussion group].&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* The [http://sourceforge.net/projects/robocode Robocode project] on SourceForge.&lt;br /&gt;
* [http://sourceforge.net/svn/?group_id=37202 How to access] the SVN Repository for Robocode.&lt;br /&gt;
* [http://www.eclipse.org/ Eclipse] - an open development platform supported by Robocode.&lt;br /&gt;
* [http://maven.apache.org/ Apache Maven] used for building Robocode.&lt;br /&gt;
* [http://maven.apache.org/guides/mini/guide-ide-eclipse.html Guide] to using Eclipse with Maven 2.x.&lt;br /&gt;
* [http://www.eclipse.org/subversive/ Eclipse Subversive] is a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://subclipse.tigris.org/ Subclipse] is also a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://tortoisesvn.net TortoiseSVN], a Subversion client for Windows.&lt;br /&gt;
* [http://www.open.collab.net/downloads/subversion/ CollabNets Subversion], a Subversion client for both Windows and Linux.&lt;br /&gt;
&lt;br /&gt;
[[Category:Robocode Documentation]]&lt;br /&gt;
[[Category:Eclipse IDE]]&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=55047</id>
		<title>Robocode/Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=55047"/>
		<updated>2018-10-19T22:51:00Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: /* Installing the JDK */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide describes how to build the Robocode application, i.e. the game itself, and not how to build bots for Robocode.&lt;br /&gt;
&lt;br /&gt;
== Developer's Guide for building Robocode with Eclipse setup ==&lt;br /&gt;
&lt;br /&gt;
=== Notice ===&lt;br /&gt;
&lt;br /&gt;
This guide is intended for experienced Java developers, who want to work on the Robocode application, and describes all basic stuff required to compile and run Robocode within the [http://www.eclipse.org Eclipse] IDE.&lt;br /&gt;
&lt;br /&gt;
If you just need to browse the sources, you can do it from [https://github.com/robo-code/robocode here] or you can download the zipped sources from [http://sourceforge.net/projects/robocode/files/robocode%20sources/ here].&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Basically, all you need to get started with building Robocode is:&lt;br /&gt;
&lt;br /&gt;
* Oracle JDK 8 ([https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html Java SE Development Kit 8 Downloads]). Note that only version 6, 7, and 8 will work. Newer versions are not supported (yet) and are almost guaranteed to cause building problems.&lt;br /&gt;
* Source files for Robocode ([https://github.com/robo-code/robocode on GitHub]), which you get by doing a Git clone.&lt;br /&gt;
* An Internet connection.&lt;br /&gt;
&lt;br /&gt;
Other than that, you need to be a skilled Java developer in order to figure out how Robocode is put together. Robocode is a complex application and requires a big effort to grasp and understand. There is practically no documentation available that describe the internal logic, architecture, game rules, coding conventions etc. So you will probably be on your own when trying to figure out how Robocode it put together.&lt;br /&gt;
&lt;br /&gt;
An Internet connection is required for building Robocode distribution files as the build tool (Maven) needs access to [http://maven.apache.org/guides/introduction/introduction-to-repositories.html remote repositories], which contains various libraries and binaries. Some libraries are used for building Robocode, and others are used for running Robocode, and hence need to be put into the distribution files.&lt;br /&gt;
In order to get updates to the sources of Robocode when new versions emerge, an Internet connection is also critical to download changed sources and merge the changes with your version of the sources etc.&lt;br /&gt;
&lt;br /&gt;
Note that all sources of Robocode are for Java 6, meaning that Robocode is able to run on very old Java versions, which is intentional.&lt;br /&gt;
&lt;br /&gt;
==== Installing the JDK ====&lt;br /&gt;
&lt;br /&gt;
Robocode is being developed using Oracle's Java SE, and requires the Java Developer Kit ('''JDK'''), minimum version 6, to be pre-installed on the system used for building Robocode. Please note that a Java Runtime Environment ('''JRE''') is not enough as it does not contain the required developer tools needed for building Robocode. Currently, the Oracle JDK version 8 is recommended for building Robocode.&lt;br /&gt;
&lt;br /&gt;
Notice that when installing the JDK, it is highly recommended that you '''install the sources provided for Java''' as the sources are very useful when debugging Robocode. However, this is not a requirement.&lt;br /&gt;
&lt;br /&gt;
==== Setting up Java Environment Variables ====&lt;br /&gt;
&lt;br /&gt;
You must set up the environment variable named '''JAVA_HOME''' and extend another environment variable named '''PATH'''.&lt;br /&gt;
&lt;br /&gt;
'''JAVA_HOME must be set up point to the root directory of the JDK you intend to use.'''&lt;br /&gt;
&lt;br /&gt;
The PATH environment variable must be extended in order to locate the Java commands like 'java', 'javac' and lots of other tools in the JDK. Extending PATH is considered best practice when setting up the Java development environment, and makes it possible for other tools like e.g. Maven to locate the proper JDK tools. It also makes it possible for you to detirmine which JRE that is being used when running a Java application by writting &amp;lt;code&amp;gt;java -version&amp;lt;/code&amp;gt; in the command-line/shell, and detirmine which Java compiler that is being used by writting &amp;lt;code&amp;gt;javac -version&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
&lt;br /&gt;
'''Windows:'''&lt;br /&gt;
* JAVA_HOME is set to e.g. &amp;lt;code&amp;gt;JAVA_HOME=&amp;quot;C:\Program Files\Java\jdk1.6.0_45&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* PATH is extended, e.g. to &amp;lt;code&amp;gt;PATH=%JAVA_HOME%\bin;PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Linux / *nix:'''&lt;br /&gt;
* JAVA_HOME is set by e.g. &amp;lt;code&amp;gt;export JAVA_HOME=/usr/java/jdk1.6.0_45/bin/java&amp;lt;/code&amp;gt;. (Bash)&lt;br /&gt;
* PATH is extended, e.g. by &amp;lt;code&amp;gt;export PATH=$JAVA_HOME/bin:$PATH&amp;lt;/code&amp;gt;. (Bash)&lt;br /&gt;
&lt;br /&gt;
'''Mac OS X:'''&lt;br /&gt;
* JAVA_HOME is set by e.g. &amp;lt;code&amp;gt;export JAVA_HOME=$(/usr/libexec/java_home)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* PATH is extended, e.g. by &amp;lt;code&amp;gt;export PATH=${JAVA_HOME}/bin:$PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you want more information of how to set up your JAVA_HOME and PATH environment variables for your specific OS, please read the installation notes provided for the Oracle JDK here:&lt;br /&gt;
&lt;br /&gt;
'''Installation Notes from Oracle:'''&lt;br /&gt;
* [http://www.oracle.com/technetwork/java/javase/index-137561.html Installation Notes] for Windows, Linux, Solaris, and Mac.&lt;br /&gt;
* [http://www.oracle.com/technetwork/java/javase/system-configurations-135212.html Certified System Configurations for Java] for ''all'' supported systems.&lt;br /&gt;
&lt;br /&gt;
==== Required technical skills? ====&lt;br /&gt;
&lt;br /&gt;
In order to develop on Robocode, you need to know the basics of these tools:&lt;br /&gt;
&lt;br /&gt;
* Eclipse IDE ([http://www.vogella.com/articles/Eclipse/article.html Tutorial])&lt;br /&gt;
* Git and GitHub ([http://www.vogella.com/articles/Git/article.html Tutorial])&lt;br /&gt;
* Maven ([http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html Tutorial])&lt;br /&gt;
&lt;br /&gt;
Notice that you do not have to be an expert in Eclipse, Git/GitHub, and Maven. But you need some basic knowledge about these tools to understand how to build Robocode. In fact, trying to build Robocode might actually be a very good way of learning these tools, if you don't know them already or miss some practical experience with these. :-)&lt;br /&gt;
&lt;br /&gt;
When you need to start editing the sources of Robocode, you naturally might want to use an IDE for compiling and run Robocode on the fly to quickly see the effect of your work. This is where [http://www.eclipse.org Eclipse IDE] comes into the picture for this guide, as many Java developers regards the Eclipse IDE as the best IDE for Java development. Eclipse comes free of charge, has a huge community, automatic compilation, a rich source code editor, a flexible window layout, and lots of plug-ins. Eclipse has been choosen as the primary IDE for building Robocode, and thus this guide only describes how to setup and build Robocode with this IDE.&lt;br /&gt;
If you want to use another IDE for developing Robocode you need to figure out how to set it up by yourself based on the details from this guide. And you are more than welcome to add a page beside this article that described how to setup everything for IDE of your choise and link to it from this article. :-)&lt;br /&gt;
&lt;br /&gt;
All sources of Robocode are available at [https://github.com/robo-code/robocode GitHub]. At GitHub, you can download sources as a zipped file or create your own [https://help.github.com/articles/fork-a-repo clone/fork], if you want to.&lt;br /&gt;
&lt;br /&gt;
Even though Maven is used as build tool, you don't need to pre-install it on your system. Batch (.bat) and shell (.sh) files are provided with the source files. These scripts will automatically download required libraries, scripts and tools required for building Robocode. Hence, no tools needs to be pre-installed in order to build Robocode beside the JDK and correct environment settings for JAVA_HOME and PATH.&lt;br /&gt;
&lt;br /&gt;
Notice that the shell scripts (.sh files) should work under Unix and *nix like OSes including Max OS X. However, the shell scripts have only been tested under Linux (on Ubuntu), so there is no guarantee that these will run without issues on other *nix systems.&lt;br /&gt;
&lt;br /&gt;
You don't have to worry too much about how to setup Eclipse for Robocode as the provided sources contains all configuration files needed by Eclipse. Some of these files are generated using Maven's build-in support for Eclipse. However, you will need to do some basic pre-configuration of Eclipse before you'll be able to get started with working on Robocode. You should only need to set up a workspace for Robocode once. However, you will need to update the sources from the remote repository on GitHub once in a while, and merge changes with your sources in order to keep up-to-date with the current versions of Robocode, i.e. the trunk/head of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
=== Checking out sources from GitHub ===&lt;br /&gt;
&lt;br /&gt;
In the following, I assume that you want to '''check out''' the sources from GitHub using some [http://git-scm.com/downloads Git client].  This could be one of the Git GUI Clients (git-gui) recommended [http://git-scm.com/downloads/guis here].&lt;br /&gt;
You don't necessarily need a Git client for building Robocode, as you could simply get the sources from a plain .zip file. However, if you want to update your local source files with the newest sources from the Git repository and the ability to commit and/or merge changes, you will need to use some Git client in order to get access to files beside the files inside (Eclipse) project directories, e.g. if you want to check out the scripts located in the root of the Git repository for Robocode.&lt;br /&gt;
&lt;br /&gt;
The URL of the sources at GitHub is:&lt;br /&gt;
[https://github.com/robo-code/robocode.git https://github.com/robo-code/robocode.git]&lt;br /&gt;
&lt;br /&gt;
==== How to build distribution files? ====&lt;br /&gt;
&lt;br /&gt;
In order to build the distribution files containing the installer setup file (robocode-x.x.x-setup.jar) and a .zip file containing all the sources (robocode-x.x.x-src.zip) you must call the '''mvnassembly''' script from the command-line when standing within the root directory of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvnassembly&lt;br /&gt;
&lt;br /&gt;
On *nix:&lt;br /&gt;
  ./mvnassembly.sh&lt;br /&gt;
&lt;br /&gt;
This will build the distribution files, which will be put into the sub-directory named ''robocode.distribution/target''.&lt;br /&gt;
&lt;br /&gt;
'''mvnassembly''' is a script that compiles all sources of the Robocode game, creates javadoc html files, run test units, and finally creates the target distribution files. The first time this script is run, it will need to download a huge amount of .jar files from various Maven repositories and which contains Maven plugins etc. used for building Robocode. So please be patient with it the first time.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Eclipse for developing on Robocode ===&lt;br /&gt;
&lt;br /&gt;
Here follows a description of how to setup Eclipse for developing on Robocode.&lt;br /&gt;
&lt;br /&gt;
==== Software Requirements for Eclipse IDE ====&lt;br /&gt;
&lt;br /&gt;
Here follows the recommended software needed to start developing on Robocode with the Eclipse IDE:&lt;br /&gt;
&lt;br /&gt;
'''Required:'''&lt;br /&gt;
* Oracle JDK 6 ([http://www.oracle.com/technetwork/java/javase/downloads/index.html download]) must be pre-installed.&lt;br /&gt;
* Eclipse IDE for Java Developers([http://www.eclipse.org/downloads/ download]). The Juno, Kepler, Luna works fine for Robocode and supports Git.&lt;br /&gt;
&lt;br /&gt;
Please consult the [http://wiki.eclipse.org/Eclipse/Installation#Install_a_JVM installation notes] provided for Eclipse in order to find out how to install Eclipse for your specific OS.&lt;br /&gt;
&lt;br /&gt;
==== Create a workspace for Robocode ====&lt;br /&gt;
&lt;br /&gt;
When you have setup and installed Eclipse on your system (if you did not have it on your system already), a workspace must be created for Robocode.&lt;br /&gt;
&lt;br /&gt;
The first time you start up a newly installed Eclipse, it will ask for a directory for your workspace. I suggest that you create a workspace named '''robocode-workspace''' or similar and create the workspace on a partition or directory like e.g. &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; (on Windows) or &amp;lt;code&amp;gt;~&amp;lt;/code&amp;gt; (on Linux) - or any other directory of your choice. If you have already got a workspace, e.g. the default one suggested by Eclipse, you can create a new workspace if you wish by selecting 'File' -&amp;gt; 'Switch Workspace' -&amp;gt; 'Other...' from the menu.&lt;br /&gt;
&lt;br /&gt;
==== M2_REPO class path variable ====&lt;br /&gt;
&lt;br /&gt;
One of the first things you need to do in Eclipse is to set up the '''M2_REPO''' class path variable for Eclipse, which points to your local Maven 2 repository. That is, Eclipse uses the M2_REPO class path variable for locating the Maven repository containing various libraries used for compiling Robocode etc. But before you can setup the M2_REPO class path in Eclipse, you must run the 'mvnassembly' command described earlier if you have not already done that.&lt;br /&gt;
&lt;br /&gt;
When calling the 'mvnassembly' script or alternatively start off Maven within the root of the robocode sources by calling e.g. 'mvn clean install', Maven will download all required libraries from other sites into your local Maven repository. Note that you will need to locate your local Maven repository. Under Windows your Maven repository is put into your %USERPROFILE% directory, and on Linux is put into your home directory (~). The Maven repository will be put under .m2/repository.&lt;br /&gt;
&lt;br /&gt;
To setup the M2_REPO class path in Eclipse, you must go to the menu bar and select 'Window' -&amp;gt; 'Preferences'. On the Preferences window expand the 'Java' -&amp;gt; 'Build Path' and select the 'Classpath Variables'. On the page for the Classpath Variables, you click on the 'New...' button, and enter M2_REPO as name. Next, you click on the 'Folder...' button and navigate to where you have your .m2/repository directory located (in %USERPROFILE% under Windows, and ~ under Linux), e.g. &amp;lt;code&amp;gt;C:/Users/Flemming/.m2/repository&amp;lt;/code&amp;gt; (Windows) or &amp;lt;code&amp;gt;/home/fnl/.m2/repository&amp;lt;/code&amp;gt; (Linux).&lt;br /&gt;
&lt;br /&gt;
When Eclipse asks you if it should rebuild the workspace, you select 'Yes'.&lt;br /&gt;
&lt;br /&gt;
==== Configure JDK for your workspace ====&lt;br /&gt;
&lt;br /&gt;
You must setup which JDK that will be used for compiling (and running) Robocode in your workspace.&lt;br /&gt;
You do this by...&lt;br /&gt;
# selecting Window -&amp;gt; Preferences from the menu, and then unfold and select Java -&amp;gt; Installed JREs and press 'Add...' on the 'Installed JREs' page.&lt;br /&gt;
# Select 'Standard VM' on the 'JRE Type' page and press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# Press the 'Directory...' button and browse to where you have installed your JDK 6 and press 'Finish' or Enter. Make sure to select a JDK and ''not'' a JRE, as a JRE is not sufficient as it lacks the tools available with the JDK.&lt;br /&gt;
# When you get back to the 'Installed JREs' page, make sure to put a check mark in the JDK you just added and press 'OK' or Enter.&lt;br /&gt;
&lt;br /&gt;
==== Importing sources of Robocode using Git ====&lt;br /&gt;
&lt;br /&gt;
Importing the projects for Robocode into Eclipse from Git can be done from the Package Explorer, which can be opened from the menu by selecting Window -&amp;gt; Show View -&amp;gt; Package Explorer or by using the keyboard shortcut by pressing Alt+Shift+Q and P. In the Package Explorer, you...&lt;br /&gt;
&lt;br /&gt;
# Right-click the mouse and select 'Import...' in the popup menu that occurs.&lt;br /&gt;
# Unfold 'Git' in the 'Import' window and double-click 'Projects from Git'.&lt;br /&gt;
# On the 'Import Projects from Git' you select 'URI'.&lt;br /&gt;
# On the next page named 'Source Git Repository' to enter '''https://github.com/robo-code/robocode.git''' into the 'URI:' text field and press Enter or 'Next &amp;gt;'.&lt;br /&gt;
# On the 'Branch Selection' page you press 'Deselect All' and select the branch you want to work on. This would normally be 'master', which is the master branch of Robocode. When the branch selection is made, you press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# On the 'Local Destination' page, you must note the directory where your local files will be put. I recommend you use the directory suggested by Git (Eclipse) and press 'Finish' or Enter.&lt;br /&gt;
# On the 'Select a wizard to use for importing projects', make sure 'Import existing projects' is selected and press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# On 'Import Projects', you should deselect the first project named 'plugins' as you would normally not want to develop on plugins for Robocode - otherwise just omit deselecting 'plugins'. Press 'Finish' or Enter.&lt;br /&gt;
# All Robocode projects will now be imported into Eclipse and be visible in the Package Explorer.&lt;br /&gt;
# Now, select all projects (press Ctrl+A) and right-click the Package Explorer and select Replace With -&amp;gt; HEAD Revision on the popup menu that occurs, and press 'OK' or Enter to discard local changes on the dialog that appears.&lt;br /&gt;
&lt;br /&gt;
Congratulations, you should now be able to get started working on the Robocode sources in Eclipse. :-)&lt;br /&gt;
&lt;br /&gt;
==== Launch Robocode ====&lt;br /&gt;
&lt;br /&gt;
Before launching Robocode for the first time, you should make sure that it is cleaned and compiled first. You do this by selecting Project -&amp;gt; Clean... from the menu. You should also make sure that you have run the 'mvnassembly' described previously, which will download and update your local Maven repository, which is necessary for compiling and running Robocode.&lt;br /&gt;
&lt;br /&gt;
Please notice that it might be necessary to refresh the sources in Eclipse when files are changed outside the Eclipse editor, which is the case when running the 'mvnassembly' script. You can do this from the Package Explorer by right-clicking in this and select 'Refresh'.&lt;br /&gt;
&lt;br /&gt;
In order to start running or debugging Robocode, you should select the &amp;quot;Bug&amp;quot; (debug) or &amp;quot;Play&amp;quot; (run) button in the top of Eclipse under the menu. You should press the little arrow beside these green buttons in order to choose among: Robocode, RoboRumble, TeamRumble, and MeleeRumble. The 3 last ones are for running the RoboRumble@Home clients.&lt;br /&gt;
&lt;br /&gt;
==== How to run the unit tests? ====&lt;br /&gt;
&lt;br /&gt;
When you want to run the unit test from within Eclipse, you must do this from the the Package Explorer, where you right-click on the 'robocode.tests' project and select 'Run As' -&amp;gt; 'JUnit Test'. Now all available unit tests will run automatically.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can start the tests from the command-line by standing on your robocode workspace, and write the following Maven command.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvn test install&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  ./mvn.sh test install&lt;br /&gt;
&lt;br /&gt;
=== Robocode developers and contributions ===&lt;br /&gt;
&lt;br /&gt;
Robocode developers have discussion group at robocode-developers@googlegroups.com. Everybody interested in discussion about future of Robocode are welcome. We also welcome your contributions there. The discussion group is located here: http://groups.google.com/group/robocode-developers.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Robocode/Old Developers Guide for building Robocode|Old version]] of the Developer's Guide for building Robocode for Robocode versions prior to version 1.7.&lt;br /&gt;
* [http://code.google.com/p/robocode/source/browse/ Browse the sources] of Robocode.&lt;br /&gt;
* [http://sourceforge.net/project/showfiles.php?group_id=37202&amp;amp;package_id=218677 Download the sources] of Robocode.&lt;br /&gt;
* [http://groups.google.com/group/robocode-developers Robocode developers discussion group].&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* The [http://sourceforge.net/projects/robocode Robocode project] on SourceForge.&lt;br /&gt;
* [http://sourceforge.net/svn/?group_id=37202 How to access] the SVN Repository for Robocode.&lt;br /&gt;
* [http://www.eclipse.org/ Eclipse] - an open development platform supported by Robocode.&lt;br /&gt;
* [http://maven.apache.org/ Apache Maven] used for building Robocode.&lt;br /&gt;
* [http://maven.apache.org/guides/mini/guide-ide-eclipse.html Guide] to using Eclipse with Maven 2.x.&lt;br /&gt;
* [http://www.eclipse.org/subversive/ Eclipse Subversive] is a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://subclipse.tigris.org/ Subclipse] is also a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://tortoisesvn.net TortoiseSVN], a Subversion client for Windows.&lt;br /&gt;
* [http://www.open.collab.net/downloads/subversion/ CollabNets Subversion], a Subversion client for both Windows and Linux.&lt;br /&gt;
&lt;br /&gt;
[[Category:Robocode Documentation]]&lt;br /&gt;
[[Category:Eclipse IDE]]&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Thread:Talk:RoboRumble/Upgrade_client_version/reply_(28)&amp;diff=55046</id>
		<title>Thread:Talk:RoboRumble/Upgrade client version/reply (28)</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Thread:Talk:RoboRumble/Upgrade_client_version/reply_(28)&amp;diff=55046"/>
		<updated>2018-10-19T17:59:53Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: Reply to Upgrade client version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I will definitely have to fix codesize as I have not touched it for many years. :O&lt;br /&gt;
&lt;br /&gt;
Also notice that it will be faster to write to me a mail at fnl (at) users.sourceforge.net in order to have me fix as many issues related to RoboRumble as possible (this has a high priority to me). Just tell me to look on this discussion, if all details are already provided. This way you'll not have to wait for me updating Robocode, Codesize, RoboRumble etc. :-)&lt;br /&gt;
And thank you for providing me with patches for RoboRumble. It is a great help to all of us.&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=55045</id>
		<title>Robocode/Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=55045"/>
		<updated>2018-10-19T17:42:15Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: /* Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide describes how to build the Robocode application, i.e. the game itself, and not how to build bots for Robocode.&lt;br /&gt;
&lt;br /&gt;
== Developer's Guide for building Robocode with Eclipse setup ==&lt;br /&gt;
&lt;br /&gt;
=== Notice ===&lt;br /&gt;
&lt;br /&gt;
This guide is intended for experienced Java developers, who want to work on the Robocode application, and describes all basic stuff required to compile and run Robocode within the [http://www.eclipse.org Eclipse] IDE.&lt;br /&gt;
&lt;br /&gt;
If you just need to browse the sources, you can do it from [https://github.com/robo-code/robocode here] or you can download the zipped sources from [http://sourceforge.net/projects/robocode/files/robocode%20sources/ here].&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Basically, all you need to get started with building Robocode is:&lt;br /&gt;
&lt;br /&gt;
* Oracle JDK 8 ([https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html Java SE Development Kit 8 Downloads]). Note that only version 6, 7, and 8 will work. Newer versions are not supported (yet) and are almost guaranteed to cause building problems.&lt;br /&gt;
* Source files for Robocode ([https://github.com/robo-code/robocode on GitHub]), which you get by doing a Git clone.&lt;br /&gt;
* An Internet connection.&lt;br /&gt;
&lt;br /&gt;
Other than that, you need to be a skilled Java developer in order to figure out how Robocode is put together. Robocode is a complex application and requires a big effort to grasp and understand. There is practically no documentation available that describe the internal logic, architecture, game rules, coding conventions etc. So you will probably be on your own when trying to figure out how Robocode it put together.&lt;br /&gt;
&lt;br /&gt;
An Internet connection is required for building Robocode distribution files as the build tool (Maven) needs access to [http://maven.apache.org/guides/introduction/introduction-to-repositories.html remote repositories], which contains various libraries and binaries. Some libraries are used for building Robocode, and others are used for running Robocode, and hence need to be put into the distribution files.&lt;br /&gt;
In order to get updates to the sources of Robocode when new versions emerge, an Internet connection is also critical to download changed sources and merge the changes with your version of the sources etc.&lt;br /&gt;
&lt;br /&gt;
Note that all sources of Robocode are for Java 6, meaning that Robocode is able to run on very old Java versions, which is intentional.&lt;br /&gt;
&lt;br /&gt;
==== Installing the JDK ====&lt;br /&gt;
&lt;br /&gt;
Robocode is being developed in Oracle's Java SE 6, and requires the Java Developer Kit ('''JDK''') version 6 to be pre-installed on the system used for building Robocode. Please note that a Java Runtime Environment ('''JRE''') is not enough as it does not contain the required developer tools needed for building Robocode.&lt;br /&gt;
&lt;br /&gt;
The JDK 6 is used for the building official releases for Robocode even when this old version 6 has entered it's End-of-Life (EOL). The reason being that Java SE 6 is the minimum requirement when end-users needs to run Robocode, and due to the fact that the current build system of Robocode is known to cause problems with building Robocode with newer JDK versions (e.g. version 7 and 8). If you are unhappy about that, you are welcome to update the build system (including the part required for building the .NET plug-in for Robocode). ;-)&lt;br /&gt;
&lt;br /&gt;
If you just want to play with the sources (without using the build scripts for Robocode), you could use a newer JDK 7+ if you want to, e.g. building Robocode inside the Eclipse IDE. But be aware that you might not be able to run your version of Robocode on older Java versions, if you builld your own version of Robocode. Another problem is that the .NET plug-in for Robocode needs to make use of the build scripts for Robocode and also requires additional Windows-specific tools to be installed on your system.&lt;br /&gt;
&lt;br /&gt;
Notice that when installing the JDK, it is highly recommended that you '''install the sources provided for Java''' as the sources are very useful when debugging Robocode. However, this is not a requirement.&lt;br /&gt;
&lt;br /&gt;
==== Setting up Java Environment Variables ====&lt;br /&gt;
&lt;br /&gt;
You must set up the environment variable named '''JAVA_HOME''' and extend another environment variable named '''PATH'''.&lt;br /&gt;
&lt;br /&gt;
'''JAVA_HOME must be set up point to the root directory of the JDK you intend to use.'''&lt;br /&gt;
&lt;br /&gt;
The PATH environment variable must be extended in order to locate the Java commands like 'java', 'javac' and lots of other tools in the JDK. Extending PATH is considered best practice when setting up the Java development environment, and makes it possible for other tools like e.g. Maven to locate the proper JDK tools. It also makes it possible for you to detirmine which JRE that is being used when running a Java application by writting &amp;lt;code&amp;gt;java -version&amp;lt;/code&amp;gt; in the command-line/shell, and detirmine which Java compiler that is being used by writting &amp;lt;code&amp;gt;javac -version&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
&lt;br /&gt;
'''Windows:'''&lt;br /&gt;
* JAVA_HOME is set to e.g. &amp;lt;code&amp;gt;JAVA_HOME=&amp;quot;C:\Program Files\Java\jdk1.6.0_45&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* PATH is extended, e.g. to &amp;lt;code&amp;gt;PATH=%JAVA_HOME%\bin;PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Linux / *nix:'''&lt;br /&gt;
* JAVA_HOME is set by e.g. &amp;lt;code&amp;gt;export JAVA_HOME=/usr/java/jdk1.6.0_45/bin/java&amp;lt;/code&amp;gt;. (Bash)&lt;br /&gt;
* PATH is extended, e.g. by &amp;lt;code&amp;gt;export PATH=$JAVA_HOME/bin:$PATH&amp;lt;/code&amp;gt;. (Bash)&lt;br /&gt;
&lt;br /&gt;
'''Mac OS X:'''&lt;br /&gt;
* JAVA_HOME is set by e.g. &amp;lt;code&amp;gt;export JAVA_HOME=$(/usr/libexec/java_home)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* PATH is extended, e.g. by &amp;lt;code&amp;gt;export PATH=${JAVA_HOME}/bin:$PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you want more information of how to set up your JAVA_HOME and PATH environment variables for your specific OS, please read the installation notes provided for the Oracle JDK here:&lt;br /&gt;
&lt;br /&gt;
'''Installation Notes from Oracle:'''&lt;br /&gt;
* [http://www.oracle.com/technetwork/java/javase/index-137561.html Installation Notes] for Windows, Linux, Solaris, and Mac.&lt;br /&gt;
* [http://www.oracle.com/technetwork/java/javase/system-configurations-135212.html Certified System Configurations for Java] for ''all'' supported systems.&lt;br /&gt;
&lt;br /&gt;
==== Required technical skills? ====&lt;br /&gt;
&lt;br /&gt;
In order to develop on Robocode, you need to know the basics of these tools:&lt;br /&gt;
&lt;br /&gt;
* Eclipse IDE ([http://www.vogella.com/articles/Eclipse/article.html Tutorial])&lt;br /&gt;
* Git and GitHub ([http://www.vogella.com/articles/Git/article.html Tutorial])&lt;br /&gt;
* Maven ([http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html Tutorial])&lt;br /&gt;
&lt;br /&gt;
Notice that you do not have to be an expert in Eclipse, Git/GitHub, and Maven. But you need some basic knowledge about these tools to understand how to build Robocode. In fact, trying to build Robocode might actually be a very good way of learning these tools, if you don't know them already or miss some practical experience with these. :-)&lt;br /&gt;
&lt;br /&gt;
When you need to start editing the sources of Robocode, you naturally might want to use an IDE for compiling and run Robocode on the fly to quickly see the effect of your work. This is where [http://www.eclipse.org Eclipse IDE] comes into the picture for this guide, as many Java developers regards the Eclipse IDE as the best IDE for Java development. Eclipse comes free of charge, has a huge community, automatic compilation, a rich source code editor, a flexible window layout, and lots of plug-ins. Eclipse has been choosen as the primary IDE for building Robocode, and thus this guide only describes how to setup and build Robocode with this IDE.&lt;br /&gt;
If you want to use another IDE for developing Robocode you need to figure out how to set it up by yourself based on the details from this guide. And you are more than welcome to add a page beside this article that described how to setup everything for IDE of your choise and link to it from this article. :-)&lt;br /&gt;
&lt;br /&gt;
All sources of Robocode are available at [https://github.com/robo-code/robocode GitHub]. At GitHub, you can download sources as a zipped file or create your own [https://help.github.com/articles/fork-a-repo clone/fork], if you want to.&lt;br /&gt;
&lt;br /&gt;
Even though Maven is used as build tool, you don't need to pre-install it on your system. Batch (.bat) and shell (.sh) files are provided with the source files. These scripts will automatically download required libraries, scripts and tools required for building Robocode. Hence, no tools needs to be pre-installed in order to build Robocode beside the JDK and correct environment settings for JAVA_HOME and PATH.&lt;br /&gt;
&lt;br /&gt;
Notice that the shell scripts (.sh files) should work under Unix and *nix like OSes including Max OS X. However, the shell scripts have only been tested under Linux (on Ubuntu), so there is no guarantee that these will run without issues on other *nix systems.&lt;br /&gt;
&lt;br /&gt;
You don't have to worry too much about how to setup Eclipse for Robocode as the provided sources contains all configuration files needed by Eclipse. Some of these files are generated using Maven's build-in support for Eclipse. However, you will need to do some basic pre-configuration of Eclipse before you'll be able to get started with working on Robocode. You should only need to set up a workspace for Robocode once. However, you will need to update the sources from the remote repository on GitHub once in a while, and merge changes with your sources in order to keep up-to-date with the current versions of Robocode, i.e. the trunk/head of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
=== Checking out sources from GitHub ===&lt;br /&gt;
&lt;br /&gt;
In the following, I assume that you want to '''check out''' the sources from GitHub using some [http://git-scm.com/downloads Git client].  This could be one of the Git GUI Clients (git-gui) recommended [http://git-scm.com/downloads/guis here].&lt;br /&gt;
You don't necessarily need a Git client for building Robocode, as you could simply get the sources from a plain .zip file. However, if you want to update your local source files with the newest sources from the Git repository and the ability to commit and/or merge changes, you will need to use some Git client in order to get access to files beside the files inside (Eclipse) project directories, e.g. if you want to check out the scripts located in the root of the Git repository for Robocode.&lt;br /&gt;
&lt;br /&gt;
The URL of the sources at GitHub is:&lt;br /&gt;
[https://github.com/robo-code/robocode.git https://github.com/robo-code/robocode.git]&lt;br /&gt;
&lt;br /&gt;
==== How to build distribution files? ====&lt;br /&gt;
&lt;br /&gt;
In order to build the distribution files containing the installer setup file (robocode-x.x.x-setup.jar) and a .zip file containing all the sources (robocode-x.x.x-src.zip) you must call the '''mvnassembly''' script from the command-line when standing within the root directory of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvnassembly&lt;br /&gt;
&lt;br /&gt;
On *nix:&lt;br /&gt;
  ./mvnassembly.sh&lt;br /&gt;
&lt;br /&gt;
This will build the distribution files, which will be put into the sub-directory named ''robocode.distribution/target''.&lt;br /&gt;
&lt;br /&gt;
'''mvnassembly''' is a script that compiles all sources of the Robocode game, creates javadoc html files, run test units, and finally creates the target distribution files. The first time this script is run, it will need to download a huge amount of .jar files from various Maven repositories and which contains Maven plugins etc. used for building Robocode. So please be patient with it the first time.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Eclipse for developing on Robocode ===&lt;br /&gt;
&lt;br /&gt;
Here follows a description of how to setup Eclipse for developing on Robocode.&lt;br /&gt;
&lt;br /&gt;
==== Software Requirements for Eclipse IDE ====&lt;br /&gt;
&lt;br /&gt;
Here follows the recommended software needed to start developing on Robocode with the Eclipse IDE:&lt;br /&gt;
&lt;br /&gt;
'''Required:'''&lt;br /&gt;
* Oracle JDK 6 ([http://www.oracle.com/technetwork/java/javase/downloads/index.html download]) must be pre-installed.&lt;br /&gt;
* Eclipse IDE for Java Developers([http://www.eclipse.org/downloads/ download]). The Juno, Kepler, Luna works fine for Robocode and supports Git.&lt;br /&gt;
&lt;br /&gt;
Please consult the [http://wiki.eclipse.org/Eclipse/Installation#Install_a_JVM installation notes] provided for Eclipse in order to find out how to install Eclipse for your specific OS.&lt;br /&gt;
&lt;br /&gt;
==== Create a workspace for Robocode ====&lt;br /&gt;
&lt;br /&gt;
When you have setup and installed Eclipse on your system (if you did not have it on your system already), a workspace must be created for Robocode.&lt;br /&gt;
&lt;br /&gt;
The first time you start up a newly installed Eclipse, it will ask for a directory for your workspace. I suggest that you create a workspace named '''robocode-workspace''' or similar and create the workspace on a partition or directory like e.g. &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; (on Windows) or &amp;lt;code&amp;gt;~&amp;lt;/code&amp;gt; (on Linux) - or any other directory of your choice. If you have already got a workspace, e.g. the default one suggested by Eclipse, you can create a new workspace if you wish by selecting 'File' -&amp;gt; 'Switch Workspace' -&amp;gt; 'Other...' from the menu.&lt;br /&gt;
&lt;br /&gt;
==== M2_REPO class path variable ====&lt;br /&gt;
&lt;br /&gt;
One of the first things you need to do in Eclipse is to set up the '''M2_REPO''' class path variable for Eclipse, which points to your local Maven 2 repository. That is, Eclipse uses the M2_REPO class path variable for locating the Maven repository containing various libraries used for compiling Robocode etc. But before you can setup the M2_REPO class path in Eclipse, you must run the 'mvnassembly' command described earlier if you have not already done that.&lt;br /&gt;
&lt;br /&gt;
When calling the 'mvnassembly' script or alternatively start off Maven within the root of the robocode sources by calling e.g. 'mvn clean install', Maven will download all required libraries from other sites into your local Maven repository. Note that you will need to locate your local Maven repository. Under Windows your Maven repository is put into your %USERPROFILE% directory, and on Linux is put into your home directory (~). The Maven repository will be put under .m2/repository.&lt;br /&gt;
&lt;br /&gt;
To setup the M2_REPO class path in Eclipse, you must go to the menu bar and select 'Window' -&amp;gt; 'Preferences'. On the Preferences window expand the 'Java' -&amp;gt; 'Build Path' and select the 'Classpath Variables'. On the page for the Classpath Variables, you click on the 'New...' button, and enter M2_REPO as name. Next, you click on the 'Folder...' button and navigate to where you have your .m2/repository directory located (in %USERPROFILE% under Windows, and ~ under Linux), e.g. &amp;lt;code&amp;gt;C:/Users/Flemming/.m2/repository&amp;lt;/code&amp;gt; (Windows) or &amp;lt;code&amp;gt;/home/fnl/.m2/repository&amp;lt;/code&amp;gt; (Linux).&lt;br /&gt;
&lt;br /&gt;
When Eclipse asks you if it should rebuild the workspace, you select 'Yes'.&lt;br /&gt;
&lt;br /&gt;
==== Configure JDK for your workspace ====&lt;br /&gt;
&lt;br /&gt;
You must setup which JDK that will be used for compiling (and running) Robocode in your workspace.&lt;br /&gt;
You do this by...&lt;br /&gt;
# selecting Window -&amp;gt; Preferences from the menu, and then unfold and select Java -&amp;gt; Installed JREs and press 'Add...' on the 'Installed JREs' page.&lt;br /&gt;
# Select 'Standard VM' on the 'JRE Type' page and press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# Press the 'Directory...' button and browse to where you have installed your JDK 6 and press 'Finish' or Enter. Make sure to select a JDK and ''not'' a JRE, as a JRE is not sufficient as it lacks the tools available with the JDK.&lt;br /&gt;
# When you get back to the 'Installed JREs' page, make sure to put a check mark in the JDK you just added and press 'OK' or Enter.&lt;br /&gt;
&lt;br /&gt;
==== Importing sources of Robocode using Git ====&lt;br /&gt;
&lt;br /&gt;
Importing the projects for Robocode into Eclipse from Git can be done from the Package Explorer, which can be opened from the menu by selecting Window -&amp;gt; Show View -&amp;gt; Package Explorer or by using the keyboard shortcut by pressing Alt+Shift+Q and P. In the Package Explorer, you...&lt;br /&gt;
&lt;br /&gt;
# Right-click the mouse and select 'Import...' in the popup menu that occurs.&lt;br /&gt;
# Unfold 'Git' in the 'Import' window and double-click 'Projects from Git'.&lt;br /&gt;
# On the 'Import Projects from Git' you select 'URI'.&lt;br /&gt;
# On the next page named 'Source Git Repository' to enter '''https://github.com/robo-code/robocode.git''' into the 'URI:' text field and press Enter or 'Next &amp;gt;'.&lt;br /&gt;
# On the 'Branch Selection' page you press 'Deselect All' and select the branch you want to work on. This would normally be 'master', which is the master branch of Robocode. When the branch selection is made, you press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# On the 'Local Destination' page, you must note the directory where your local files will be put. I recommend you use the directory suggested by Git (Eclipse) and press 'Finish' or Enter.&lt;br /&gt;
# On the 'Select a wizard to use for importing projects', make sure 'Import existing projects' is selected and press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# On 'Import Projects', you should deselect the first project named 'plugins' as you would normally not want to develop on plugins for Robocode - otherwise just omit deselecting 'plugins'. Press 'Finish' or Enter.&lt;br /&gt;
# All Robocode projects will now be imported into Eclipse and be visible in the Package Explorer.&lt;br /&gt;
# Now, select all projects (press Ctrl+A) and right-click the Package Explorer and select Replace With -&amp;gt; HEAD Revision on the popup menu that occurs, and press 'OK' or Enter to discard local changes on the dialog that appears.&lt;br /&gt;
&lt;br /&gt;
Congratulations, you should now be able to get started working on the Robocode sources in Eclipse. :-)&lt;br /&gt;
&lt;br /&gt;
==== Launch Robocode ====&lt;br /&gt;
&lt;br /&gt;
Before launching Robocode for the first time, you should make sure that it is cleaned and compiled first. You do this by selecting Project -&amp;gt; Clean... from the menu. You should also make sure that you have run the 'mvnassembly' described previously, which will download and update your local Maven repository, which is necessary for compiling and running Robocode.&lt;br /&gt;
&lt;br /&gt;
Please notice that it might be necessary to refresh the sources in Eclipse when files are changed outside the Eclipse editor, which is the case when running the 'mvnassembly' script. You can do this from the Package Explorer by right-clicking in this and select 'Refresh'.&lt;br /&gt;
&lt;br /&gt;
In order to start running or debugging Robocode, you should select the &amp;quot;Bug&amp;quot; (debug) or &amp;quot;Play&amp;quot; (run) button in the top of Eclipse under the menu. You should press the little arrow beside these green buttons in order to choose among: Robocode, RoboRumble, TeamRumble, and MeleeRumble. The 3 last ones are for running the RoboRumble@Home clients.&lt;br /&gt;
&lt;br /&gt;
==== How to run the unit tests? ====&lt;br /&gt;
&lt;br /&gt;
When you want to run the unit test from within Eclipse, you must do this from the the Package Explorer, where you right-click on the 'robocode.tests' project and select 'Run As' -&amp;gt; 'JUnit Test'. Now all available unit tests will run automatically.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can start the tests from the command-line by standing on your robocode workspace, and write the following Maven command.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvn test install&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  ./mvn.sh test install&lt;br /&gt;
&lt;br /&gt;
=== Robocode developers and contributions ===&lt;br /&gt;
&lt;br /&gt;
Robocode developers have discussion group at robocode-developers@googlegroups.com. Everybody interested in discussion about future of Robocode are welcome. We also welcome your contributions there. The discussion group is located here: http://groups.google.com/group/robocode-developers.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Robocode/Old Developers Guide for building Robocode|Old version]] of the Developer's Guide for building Robocode for Robocode versions prior to version 1.7.&lt;br /&gt;
* [http://code.google.com/p/robocode/source/browse/ Browse the sources] of Robocode.&lt;br /&gt;
* [http://sourceforge.net/project/showfiles.php?group_id=37202&amp;amp;package_id=218677 Download the sources] of Robocode.&lt;br /&gt;
* [http://groups.google.com/group/robocode-developers Robocode developers discussion group].&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* The [http://sourceforge.net/projects/robocode Robocode project] on SourceForge.&lt;br /&gt;
* [http://sourceforge.net/svn/?group_id=37202 How to access] the SVN Repository for Robocode.&lt;br /&gt;
* [http://www.eclipse.org/ Eclipse] - an open development platform supported by Robocode.&lt;br /&gt;
* [http://maven.apache.org/ Apache Maven] used for building Robocode.&lt;br /&gt;
* [http://maven.apache.org/guides/mini/guide-ide-eclipse.html Guide] to using Eclipse with Maven 2.x.&lt;br /&gt;
* [http://www.eclipse.org/subversive/ Eclipse Subversive] is a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://subclipse.tigris.org/ Subclipse] is also a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://tortoisesvn.net TortoiseSVN], a Subversion client for Windows.&lt;br /&gt;
* [http://www.open.collab.net/downloads/subversion/ CollabNets Subversion], a Subversion client for both Windows and Linux.&lt;br /&gt;
&lt;br /&gt;
[[Category:Robocode Documentation]]&lt;br /&gt;
[[Category:Eclipse IDE]]&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=34122</id>
		<title>Robocode/Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=34122"/>
		<updated>2015-05-30T20:54:44Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: Major update from JDK 5 til JDK 6 and removal of EGit stuff&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide describes how to build the Robocode application, i.e. the game itself, and not how to build bots for Robocode.&lt;br /&gt;
&lt;br /&gt;
== Developer's Guide for building Robocode with Eclipse setup ==&lt;br /&gt;
&lt;br /&gt;
=== Notice ===&lt;br /&gt;
&lt;br /&gt;
This guide is intended for experienced Java developers, who want to work on the Robocode application, and describes all basic stuff required to compile and run Robocode within the [http://www.eclipse.org Eclipse] IDE.&lt;br /&gt;
&lt;br /&gt;
If you just need to browse the sources, you can do it from [https://github.com/robo-code/robocode here] or you can download the zipped sources from [http://sourceforge.net/projects/robocode/files/robocode%20sources/ here].&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Basically, all you need to get started with building Robocode is:&lt;br /&gt;
&lt;br /&gt;
* Oracle JDK 6 ([http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase6-419409.html#jdk-6u45-oth-JPR old archive]). Note that only version 6 will work. Newer versions are not supported (yet)&lt;br /&gt;
* Source files for Robocode ([https://github.com/robo-code/robocode on GitHub])&lt;br /&gt;
* An Internet connection.&lt;br /&gt;
&lt;br /&gt;
Other than that, you need to be a skilled Java developer in order to figure out how Robocode is put together. Robocode is a complex application and requires a big effort to grasp and understand. There is practically no documentation available that describe the internal logic, architecture, game rules, coding conventions etc. So you will probably be on your own when trying to figure out how Robocode it put together.&lt;br /&gt;
&lt;br /&gt;
An Internet connection is required for building Robocode distribution files as the build tool (Maven) needs access to [http://maven.apache.org/guides/introduction/introduction-to-repositories.html remote repositories], which contains various libraries and binaries. Some libraries are used for building Robocode, and others are used for running Robocode, and hence need to be put into the distribution files.&lt;br /&gt;
In order to get updates to the sources of Robocode when new versions emerge, an Internet connection is also critical to download changed sources and merge the changes with your version of the sources etc.&lt;br /&gt;
&lt;br /&gt;
==== Installing the JDK ====&lt;br /&gt;
&lt;br /&gt;
Robocode is being developed in Oracle's Java SE 6, and requires the Java Developer Kit ('''JDK''') version 6 to be pre-installed on the system used for building Robocode. Please note that a Java Runtime Environment ('''JRE''') is not enough as it does not contain the required developer tools needed for building Robocode.&lt;br /&gt;
&lt;br /&gt;
The JDK 6 is used for the building official releases for Robocode even when this old version 6 has entered it's End-of-Life (EOL). The reason being that Java SE 6 is the minimum requirement when end-users needs to run Robocode, and due to the fact that the current build system of Robocode is known to cause problems with building Robocode with newer JDK versions (e.g. version 7 and 8). If you are unhappy about that, you are welcome to update the build system (including the part required for building the .NET plug-in for Robocode). ;-)&lt;br /&gt;
&lt;br /&gt;
If you just want to play with the sources (without using the build scripts for Robocode), you could use a newer JDK 7+ if you want to, e.g. building Robocode inside the Eclipse IDE. But be aware that you might not be able to run your version of Robocode on older Java versions, if you builld your own version of Robocode. Another problem is that the .NET plug-in for Robocode needs to make use of the build scripts for Robocode and also requires additional Windows-specific tools to be installed on your system.&lt;br /&gt;
&lt;br /&gt;
Notice that when installing the JDK, it is highly recommended that you '''install the sources provided for Java''' as the sources are very useful when debugging Robocode. However, this is not a requirement.&lt;br /&gt;
&lt;br /&gt;
==== Setting up Java Environment Variables ====&lt;br /&gt;
&lt;br /&gt;
You must set up the environment variable named '''JAVA_HOME''' and extend another environment variable named '''PATH'''.&lt;br /&gt;
&lt;br /&gt;
'''JAVA_HOME must be set up point to the root directory of the JDK you intend to use.'''&lt;br /&gt;
&lt;br /&gt;
The PATH environment variable must be extended in order to locate the Java commands like 'java', 'javac' and lots of other tools in the JDK. Extending PATH is considered best practice when setting up the Java development environment, and makes it possible for other tools like e.g. Maven to locate the proper JDK tools. It also makes it possible for you to detirmine which JRE that is being used when running a Java application by writting &amp;lt;code&amp;gt;java -version&amp;lt;/code&amp;gt; in the command-line/shell, and detirmine which Java compiler that is being used by writting &amp;lt;code&amp;gt;javac -version&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
&lt;br /&gt;
'''Windows:'''&lt;br /&gt;
* JAVA_HOME is set to e.g. &amp;lt;code&amp;gt;JAVA_HOME=&amp;quot;C:\Program Files\Java\jdk1.6.0_45&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* PATH is extended, e.g. to &amp;lt;code&amp;gt;PATH=%JAVA_HOME%\bin;PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Linux / *nix:'''&lt;br /&gt;
* JAVA_HOME is set by e.g. &amp;lt;code&amp;gt;export JAVA_HOME=/usr/java/jdk1.6.0_45/bin/java&amp;lt;/code&amp;gt;. (Bash)&lt;br /&gt;
* PATH is extended, e.g. by &amp;lt;code&amp;gt;export PATH=$JAVA_HOME/bin:$PATH&amp;lt;/code&amp;gt;. (Bash)&lt;br /&gt;
&lt;br /&gt;
'''Mac OS X:'''&lt;br /&gt;
* JAVA_HOME is set by e.g. &amp;lt;code&amp;gt;export JAVA_HOME=$(/usr/libexec/java_home)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* PATH is extended, e.g. by &amp;lt;code&amp;gt;export PATH=${JAVA_HOME}/bin:$PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you want more information of how to set up your JAVA_HOME and PATH environment variables for your specific OS, please read the installation notes provided for the Oracle JDK here:&lt;br /&gt;
&lt;br /&gt;
'''Installation Notes from Oracle:'''&lt;br /&gt;
* [http://www.oracle.com/technetwork/java/javase/index-137561.html Installation Notes] for Windows, Linux, Solaris, and Mac.&lt;br /&gt;
* [http://www.oracle.com/technetwork/java/javase/system-configurations-135212.html Certified System Configurations for Java] for ''all'' supported systems.&lt;br /&gt;
&lt;br /&gt;
==== Required technical skills? ====&lt;br /&gt;
&lt;br /&gt;
In order to develop on Robocode, you need to know the basics of these tools:&lt;br /&gt;
&lt;br /&gt;
* Eclipse IDE ([http://www.vogella.com/articles/Eclipse/article.html Tutorial])&lt;br /&gt;
* Git and GitHub ([http://www.vogella.com/articles/Git/article.html Tutorial])&lt;br /&gt;
* Maven ([http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html Tutorial])&lt;br /&gt;
&lt;br /&gt;
Notice that you do not have to be an expert in Eclipse, Git/GitHub, and Maven. But you need some basic knowledge about these tools to understand how to build Robocode. In fact, trying to build Robocode might actually be a very good way of learning these tools, if you don't know them already or miss some practical experience with these. :-)&lt;br /&gt;
&lt;br /&gt;
When you need to start editing the sources of Robocode, you naturally might want to use an IDE for compiling and run Robocode on the fly to quickly see the effect of your work. This is where [http://www.eclipse.org Eclipse IDE] comes into the picture for this guide, as many Java developers regards the Eclipse IDE as the best IDE for Java development. Eclipse comes free of charge, has a huge community, automatic compilation, a rich source code editor, a flexible window layout, and lots of plug-ins. Eclipse has been choosen as the primary IDE for building Robocode, and thus this guide only describes how to setup and build Robocode with this IDE.&lt;br /&gt;
If you want to use another IDE for developing Robocode you need to figure out how to set it up by yourself based on the details from this guide. And you are more than welcome to add a page beside this article that described how to setup everything for IDE of your choise and link to it from this article. :-)&lt;br /&gt;
&lt;br /&gt;
All sources of Robocode are available at [https://github.com/robo-code/robocode GitHub]. At GitHub, you can download sources as a zipped file or create your own [https://help.github.com/articles/fork-a-repo clone/fork], if you want to.&lt;br /&gt;
&lt;br /&gt;
Even though Maven is used as build tool, you don't need to pre-install it on your system. Batch (.bat) and shell (.sh) files are provided with the source files. These scripts will automatically download required libraries, scripts and tools required for building Robocode. Hence, no tools needs to be pre-installed in order to build Robocode beside the JDK and correct environment settings for JAVA_HOME and PATH.&lt;br /&gt;
&lt;br /&gt;
Notice that the shell scripts (.sh files) should work under Unix and *nix like OSes including Max OS X. However, the shell scripts have only been tested under Linux (on Ubuntu), so there is no guarantee that these will run without issues on other *nix systems.&lt;br /&gt;
&lt;br /&gt;
You don't have to worry too much about how to setup Eclipse for Robocode as the provided sources contains all configuration files needed by Eclipse. Some of these files are generated using Maven's build-in support for Eclipse. However, you will need to do some basic pre-configuration of Eclipse before you'll be able to get started with working on Robocode. You should only need to set up a workspace for Robocode once. However, you will need to update the sources from the remote repository on GitHub once in a while, and merge changes with your sources in order to keep up-to-date with the current versions of Robocode, i.e. the trunk/head of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
=== Checking out sources from GitHub ===&lt;br /&gt;
&lt;br /&gt;
In the following, I assume that you want to '''check out''' the sources from GitHub using some [http://git-scm.com/downloads Git client].  This could be one of the Git GUI Clients (git-gui) recommended [http://git-scm.com/downloads/guis here].&lt;br /&gt;
You don't necessarily need a Git client for building Robocode, as you could simply get the sources from a plain .zip file. However, if you want to update your local source files with the newest sources from the Git repository and the ability to commit and/or merge changes, you will need to use some Git client in order to get access to files beside the files inside (Eclipse) project directories, e.g. if you want to check out the scripts located in the root of the Git repository for Robocode.&lt;br /&gt;
&lt;br /&gt;
The URL of the sources at GitHub is:&lt;br /&gt;
[https://github.com/robo-code/robocode.git https://github.com/robo-code/robocode.git]&lt;br /&gt;
&lt;br /&gt;
==== How to build distribution files? ====&lt;br /&gt;
&lt;br /&gt;
In order to build the distribution files containing the installer setup file (robocode-x.x.x-setup.jar) and a .zip file containing all the sources (robocode-x.x.x-src.zip) you must call the '''mvnassembly''' script from the command-line when standing within the root directory of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvnassembly&lt;br /&gt;
&lt;br /&gt;
On *nix:&lt;br /&gt;
  ./mvnassembly.sh&lt;br /&gt;
&lt;br /&gt;
This will build the distribution files, which will be put into the sub-directory named ''robocode.distribution/target''.&lt;br /&gt;
&lt;br /&gt;
'''mvnassembly''' is a script that compiles all sources of the Robocode game, creates javadoc html files, run test units, and finally creates the target distribution files. The first time this script is run, it will need to download a huge amount of .jar files from various Maven repositories and which contains Maven plugins etc. used for building Robocode. So please be patient with it the first time.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Eclipse for developing on Robocode ===&lt;br /&gt;
&lt;br /&gt;
Here follows a description of how to setup Eclipse for developing on Robocode.&lt;br /&gt;
&lt;br /&gt;
==== Software Requirements for Eclipse IDE ====&lt;br /&gt;
&lt;br /&gt;
Here follows the recommended software needed to start developing on Robocode with the Eclipse IDE:&lt;br /&gt;
&lt;br /&gt;
'''Required:'''&lt;br /&gt;
* Oracle JDK 6 ([http://www.oracle.com/technetwork/java/javase/downloads/index.html download]) must be pre-installed.&lt;br /&gt;
* Eclipse IDE for Java Developers([http://www.eclipse.org/downloads/ download]). The Juno, Kepler, Luna works fine for Robocode and supports Git.&lt;br /&gt;
&lt;br /&gt;
Please consult the [http://wiki.eclipse.org/Eclipse/Installation#Install_a_JVM installation notes] provided for Eclipse in order to find out how to install Eclipse for your specific OS.&lt;br /&gt;
&lt;br /&gt;
==== Create a workspace for Robocode ====&lt;br /&gt;
&lt;br /&gt;
When you have setup and installed Eclipse on your system (if you did not have it on your system already), a workspace must be created for Robocode.&lt;br /&gt;
&lt;br /&gt;
The first time you start up a newly installed Eclipse, it will ask for a directory for your workspace. I suggest that you create a workspace named '''robocode-workspace''' or similar and create the workspace on a partition or directory like e.g. &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; (on Windows) or &amp;lt;code&amp;gt;~&amp;lt;/code&amp;gt; (on Linux) - or any other directory of your choice. If you have already got a workspace, e.g. the default one suggested by Eclipse, you can create a new workspace if you wish by selecting 'File' -&amp;gt; 'Switch Workspace' -&amp;gt; 'Other...' from the menu.&lt;br /&gt;
&lt;br /&gt;
==== M2_REPO class path variable ====&lt;br /&gt;
&lt;br /&gt;
One of the first things you need to do in Eclipse is to set up the '''M2_REPO''' class path variable for Eclipse, which points to your local Maven 2 repository. That is, Eclipse uses the M2_REPO class path variable for locating the Maven repository containing various libraries used for compiling Robocode etc. But before you can setup the M2_REPO class path in Eclipse, you must run the 'mvnassembly' command described earlier if you have not already done that.&lt;br /&gt;
&lt;br /&gt;
When calling the 'mvnassembly' script or alternatively start off Maven within the root of the robocode sources by calling e.g. 'mvn clean install', Maven will download all required libraries from other sites into your local Maven repository. Note that you will need to locate your local Maven repository. Under Windows your Maven repository is put into your %USERPROFILE% directory, and on Linux is put into your home directory (~). The Maven repository will be put under .m2/repository.&lt;br /&gt;
&lt;br /&gt;
To setup the M2_REPO class path in Eclipse, you must go to the menu bar and select 'Window' -&amp;gt; 'Preferences'. On the Preferences window expand the 'Java' -&amp;gt; 'Build Path' and select the 'Classpath Variables'. On the page for the Classpath Variables, you click on the 'New...' button, and enter M2_REPO as name. Next, you click on the 'Folder...' button and navigate to where you have your .m2/repository directory located (in %USERPROFILE% under Windows, and ~ under Linux), e.g. &amp;lt;code&amp;gt;C:/Users/Flemming/.m2/repository&amp;lt;/code&amp;gt; (Windows) or &amp;lt;code&amp;gt;/home/fnl/.m2/repository&amp;lt;/code&amp;gt; (Linux).&lt;br /&gt;
&lt;br /&gt;
When Eclipse asks you if it should rebuild the workspace, you select 'Yes'.&lt;br /&gt;
&lt;br /&gt;
==== Configure JDK for your workspace ====&lt;br /&gt;
&lt;br /&gt;
You must setup which JDK that will be used for compiling (and running) Robocode in your workspace.&lt;br /&gt;
You do this by...&lt;br /&gt;
# selecting Window -&amp;gt; Preferences from the menu, and then unfold and select Java -&amp;gt; Installed JREs and press 'Add...' on the 'Installed JREs' page.&lt;br /&gt;
# Select 'Standard VM' on the 'JRE Type' page and press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# Press the 'Directory...' button and browse to where you have installed your JDK 6 and press 'Finish' or Enter. Make sure to select a JDK and ''not'' a JRE, as a JRE is not sufficient as it lacks the tools available with the JDK.&lt;br /&gt;
# When you get back to the 'Installed JREs' page, make sure to put a check mark in the JDK you just added and press 'OK' or Enter.&lt;br /&gt;
&lt;br /&gt;
==== Importing sources of Robocode using Git ====&lt;br /&gt;
&lt;br /&gt;
Importing the projects for Robocode into Eclipse from Git can be done from the Package Explorer, which can be opened from the menu by selecting Window -&amp;gt; Show View -&amp;gt; Package Explorer or by using the keyboard shortcut by pressing Alt+Shift+Q and P. In the Package Explorer, you...&lt;br /&gt;
&lt;br /&gt;
# Right-click the mouse and select 'Import...' in the popup menu that occurs.&lt;br /&gt;
# Unfold 'Git' in the 'Import' window and double-click 'Projects from Git'.&lt;br /&gt;
# On the 'Import Projects from Git' you select 'URI'.&lt;br /&gt;
# On the next page named 'Source Git Repository' to enter '''https://github.com/robo-code/robocode.git''' into the 'URI:' text field and press Enter or 'Next &amp;gt;'.&lt;br /&gt;
# On the 'Branch Selection' page you press 'Deselect All' and select the branch you want to work on. This would normally be 'master', which is the master branch of Robocode. When the branch selection is made, you press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# On the 'Local Destination' page, you must note the directory where your local files will be put. I recommend you use the directory suggested by Git (Eclipse) and press 'Finish' or Enter.&lt;br /&gt;
# On the 'Select a wizard to use for importing projects', make sure 'Import existing projects' is selected and press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# On 'Import Projects', you should deselect the first project named 'plugins' as you would normally not want to develop on plugins for Robocode - otherwise just omit deselecting 'plugins'. Press 'Finish' or Enter.&lt;br /&gt;
# All Robocode projects will now be imported into Eclipse and be visible in the Package Explorer.&lt;br /&gt;
# Now, select all projects (press Ctrl+A) and right-click the Package Explorer and select Replace With -&amp;gt; HEAD Revision on the popup menu that occurs, and press 'OK' or Enter to discard local changes on the dialog that appears.&lt;br /&gt;
&lt;br /&gt;
Congratulations, you should now be able to get started working on the Robocode sources in Eclipse. :-)&lt;br /&gt;
&lt;br /&gt;
==== Launch Robocode ====&lt;br /&gt;
&lt;br /&gt;
Before launching Robocode for the first time, you should make sure that it is cleaned and compiled first. You do this by selecting Project -&amp;gt; Clean... from the menu. You should also make sure that you have run the 'mvnassembly' described previously, which will download and update your local Maven repository, which is necessary for compiling and running Robocode.&lt;br /&gt;
&lt;br /&gt;
Please notice that it might be necessary to refresh the sources in Eclipse when files are changed outside the Eclipse editor, which is the case when running the 'mvnassembly' script. You can do this from the Package Explorer by right-clicking in this and select 'Refresh'.&lt;br /&gt;
&lt;br /&gt;
In order to start running or debugging Robocode, you should select the &amp;quot;Bug&amp;quot; (debug) or &amp;quot;Play&amp;quot; (run) button in the top of Eclipse under the menu. You should press the little arrow beside these green buttons in order to choose among: Robocode, RoboRumble, TeamRumble, and MeleeRumble. The 3 last ones are for running the RoboRumble@Home clients.&lt;br /&gt;
&lt;br /&gt;
==== How to run the unit tests? ====&lt;br /&gt;
&lt;br /&gt;
When you want to run the unit test from within Eclipse, you must do this from the the Package Explorer, where you right-click on the 'robocode.tests' project and select 'Run As' -&amp;gt; 'JUnit Test'. Now all available unit tests will run automatically.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can start the tests from the command-line by standing on your robocode workspace, and write the following Maven command.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvn test install&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  ./mvn.sh test install&lt;br /&gt;
&lt;br /&gt;
=== Robocode developers and contributions ===&lt;br /&gt;
&lt;br /&gt;
Robocode developers have discussion group at robocode-developers@googlegroups.com. Everybody interested in discussion about future of Robocode are welcome. We also welcome your contributions there. The discussion group is located here: http://groups.google.com/group/robocode-developers.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Robocode/Old Developers Guide for building Robocode|Old version]] of the Developer's Guide for building Robocode for Robocode versions prior to version 1.7.&lt;br /&gt;
* [http://code.google.com/p/robocode/source/browse/ Browse the sources] of Robocode.&lt;br /&gt;
* [http://sourceforge.net/project/showfiles.php?group_id=37202&amp;amp;package_id=218677 Download the sources] of Robocode.&lt;br /&gt;
* [http://groups.google.com/group/robocode-developers Robocode developers discussion group].&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* The [http://sourceforge.net/projects/robocode Robocode project] on SourceForge.&lt;br /&gt;
* [http://sourceforge.net/svn/?group_id=37202 How to access] the SVN Repository for Robocode.&lt;br /&gt;
* [http://www.eclipse.org/ Eclipse] - an open development platform supported by Robocode.&lt;br /&gt;
* [http://maven.apache.org/ Apache Maven] used for building Robocode.&lt;br /&gt;
* [http://maven.apache.org/guides/mini/guide-ide-eclipse.html Guide] to using Eclipse with Maven 2.x.&lt;br /&gt;
* [http://www.eclipse.org/subversive/ Eclipse Subversive] is a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://subclipse.tigris.org/ Subclipse] is also a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://tortoisesvn.net TortoiseSVN], a Subversion client for Windows.&lt;br /&gt;
* [http://www.open.collab.net/downloads/subversion/ CollabNets Subversion], a Subversion client for both Windows and Linux.&lt;br /&gt;
&lt;br /&gt;
[[Category:Robocode Documentation]]&lt;br /&gt;
[[Category:Eclipse IDE]]&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Other_JVM_Languages&amp;diff=34076</id>
		<title>Other JVM Languages</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Other_JVM_Languages&amp;diff=34076"/>
		<updated>2015-03-25T23:00:16Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: /* Clojure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Robocode is not limited to Java robots! Since Robocode allows you to load classes on the CLASSPATH, you can code robots in any language that can produce compiled CLASS files. Support for languages which don't have a compiler will require changes to Robocode which nobody has yet volunteered to implement.&lt;br /&gt;
&lt;br /&gt;
The easiest way to add a language's runtime to Robocode's CLASSPATH is to edit the starter script. Make sure you add the path to your compiled files under the '''Development Options.'''&lt;br /&gt;
&lt;br /&gt;
==[http://www.scala-lang.org/ Scala]==&lt;br /&gt;
You need to add &amp;lt;code&amp;gt;scala-library.jar&amp;lt;/code&amp;gt; to Robocode's CLASSPATH:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
java -Xmx512M -Dsun.io.useCanonCaches=false -cp libs/robocode.jar;_SCALA_HOME_/lib/scala-library.jar robocode.Robocode %*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to disable security, if your Scala program does anything that needs to actually access the Scala libraries.&lt;br /&gt;
&lt;br /&gt;
Once that is done, coding robots in Scala is like coding in Java, but nicer:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
// ScalaDemo.scala&lt;br /&gt;
package wiki&lt;br /&gt;
&lt;br /&gt;
import robocode._&lt;br /&gt;
import robocode.util.Utils&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
	A small demo to test robot coding in Scala.&lt;br /&gt;
*/&lt;br /&gt;
class ScalaDemo extends AdvancedRobot {&lt;br /&gt;
&lt;br /&gt;
	// Main thread of robot&lt;br /&gt;
	override def run {&lt;br /&gt;
		setAdjustGunForRobotTurn(true)&lt;br /&gt;
		while (true) {&lt;br /&gt;
			// If we're not going anywhere, move randomly around battlefield&lt;br /&gt;
			if (Math.abs(getDistanceRemaining) &amp;lt; Rules.MAX_VELOCITY&lt;br /&gt;
					&amp;amp;&amp;amp; Math.abs(getTurnRemaining) &amp;lt; Rules.MAX_TURN_RATE)&lt;br /&gt;
			{&lt;br /&gt;
				setAhead((Math.random*2-1)*100)&lt;br /&gt;
				setTurnRight(Math.random*90-45)&lt;br /&gt;
			}&lt;br /&gt;
			// Tell RADAR to spin&lt;br /&gt;
			if (getRadarTurnRemaining == 0)&lt;br /&gt;
				setTurnRadarRightRadians(4)&lt;br /&gt;
			// Carry out pending actions&lt;br /&gt;
			execute&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// Picked up a robot on RADAR&lt;br /&gt;
	override def onScannedRobot(e : ScannedRobotEvent) {&lt;br /&gt;
		// Absolute bearing to detected robot&lt;br /&gt;
		val absBearing = e.getBearingRadians + getHeadingRadians&lt;br /&gt;
&lt;br /&gt;
		// Tell RADAR to paint detected robot&lt;br /&gt;
		setTurnRadarRightRadians(3*Utils.normalRelativeAngle(&lt;br /&gt;
			absBearing - getRadarHeadingRadians ))&lt;br /&gt;
&lt;br /&gt;
		// Tell gun to point at detected robot&lt;br /&gt;
		setTurnGunRightRadians(Utils.normalRelativeAngle(&lt;br /&gt;
			absBearing - getGunHeadingRadians ))&lt;br /&gt;
&lt;br /&gt;
		// Tell robot to shoot with power 2&lt;br /&gt;
		setFire(2)&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// Robot ran into a wall&lt;br /&gt;
	override def onHitWall(e : HitWallEvent) {&lt;br /&gt;
		// Turn in opposite direction to wall&lt;br /&gt;
		setTurnRightRadians(Utils.normalRelativeAngle(&lt;br /&gt;
			e.getBearingRadians + Math.Pi))&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Compile like you would in Java:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
scalac -cp _PATH_TO_ROBOCODE_/libs/robocode.jar ScalaDemo.scala&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[http://mirah.org/ Mirah]==&lt;br /&gt;
&lt;br /&gt;
Mirah compiles to java bytecode with no runtime dependency, so the compiled .class files run in Robocode.&lt;br /&gt;
&lt;br /&gt;
Here is a very basic Mirah bot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
package mirah&lt;br /&gt;
&lt;br /&gt;
import robocode.AdvancedRobot&lt;br /&gt;
&lt;br /&gt;
class MirahBot &amp;lt; AdvancedRobot&lt;br /&gt;
&lt;br /&gt;
	def initialize&lt;br /&gt;
		puts 'constructor'&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	def run&lt;br /&gt;
		setAdjustGunForRobotTurn(true)&lt;br /&gt;
		while true do&lt;br /&gt;
			if (getRadarTurnRemaining == 0)&lt;br /&gt;
				setTurnRadarLeftRadians(2*Math.PI)&lt;br /&gt;
			end&lt;br /&gt;
			execute&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Compile using the Mirah compile, and include like a regular Java robot.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==[http://clojure.org/ Clojure]==&lt;br /&gt;
Coding robots in Clojure can be frustrating. You have to compile your code, but you don't get many of the benefits of using a compiler. For example, calls to non-existent methods are not caught until runtime. Typos in rarely run code can unexpectedly disable your robot (unless you use type hints everywhere and &amp;lt;code&amp;gt;(set! *warn-on-reflection* true)&amp;lt;/code&amp;gt;, which is beyond the scope of this introduction).&lt;br /&gt;
&lt;br /&gt;
First, you need to add &amp;lt;code&amp;gt;clojure.jar&amp;lt;/code&amp;gt; to Robocode's CLASSPATH. You also have to disable the security manager (by passing &amp;lt;code&amp;gt;-DNOSECURITY=true&amp;lt;/code&amp;gt; on the Robocode command line) or your robot will be disabled for trying to read the Clojure JAR which is outside its root directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
java -Xmx512M -Dsun.io.useCanonCaches=false -DNOSECURITY=true -cp libs/robocode.jar;_CLOJURE_HOME_/clojure.jar robocode.Robocode %*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the ';' sign must be replaced with ':' on a Unix-like OS, e.g. on Linux and Mac OS X.&lt;br /&gt;
&lt;br /&gt;
A sample clojure robot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// ClojureDemo.clj&lt;br /&gt;
(ns wiki.ClojureDemo&lt;br /&gt;
  (:gen-class :extends robocode.AdvancedRobot))&lt;br /&gt;
&lt;br /&gt;
; Private declarations&lt;br /&gt;
(declare normalise)&lt;br /&gt;
&lt;br /&gt;
(defn -run [robot]&lt;br /&gt;
  (doto robot&lt;br /&gt;
    (.setAdjustRadarForGunTurn true)&lt;br /&gt;
    (.setAdjustRadarForRobotTurn true)&lt;br /&gt;
    (.setAdjustGunForRobotTurn true))&lt;br /&gt;
  (loop [r robot]&lt;br /&gt;
    (.setAhead r 30)&lt;br /&gt;
    (.setTurnRightRadians r 1)&lt;br /&gt;
    (when (= 0 (.getRadarTurnRemainingRadians r))&lt;br /&gt;
      (.setTurnRadarRightRadians r 4))&lt;br /&gt;
    (.execute r)&lt;br /&gt;
    (recur r)))&lt;br /&gt;
&lt;br /&gt;
(defn -onScannedRobot [robot event]&lt;br /&gt;
  (.setTurnGunRightRadians &lt;br /&gt;
   robot (normalise (- (+ (.getBearingRadians event) (.getHeadingRadians robot))&lt;br /&gt;
		       (.getGunHeadingRadians robot))))&lt;br /&gt;
&lt;br /&gt;
  (when (&amp;lt; (Math/abs (normalise (.getGunTurnRemainingRadians robot)))&lt;br /&gt;
	   robocode.Rules/GUN_TURN_RATE)&lt;br /&gt;
    (.setFire robot 2))&lt;br /&gt;
  (.setTurnRadarRightRadians&lt;br /&gt;
   robot&lt;br /&gt;
   (* (normalise (- (+ (.getBearingRadians event) (.getHeadingRadians robot))&lt;br /&gt;
		    (.getRadarHeadingRadians robot)))&lt;br /&gt;
      1.9)))&lt;br /&gt;
&lt;br /&gt;
(defn- normalise [angle]&lt;br /&gt;
  (robocode.util.Utils/normalRelativeAngle angle))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since one of the oft-touted features of LISPs (of which Clojure is one) is being so dynamic, the compiler is rather unpleasant to use. You have to follow all the following steps, or you might encounter errors:&lt;br /&gt;
&lt;br /&gt;
1. Put your source code in a folder called '''src'''. Files in this directory must follow the pattern &amp;lt;code&amp;gt;src/PACKAGENAME/CLASSNAME.clj&amp;lt;/code&amp;gt; or the compiler won't be able to find them.&lt;br /&gt;
&lt;br /&gt;
2. Create a directory named '''classes''' next to your ''src'' directory. This is where compiled files will be put, and must exist before the compiler will agree to do anything.&lt;br /&gt;
&lt;br /&gt;
3. You have to pass the package qualified name of every class you want to compile to the compiler. Given a class named &amp;lt;code&amp;gt;wiki.ClojureDemo&amp;lt;/code&amp;gt;, the compiler will try to read &amp;lt;code&amp;gt;src/wiki/ClojureDemo.clj&amp;lt;/code&amp;gt; to find it.&lt;br /&gt;
&lt;br /&gt;
The command to compile the demo bot is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
java -cp _CLOJURE_HOME_/clojure.jar -Dclojure.compile.path=classes clojure.lang.Compile wiki.ClojureDemo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;robocode.jar&amp;lt;/code&amp;gt; was not on the compiler's CLASSPATH. That is how dynamic Clojure is.&lt;br /&gt;
&lt;br /&gt;
If you plan to use multiple classes, using the compiler can become rather tedious. Below is an [http://ant.apache.org/ Apache Ant] script to compile all the files in the &amp;lt;code&amp;gt;src&amp;lt;/code&amp;gt; sub-directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;project name=&amp;quot;robocode-robots&amp;quot; default=&amp;quot;compile&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Change these to reflect your own installation paths --&amp;gt;&lt;br /&gt;
  &amp;lt;property name=&amp;quot;clojure.jar&amp;quot;&lt;br /&gt;
    location=&amp;quot;_PATH_TO_CLOJURE_/clojure.jar&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;property name=&amp;quot;robocode.jar&amp;quot;&lt;br /&gt;
    location=&amp;quot;_PATH_TO_ROBOCODE_/robocode.jar&amp;quot; /&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;!-- Directory under which source is located --&amp;gt;&lt;br /&gt;
  &amp;lt;property name=&amp;quot;src&amp;quot; location=&amp;quot;src&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Directory where compiled files will be put --&amp;gt;&lt;br /&gt;
  &amp;lt;property name=&amp;quot;build&amp;quot; location=&amp;quot;classes&amp;quot; /&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;target name=&amp;quot;compile&amp;quot; description=&amp;quot;Compile robots&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;mkdir dir=&amp;quot;${build}&amp;quot; /&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;pathconvert pathsep=&amp;quot; &amp;quot; property=&amp;quot;compile.namespaces&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fileset dir=&amp;quot;${src}&amp;quot; includes=&amp;quot;**/*.clj&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;chainedmapper&amp;gt;&lt;br /&gt;
        &amp;lt;!--&lt;br /&gt;
        Packagemapper converts paths from PACKAGENAME/CLASSNAME.clj&lt;br /&gt;
        to fully qualified class names PACKAGE.CLASSNAME&lt;br /&gt;
        &lt;br /&gt;
        The back slash below is required for Windows. Might have to&lt;br /&gt;
        reverse it on other platforms.&lt;br /&gt;
        --&amp;gt;&lt;br /&gt;
        &amp;lt;packagemapper from=&amp;quot;${src}\*.clj&amp;quot; to=&amp;quot;*&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;filtermapper&amp;gt;&lt;br /&gt;
          &amp;lt;!--&lt;br /&gt;
          The Clojure compiler expects class names with hyphens to be&lt;br /&gt;
          replaced by underscores&lt;br /&gt;
          --&amp;gt;&lt;br /&gt;
          &amp;lt;replacestring from=&amp;quot;_&amp;quot; to=&amp;quot;-&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/filtermapper&amp;gt;&lt;br /&gt;
      &amp;lt;/chainedmapper&amp;gt;&lt;br /&gt;
    &amp;lt;/pathconvert&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;java classname=&amp;quot;clojure.lang.Compile&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;classpath&amp;gt;&lt;br /&gt;
        &amp;lt;path location=&amp;quot;${src}&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;path location=&amp;quot;${build}&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;path location=&amp;quot;${clojure.jar}&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;path location=&amp;quot;${robocode.jar}&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;/classpath&amp;gt;&lt;br /&gt;
      &amp;lt;sysproperty key=&amp;quot;clojure.compile.path&amp;quot; value=&amp;quot;${build}&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;arg line=&amp;quot;${compile.namespaces}&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/java&amp;gt;&lt;br /&gt;
  &amp;lt;/target&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;target name=&amp;quot;clean&amp;quot; description=&amp;quot;Remove compiled files&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;delete dir=&amp;quot;${build}&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/target&amp;gt;&lt;br /&gt;
&amp;lt;/project&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Thread:Talk:Gilgalad/Minibot%3F/reply_(22)&amp;diff=33729</id>
		<title>Thread:Talk:Gilgalad/Minibot?/reply (22)</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Thread:Talk:Gilgalad/Minibot%3F/reply_(22)&amp;diff=33729"/>
		<updated>2014-09-15T19:13:19Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: Reply to Minibot?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Robocode [https://sourceforge.net/projects/robocode/files/robocode/1.9.2.3/ 1.9.2.3] has just been released. :-)&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Thread:Talk:Gilgalad/Minibot%3F/reply_(20)&amp;diff=33727</id>
		<title>Thread:Talk:Gilgalad/Minibot?/reply (20)</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Thread:Talk:Gilgalad/Minibot%3F/reply_(20)&amp;diff=33727"/>
		<updated>2014-09-15T09:15:23Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: Reply to Minibot?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Phew. This one was a hard one to fix. It was almost a one-liner bug, but still hard to find. :-)&lt;br /&gt;
I will make a official release as soon as possible - hopefully later today. :-)&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Thread:Talk:Gilgalad/Minibot%3F/reply_(18)&amp;diff=33724</id>
		<title>Thread:Talk:Gilgalad/Minibot?/reply (18)</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Thread:Talk:Gilgalad/Minibot%3F/reply_(18)&amp;diff=33724"/>
		<updated>2014-09-12T20:45:03Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: Reply to Minibot?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Okay. I checked all changed made to the RoboRumble since version 1.8.2.0 and found a potential bug regarding a check for the codesize.&lt;br /&gt;
I made a &amp;quot;rollback&amp;quot; of the code so it works the same way as for version 1.8.2.0 and earlier.&lt;br /&gt;
I made a new version [http://robocode.sourceforge.net/files/robocode-1.9.2.3-setup.jar 1.9.2.3] that needs to be tested. It looks okay to me when it runs, but I need you to test it thoroughly.&lt;br /&gt;
&lt;br /&gt;
If it works I will make a release of the new 1.9.2.3 ASAP.&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Thread:Talk:Gilgalad/Minibot%3F/reply_(17)&amp;diff=33723</id>
		<title>Thread:Talk:Gilgalad/Minibot?/reply (17)</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Thread:Talk:Gilgalad/Minibot%3F/reply_(17)&amp;diff=33723"/>
		<updated>2014-09-08T21:50:40Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: Reply to Minibot?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am not able to find any obvious bugs on the client side that could cause this trouble. I checked all changes on the RoboRumble client sources since version 1.8.2.0.&lt;br /&gt;
Could it be some configuration issue or a change on the server side?&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Thread:Talk:Gilgalad/Minibot%3F/reply_(16)&amp;diff=33722</id>
		<title>Thread:Talk:Gilgalad/Minibot?/reply (16)</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Thread:Talk:Gilgalad/Minibot%3F/reply_(16)&amp;diff=33722"/>
		<updated>2014-09-08T20:40:25Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: Reply to Minibot?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I will dig into the RoboRumble client sources. I haven't touched RR for a long time, so it is odd that it causes problems with newer versions. Perhaps the change was made around version 1.9.0.0?&lt;br /&gt;
Anyways. I hope it is okay to upload newer 1.9.2.3 version to check if the problems is fixed when I make new fixes/adjustments to the code? :-)&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Thread:Talk:Gilgalad/Minibot%3F/reply_(11)&amp;diff=33717</id>
		<title>Thread:Talk:Gilgalad/Minibot?/reply (11)</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Thread:Talk:Gilgalad/Minibot%3F/reply_(11)&amp;diff=33717"/>
		<updated>2014-09-07T22:22:10Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: Reply to Minibot?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I think I managed to fix the last part of the bug. I made a version 1.9.2.3 [http://robocode.sourceforge.net/files/robocode-1.9.2.3-setup.jar here], which is not official (yet).&lt;br /&gt;
If it works, I will release it pretty much as it is. If not, I will need to work much harder to figure out what causes the problem?!&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Thread:Talk:Main_Page/Robocode_Online_Web_Application_-_what_do_You_think%3F/reply_(5)&amp;diff=33092</id>
		<title>Thread:Talk:Main Page/Robocode Online Web Application - what do You think?/reply (5)</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Thread:Talk:Main_Page/Robocode_Online_Web_Application_-_what_do_You_think%3F/reply_(5)&amp;diff=33092"/>
		<updated>2014-01-30T22:07:15Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: Reply to Robocode Online Web Application - what do You think?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* It would be nice to have something to replace the Robocode Central, so it is possible to upload and download robots - and the same robot in various versions etc.&lt;br /&gt;
* It could run new types of tournaments, and divide robots into beginner (Level 1), experienced (Level 10?), veteran (Level 30?) or similar depending on how well they perform. Everybody starts as beginner, and then gain higher level, when they are able to beat more than 50% of the other robots at the same level or something like that.&lt;br /&gt;
* It would be great to have a web page or GUI where beginners can put program a simple robot using stuff like graphical symbols (commands) that could be drag'n'dropped, like e.g. &amp;quot;Turn left&amp;quot;, &amp;quot;Move forward&amp;quot;, and &amp;quot;Fire&amp;quot;. And each command could take a parameter value like 90 for &amp;quot;Turn left&amp;quot; 90 degrees. Then it could write the source code on the fly which could be copy'n'pasted, saved and/or compiled for Robocode.&lt;br /&gt;
* Regarding Robocode 2. I am working on a prototype that is platform independent (protocol based). But it is not ready for a web page yet. Lots of details could change. So it is still on the experimental level.&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Thread:User_talk:Wompi/Skipped_Turns_..._what_to_know_about%3F/reply_(21)&amp;diff=29149</id>
		<title>Thread:User talk:Wompi/Skipped Turns ... what to know about?/reply (21)</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Thread:User_talk:Wompi/Skipped_Turns_..._what_to_know_about%3F/reply_(21)&amp;diff=29149"/>
		<updated>2013-02-22T22:59:47Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: Reply to Skipped Turns ... what to know about?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This issue took a looong time to fix properly, i.e. without braking other stuff in Robocode and still fix all the observed issues. Sorry for that.&lt;br /&gt;
&lt;br /&gt;
I have made an 1.8.1 Alpha 2 version of Robocode you can try out here:&lt;br /&gt;
http://robocode.sourceforge.net/files/robocode-1.8.1.0-Alpha-2-setup.jar&lt;br /&gt;
&lt;br /&gt;
Please check this version out and see if all issues regarding skipped turns have been solved properly. :-)&lt;br /&gt;
&lt;br /&gt;
--[[User:FlemmingLarsen|Fnl]] 22:59, 22 February 2013 (UTC)&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=26813</id>
		<title>Robocode/Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=26813"/>
		<updated>2012-09-18T22:46:49Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: Minor changes to the Robocode Developers Guide for building Robocode&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide describes how to build Robocode using [http://git-scm.com/ Git], [http://maven.apache.org Maven] and [http://www.eclipse.org Eclipse] and applies for Robocode version 1.7.4.2 and newer, which has been moved to [https://github.com/robo-code/robocode GitHub].&lt;br /&gt;
&lt;br /&gt;
== Developer's Guide for building Robocode with Eclipse setup ==&lt;br /&gt;
&lt;br /&gt;
=== Notice ===&lt;br /&gt;
&lt;br /&gt;
This guide is intended for experienced Java developers who want to work on the Robocode game itself, and describes all basic stuff required to compile and run Robocode within the [http://www.eclipse.org Eclipse IDE].&lt;br /&gt;
&lt;br /&gt;
If you just want to browse the sources, you can do it from [https://github.com/robo-code/robocode here] or you can download the zipped sources from [http://sourceforge.net/projects/robocode/files/robocode%20sources/ here].&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
Basically, all you need to get started with building Robocode is:&lt;br /&gt;
&lt;br /&gt;
* Java Developer Kit (JDK) 5.0 or newer ([http://www.oracle.com/technetwork/java/javase/downloads/index.html downloads])&lt;br /&gt;
* The source files of Robocode ([https://github.com/robo-code/robocode on GitHub])&lt;br /&gt;
* An Internet connection.&lt;br /&gt;
&lt;br /&gt;
Other than that, you need to be a skilled Java developer in order to figure out how Robocode is put together. Robocode is a complex application that requires lots of time to understand and master its internal design.&lt;br /&gt;
&lt;br /&gt;
An Internet connection is required for building Robocode distribution files as the build tool (Maven) needs access to [http://maven.apache.org/guides/introduction/introduction-to-repositories.html remote repositories], which contains various libraries and binaries. Some libraries are used for building Robocode, and others are used for running Robocode, and hence need to be put into the distribution files.&lt;br /&gt;
In order to get updates to the sources of Robocode when new versions emerge, an Internet connection is also critical to download changed sources and merge the changes with your version of the sources etc.&lt;br /&gt;
&lt;br /&gt;
==== Install JDK ====&lt;br /&gt;
&lt;br /&gt;
Robocode is being developed in Java SE, and requires the Java Developer Kit ('''JDK''') to be pre-installed on the system used for building Robocode. Please note that a Java Runtime Environment ('''JRE''') is not enough as it does not contain the required developer tools needed for building Robocode.&lt;br /&gt;
&lt;br /&gt;
The JDK 5.0 is used for the building official releases for Robocode as Java 5.0 is the minimum requirement for running Robocode. However, you do not need to use the obsolete JDK 5.0, if you don't want to. But compiling Robocode with the JDK 5.0 guarantees that Robocode will be able to run on Java 5.0. You can get the old Java 5.0 from [http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase5-419410.html#jdk-1.5.0_22-oth-JPR here].&lt;br /&gt;
&lt;br /&gt;
If you just want to play with the sources, you could use a newer JDK without any trouble. But be aware that you might not be able to run your version of Robocode on older Java versions, if you builld your own version of Robocode.&lt;br /&gt;
Also note that the Sun/Oracle version of the JDK is preferable for building Robocode.&lt;br /&gt;
&lt;br /&gt;
Notice that when installing the JDK, it is highly recommended that you '''install the sources provided for Java''' as the sources are very useful when debugging Robocode. However, this is not a requirement.&lt;br /&gt;
&lt;br /&gt;
==== Set up Java Environment Variables ====&lt;br /&gt;
&lt;br /&gt;
You must set up the environment variable named '''JAVA_HOME''' and extend another environment variable named '''PATH'''.&lt;br /&gt;
&lt;br /&gt;
JAVA_HOME must be set up point to the root directory of the JDK you intend to use.&lt;br /&gt;
&lt;br /&gt;
The PATH environment variable must be extended in order to locate the Java commands like 'java', 'javac' and lots of other tools in the JDK. Extending PATH is considered best practice when setting up the Java development environment, and makes it possible for other tools like e.g. Maven to locate the proper JDK tools. It also makes it possible for you to detirmine which JRE that is being used when running a Java application by writting &amp;lt;code&amp;gt;java -version&amp;lt;/code&amp;gt; in the command-line/shell, and detirmine which Java compiler that is being used by writting &amp;lt;code&amp;gt;javac -version&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
&lt;br /&gt;
'''Windows:'''&lt;br /&gt;
* JAVA_HOME is set to e.g. &amp;lt;code&amp;gt;JAVA_HOME=&amp;quot;C:\Program Files\Java\jdk1.5.0_16&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* PATH is extended, e.g. to &amp;lt;code&amp;gt;PATH=%JAVA_HOME%\bin;PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Linux / *nix:'''&lt;br /&gt;
* JAVA_HOME is set by e.g. &amp;lt;code&amp;gt;export JAVA_HOME=/usr/java/jdk1.5.0_07/bin/java&amp;lt;/code&amp;gt;. (Bash)&lt;br /&gt;
* PATH is extended, e.g. by &amp;lt;code&amp;gt;export PATH=$JAVA_HOME/bin:$PATH&amp;lt;/code&amp;gt;. (Bash)&lt;br /&gt;
&lt;br /&gt;
'''Mac OS X:'''&lt;br /&gt;
* JAVA_HOME is set by e.g. &amp;lt;code&amp;gt;export JAVA_HOME=$(/usr/libexec/java_home)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* PATH is extended, e.g. by &amp;lt;code&amp;gt;export PATH=${JAVA_HOME}/bin:$PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you want more information of how to set up your JAVA_HOME and PATH environment variables for your specific OS, please read the installation notes provided for the Sun JDK 5.0 here:&lt;br /&gt;
&lt;br /&gt;
'''Installation Notes from Sun:'''&lt;br /&gt;
* [http://www.oracle.com/technetwork/java/javase/index-137561.html Installation Notes] for Windows, Linux, Solaris, and Mac.&lt;br /&gt;
* [http://www.oracle.com/technetwork/java/javase/system-configurations-135212.html Certified System Configurations for Java] for ''all'' supported systems.&lt;br /&gt;
&lt;br /&gt;
==== Required technical skills? ====&lt;br /&gt;
&lt;br /&gt;
In order to develop on Robocode, you need to know the basics of these tools:&lt;br /&gt;
&lt;br /&gt;
* Eclipse IDE ([http://www.vogella.com/articles/Eclipse/article.html Tutorial])&lt;br /&gt;
* Git and GitHub ([http://www.vogella.com/articles/Git/article.html Tutorial])&lt;br /&gt;
* Maven ([http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html Tutorial])&lt;br /&gt;
&lt;br /&gt;
Notice that you do not have to be an expert in Eclipse, Git/GitHub, and Maven. But you need some basic knowledge about these tools to understand how to build Robocode. In fact, trying to build Robocode might actually be a very good way of learning these tools, if you don't know them already or miss some practical experience with these. :-)&lt;br /&gt;
&lt;br /&gt;
When you need to start editing the sources of Robocode, you naturally might want to use an IDE for compiling and run Robocode on the fly to quickly see the effect of your work. This is where [http://www.eclipse.org Eclipse IDE] comes into the picture for this guide, as many Java developers regards the Eclipse IDE as the best IDE for Java development. Eclipse comes free of charge, has a huge community, automatic compilation, a rich source code editor, a flexible window layout, and lots of plug-ins. Eclipse has been choosen as the primary IDE for building Robocode, and thus this guide only describes how to setup and build Robocode with this IDE.&lt;br /&gt;
If you want to use another IDE for developing Robocode you need to figure out how to set it up by yourself based on the details from this guide. And you are more than welcome to add a page beside this article that described how to setup everything for IDE of your choise and link to it from this article. :-)&lt;br /&gt;
&lt;br /&gt;
All sources of Robocode are available at [https://github.com/robo-code/robocode GitHub]. At GitHub, you can download sources as a zipped file or create your own [https://help.github.com/articles/fork-a-repo clone/fork], if you want to.&lt;br /&gt;
&lt;br /&gt;
Even though Maven is used as build tool, you don't need to pre-install it on your system. Batch (.bat) and shell (.sh) files are provided with the source files. These scripts will automatically download required libraries, scripts and tools required for building Robocode. Hence, no tools needs to be pre-installed in order to build Robocode beside the JDK and correct environment settings for JAVA_HOME and PATH.&lt;br /&gt;
&lt;br /&gt;
Notice that the shell scripts (.sh files) should work under Unix and *nix like OSes including Max OS X. However, the shell scripts have only been tested under Linux (on Ubuntu), so there is no guarantee that these will run without issues on other *nix systems.&lt;br /&gt;
&lt;br /&gt;
You don't have to worry too much about how to setup Eclipse for Robocode as the provided sources contains all configuration files needed by Eclipse. Some of these files are generated using Maven's build-in support for Eclipse. However, you will need to do some basic pre-configuration of Eclipse before you'll be able to get started with working on Robocode. You should only need to set up a workspace for Robocode once. However, you will need to update the sources from the remote repository on GitHub once in a while, and merge changes with your sources in order to keep up-to-date with the current versions of Robocode, i.e. the trunk/head of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
=== Checking out sources from GitHub ===&lt;br /&gt;
&lt;br /&gt;
In the following, I assume that you want to '''check out''' the sources from GitHub using some [http://git-scm.com/downloads Git client].  This could be one of the Git GUI Clients (git-gui) recommended [http://git-scm.com/downloads/guis here].&lt;br /&gt;
You don't necessarily need a Git client for building Robocode, as you could simply get the sources from a plain .zip file. However, if you want to update your local source files with the newest sources from the Git repository and the ability to commit and/or merge changes, you will need to use some Git client in order to get access to files beside the files inside (Eclipse) project directories, e.g. if you want to check out the scripts located in the root of the Git repository for Robocode.&lt;br /&gt;
&lt;br /&gt;
The URL of the sources at GitHub is:&lt;br /&gt;
[https://github.com/robo-code/robocode.git https://github.com/robo-code/robocode.git]&lt;br /&gt;
&lt;br /&gt;
==== How to build distribution files? ====&lt;br /&gt;
&lt;br /&gt;
In order to build the distribution files containing the installer setup file (robocode-x.x.x-setup.jar) and a .zip file containing all the sources (robocode-x.x.x-src.zip) you must call the '''mvnassembly''' script from the command-line when standing within the root directory of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvnassembly&lt;br /&gt;
&lt;br /&gt;
On *nix:&lt;br /&gt;
  ./mvnassembly.sh&lt;br /&gt;
&lt;br /&gt;
This will build the distribution files, which will be put into the sub-directory named ''robocode.distribution/target''.&lt;br /&gt;
&lt;br /&gt;
'''mvnassembly''' is a script that compiles all sources of the Robocode game, creates javadoc html files, run test units, and finally creates the target distribution files. The first time this script is run, it will need to download a huge amount of .jar files from various Maven repositories and which contains Maven plugins etc. used for building Robocode. So please be patient with it the first time.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Eclipse for developing on Robocode ===&lt;br /&gt;
&lt;br /&gt;
Here follows a description of how to setup Eclipse for developing on Robocode.&lt;br /&gt;
&lt;br /&gt;
==== Software Requirements for Eclipse IDE ====&lt;br /&gt;
&lt;br /&gt;
Here follows the recommended software needed to start developing on Robocode with the Eclipse IDE:&lt;br /&gt;
&lt;br /&gt;
'''Required:'''&lt;br /&gt;
* Java 6 JRE/JDK or newer ([http://www.oracle.com/technetwork/java/javase/downloads/index.html download])&lt;br /&gt;
* Eclipse Classic 4.2 (Juno) or newer ([http://www.eclipse.org/downloads/ download]). An older version of Eclipse, e.g. Eclipse 3.7 should also be sufficient.&lt;br /&gt;
&lt;br /&gt;
'''Highly Recommended:'''&lt;br /&gt;
* [http://eclipse.github.com/ GitHub for Eclipse] named [http://www.eclipse.org/egit/ EGit] 2.0.0, which is a Eclipse plug-in (installation procedure is described later).&lt;br /&gt;
&lt;br /&gt;
In order to run the Eclipse IDE, a Java 6 JRE or JDK should is required/recommended. That is, the Juno release of Eclipse has been [http://www.eclipse.org/eclipse/development/readme_eclipse_4.2.html#TargetOperatingEnvironments tested] with Java 6 and Java 7.&lt;br /&gt;
&lt;br /&gt;
The version numbers just provided here are as a kind of guarantee that these will work with the present version of Robocode (1.7.4.2) and counts for reference for this guide.&lt;br /&gt;
&lt;br /&gt;
Please consult the [http://wiki.eclipse.org/Eclipse/Installation#Install_a_JVM installation notes] provided for Eclipse in order to find out how to install Eclipse for your specific OS.&lt;br /&gt;
&lt;br /&gt;
==== Create a workspace for Robocode ====&lt;br /&gt;
&lt;br /&gt;
When you have setup and installed Eclipse on your system (if you did not have it on your system already), a workspace must be created for Robocode.&lt;br /&gt;
&lt;br /&gt;
The first time you start up a newly installed Eclipse, it will ask for a directory for your workspace. I suggest that you create a workspace named '''robocode-workspace''' or similar and create the workspace on a partition or directory like e.g. &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; (on Windows) or &amp;lt;code&amp;gt;~&amp;lt;/code&amp;gt; (on Linux) - or any other directory of your choice. If you have already got a workspace, e.g. the default one suggested by Eclipse, you can create a new workspace if you wish by selecting 'File' -&amp;gt; 'Switch Workspace' -&amp;gt; 'Other...' from the menu.&lt;br /&gt;
&lt;br /&gt;
==== M2_REPO class path variable ====&lt;br /&gt;
&lt;br /&gt;
One of the first things you need to do in Eclipse is to set up the '''M2_REPO''' class path variable for Eclipse, which points to your local Maven 2 repository. That is, Eclipse uses the M2_REPO class path variable for locating the Maven repository containing various libraries used for compiling Robocode etc. But before you can setup the M2_REPO class path in Eclipse, you must run the 'mvnassembly' command described earlier if you have not already done that.&lt;br /&gt;
&lt;br /&gt;
When calling the 'mvnassembly' script or alternatively start off Maven within the root of the robocode sources by calling e.g. 'mvn clean install', Maven will download all required libraries from other sites into your local Maven repository. Note that you will need to locate your local Maven repository. Under Windows your Maven repository is put into your %USERPROFILE% directory, and on Linux is put into your home directory (~). The Maven repository will be put under .m2/repository.&lt;br /&gt;
&lt;br /&gt;
To setup the M2_REPO class path in Eclipse, you must go to the menu bar and select 'Window' -&amp;gt; 'Preferences'. On the Preferences window expand the 'Java' -&amp;gt; 'Build Path' and select the 'Classpath Variables'. On the page for the Classpath Variables, you click on the 'New...' button, and enter M2_REPO as name. Next, you click on the 'Folder...' button and navigate to where you have your .m2/repository directory located (in %USERPROFILE% under Windows, and ~ under Linux), e.g. &amp;lt;code&amp;gt;H:/Users/Flemming/.m2/repository&amp;lt;/code&amp;gt; (Windows) or &amp;lt;code&amp;gt;/home/fnl/.m2/repository&amp;lt;/code&amp;gt; (Linux).&lt;br /&gt;
&lt;br /&gt;
When Eclipse asks you if it should rebuild the workspace, you select 'Yes'.&lt;br /&gt;
&lt;br /&gt;
==== Configure JRE/JDK for your workspace ====&lt;br /&gt;
&lt;br /&gt;
You must setup which JRE/JDK that will be used for compiling (and running) Robocode in your workspace.&lt;br /&gt;
You do this by...&lt;br /&gt;
# selecting Window -&amp;gt; Preferences from the menu, and then unfold and select Java -&amp;gt; Installed JREs and press 'Add...' on the 'Installed JREs' page.&lt;br /&gt;
# Select 'Standard VM' on the 'JRE Type' page and press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# Press the 'Directory...' button and browse to where you have installed your JDK 5 or 6 (JDK 5 is preferable when developing on Robocode) and press 'Finish' or Enter. Make sure to select a JDK and ''not'' just a JRE.&lt;br /&gt;
# When you get back to the 'Installed JREs' page, make sure to put a check mark in the JDK you just added and press 'OK' or Enter.&lt;br /&gt;
&lt;br /&gt;
==== Using EGit for accessing the sources on GitHub ====&lt;br /&gt;
&lt;br /&gt;
The next step (which is optional) is to install [http://www.eclipse.org/egit/ Egit] into Eclipse in order to get direct access to the sources of Robocode in the GitHub repository. Notice, you'll only have read access to the sources, but could make your own Git repository if you wish to. Also notice, that you don't need to install EGit in Eclipse in order to work with the sources, as you could simply copy and import the Robocode sources into your workspace. However, it makes life easier using EGit, as you will be able to get changes made to Robocode and merge this into your local sources.&lt;br /&gt;
 &lt;br /&gt;
==== Install EGit into Eclipse ====&lt;br /&gt;
&lt;br /&gt;
A description of how to install EGit into Eclipse is provided [http://www.eclipse.org/egit/download/ here]. But if you are not familiar with how it is done, a description is follows here:&lt;br /&gt;
&lt;br /&gt;
# In Eclipse you must select 'Help' -&amp;gt; 'Intall New Software...' from the menu.&lt;br /&gt;
# Enter ''http://download.eclipse.org/egit/updates/'' into the 'Work with:' text field and press the 'Add' button or the enter key. Notice, that this update site might change, so you might have to get the updated URL from [http://www.eclipse.org/egit/download/ here] and use the one that is recommended.&lt;br /&gt;
# Now, unfold the 'Eclipse EGit Team Provider' that appears in the list below the update site you just entered.&lt;br /&gt;
# Put a checkmark into you just added and put a checkmark for the 'Eclipse EGit' and press the 'Next' button.&lt;br /&gt;
# Press 'Finish' on the window that follows and follow the instructions given by Eclipse to install this plugin. It will ask if you wish to restart Eclipse, and I recommend you to answer 'yes' in order to restart Eclipse.&lt;br /&gt;
# When Eclipse has been restarted, EGit will be ready to be used in Eclipse.&lt;br /&gt;
&lt;br /&gt;
==== Importing sources of Robocode using EGit ====&lt;br /&gt;
&lt;br /&gt;
Importing the projects for Robocode into Eclipse from Git can be done from the Package Explorer, which can be opened from the menu by selecting Window -&amp;gt; Show View -&amp;gt; Package Explorer or by using the keyboard shortcut by pressing Alt+Shift+Q and P. In the Package Explorer, you...&lt;br /&gt;
&lt;br /&gt;
# Right-click the mouse and select 'Import...' in the popup menu that occurs.&lt;br /&gt;
# Unfold 'Git' in the 'Import' window and double-click 'Projects from Git'.&lt;br /&gt;
# On the 'Import Projects from Git' you select 'URI'.&lt;br /&gt;
# On the next page named 'Source Git Repository' to enter '''https://github.com/robo-code/robocode.git''' into the 'URI:' text field and press Enter or 'Next &amp;gt;'.&lt;br /&gt;
# On the 'Branch Selection' page you press 'Deselect All' and select the branch you want to work on. This would normally be 'master', which is the master branch of Robocode. When the branch selection is made, you press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# On the 'Local Destination' page, you must note the directory where your local files will be put. I recommend you use the directory suggested by EGit (Eclipse) and press 'Finish' or Enter.&lt;br /&gt;
# On the 'Select a wizard to use for importing projects', make sure 'Import existing projects' is selected and press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# On 'Import Projects', you should deselect the first project named 'plugins' as you would normally not want to develop on plugins for Robocode - otherwise just omit deselecting 'plugins'. Press 'Finish' or Enter.&lt;br /&gt;
# All Robocode projects will now be imported into Eclipse and be visible in the Package Explorer.&lt;br /&gt;
# Now, select all projects (press Ctrl+A) and right-click the Package Explorer and select Replace With -&amp;gt; HEAD Revision on the popup menu that occurs, and press 'OK' or Enter to discard local changes on the dialog that appears.&lt;br /&gt;
&lt;br /&gt;
Congratulations, you should now be able to get started working on the Robocode sources in Eclipse. :-)&lt;br /&gt;
&lt;br /&gt;
==== Launch Robocode ====&lt;br /&gt;
&lt;br /&gt;
Before launching Robocode for the first time, you should make sure that it is cleaned and compiled first. You do this by selecting Project -&amp;gt; Clean... from the menu. You should also make sure that you have run the 'mvnassembly' described previously, which will download and update your local Maven repository, which is necessary for compiling and running Robocode.&lt;br /&gt;
&lt;br /&gt;
Please notice that it might be necessary to refresh the sources in Eclipse when files are changed outside the Eclipse editor, which is the case when running the 'mvnassembly' script. You can do this from the Package Explorer by right-clicking in this and select 'Refresh'.&lt;br /&gt;
&lt;br /&gt;
In order to start running or debugging Robocode, you should select the &amp;quot;Bug&amp;quot; (debug) or &amp;quot;Play&amp;quot; (run) button in the top of Eclipse under the menu. You should press the little arrow beside these green buttons in order to choose among: Robocode, RoboRumble, TeamRumble, and MeleeRumble. The 3 last ones are for running the RoboRumble@Home clients.&lt;br /&gt;
&lt;br /&gt;
==== How to run the unit tests? ====&lt;br /&gt;
&lt;br /&gt;
When you want to run the unit test from within Eclipse, you must do this from the the Package Explorer, where you right-click on the 'robocode.tests' project and select 'Run As' -&amp;gt; 'JUnit Test'. Now all available unit tests will run automatically.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can start the tests from the command-line by standing on your robocode workspace, and write the following Maven command.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvn test install&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  ./mvn.sh test install&lt;br /&gt;
&lt;br /&gt;
=== Robocode developers and contributions ===&lt;br /&gt;
&lt;br /&gt;
Robocode developers have discussion group at robocode-developers@googlegroups.com. Everybody interested in discussion about future of Robocode are welcome. We also welcome your contributions there. The discussion group is located here: http://groups.google.com/group/robocode-developers.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Robocode/Old Developers Guide for building Robocode|Old version]] of the Developer's Guide for building Robocode for Robocode versions prior to version 1.7.&lt;br /&gt;
* [http://code.google.com/p/robocode/source/browse/ Browse the sources] of Robocode.&lt;br /&gt;
* [http://sourceforge.net/project/showfiles.php?group_id=37202&amp;amp;package_id=218677 Download the sources] of Robocode.&lt;br /&gt;
* [http://groups.google.com/group/robocode-developers Robocode developers discussion group].&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* The [http://sourceforge.net/projects/robocode Robocode project] on SourceForge.&lt;br /&gt;
* [http://sourceforge.net/svn/?group_id=37202 How to access] the SVN Repository for Robocode.&lt;br /&gt;
* [http://www.eclipse.org/ Eclipse] - an open development platform supported by Robocode.&lt;br /&gt;
* [http://maven.apache.org/ Apache Maven] used for building Robocode.&lt;br /&gt;
* [http://maven.apache.org/guides/mini/guide-ide-eclipse.html Guide] to using Eclipse with Maven 2.x.&lt;br /&gt;
* [http://www.eclipse.org/subversive/ Eclipse Subversive] is a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://subclipse.tigris.org/ Subclipse] is also a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://tortoisesvn.net TortoiseSVN], a Subversion client for Windows.&lt;br /&gt;
* [http://www.open.collab.net/downloads/subversion/ CollabNets Subversion], a Subversion client for both Windows and Linux.&lt;br /&gt;
&lt;br /&gt;
[[Category:Robocode Documentation]]&lt;br /&gt;
[[Category:Eclipse IDE]]&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Talk:Robocode/Old_Developers_Guide_for_building_Robocode&amp;diff=26812</id>
		<title>Talk:Robocode/Old Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Talk:Robocode/Old_Developers_Guide_for_building_Robocode&amp;diff=26812"/>
		<updated>2012-09-18T22:11:38Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: Redirected page to Talk:Robocode/Older Developers Guide for building Robocode&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Talk:Robocode/Older Developers Guide for building Robocode]]&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Talk:Robocode/Old_Developers_Guide_for_building_Robocode&amp;diff=26811</id>
		<title>Talk:Robocode/Old Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Talk:Robocode/Old_Developers_Guide_for_building_Robocode&amp;diff=26811"/>
		<updated>2012-09-18T22:10:40Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: Redirected page to Talk:Robocode/Old Developers Guide for building Robocode&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Talk:Robocode/Old Developers Guide for building Robocode]]&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Talk:Robocode/Old_Developers_Guide_for_building_Robocode&amp;diff=26810</id>
		<title>Talk:Robocode/Old Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Talk:Robocode/Old_Developers_Guide_for_building_Robocode&amp;diff=26810"/>
		<updated>2012-09-18T22:10:16Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: Blanked the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Robocode/Old_Developers_Guide_for_building_Robocode&amp;diff=26809</id>
		<title>Robocode/Old Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Robocode/Old_Developers_Guide_for_building_Robocode&amp;diff=26809"/>
		<updated>2012-09-18T22:04:25Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: Added Obsolete notice&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide describes how to build the Robocode game using [http://www.eclipse.org Eclipse].&lt;br /&gt;
&lt;br /&gt;
This guide is valid from Robocode version 1.7. If you want to build older versions of Robocode you must use the old version of the developer's guide available [[Robocode/Old Developers Guide for building Robocode|here]].&lt;br /&gt;
&lt;br /&gt;
== Developer's Guide for building Robocode using Eclipse ==&lt;br /&gt;
&lt;br /&gt;
=== Obsolete ===&lt;br /&gt;
'''Guide below on this page is for building Robocode before version 1.7.4.2'''. The current version of this guide can be found at [[Robocode/Developers Guide for building Robocode]].&lt;br /&gt;
&lt;br /&gt;
=== Notice ===&lt;br /&gt;
&lt;br /&gt;
This guide is intended for experienced Java developers who want to work on the Robocode game itself. This guide describes all the basic stuff in order to compile and run Robocode using the Eclipse IDE.&lt;br /&gt;
&lt;br /&gt;
If you just want to browse the sources, you can do it [http://code.google.com/p/robocode/source/browse/ here] or you can download the zipped sources from [http://sourceforge.net/project/showfiles.php?group_id=37202&amp;amp;package_id=218677 here].&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
All sources of Robocode are available in the [http://code.google.com/p/robocode/source/browse/ SVN Repository] for the [http://sourceforge.net/projects/robocode Robocode project] on SourceForge (SF). You can read about how to access the SVN Repository for Robocode [http://code.google.com/p/robocode/source/checkout here]. Subversion (SVN) 1.5 is being used as the Version Control System used for Robocode.&lt;br /&gt;
&lt;br /&gt;
Basically, all you need is the sources of Robocode, which can be downloaded as a .zip file or downloaded from the Subversion repository, and [http://maven.apache.org/ Maven] installed. Maven is being used in order to build everything in the Robocode project. However, if you want to work with the sources of Robocode, you might of course want to use an IDE for compiling and run Robocode on the fly to see the effect of your work.&lt;br /&gt;
&lt;br /&gt;
Batch files and shell scripts are provided for building Robocode under Windows and Linux (including Mac OS X). These scripts have been developed for Windows XP/Vista and Ubuntu 8.10 (Linux). Please notice that the Linux setup should also work for e.g. Solaris, FreeBSD etc.&lt;br /&gt;
&lt;br /&gt;
=== What skills do you need? ===&lt;br /&gt;
&lt;br /&gt;
* Eclipse ([https://eclipse-tutorial.dev.java.net/ Eclipse tutorial])&lt;br /&gt;
* Subversion ([http://svnbook.red-bean.com/ Subversion book])&lt;br /&gt;
* Maven ([http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html Maven in 5 Minutes])&lt;br /&gt;
&lt;br /&gt;
This guide is focusing on how to build and run Robocode using the [http://www.eclipse.org/ Eclipse], which is supported by Robocode. Eclipse is a very popular IDE that comes free of charge, and which supports SVN access to the sources, a rich source code editor, automatic compilation, has a big supporting community, lot's of plugins, and much much more.&lt;br /&gt;
&lt;br /&gt;
This guide assumes that you have some basic knowledge about how to download, install and use Eclipse. Hence, this guide will not teach you how to use Eclipse, but rather focus on how to build Robocode within Eclipse. The same applies to other tools used within this guide.&lt;br /&gt;
&lt;br /&gt;
Please notice that you do not have to be an expert in Eclipse, Subversion, and Maven. But you need some basic knowledge about these in order to understand how to build Robocode. In fact, trying to build Robocode might actually be a very good way of learning these tools, if you don't know them already or miss some practical experience with these.&lt;br /&gt;
&lt;br /&gt;
You don't have to worry too much about how to setup Eclipse for Robocode as the provided sources in SVN contains all configuration files needed by Eclipse. Some of these files are generated using Maven's build-in support for Eclipse. However, you still need to do some basic pre-configuration of Eclipse before you'll be able to get started with working on Robocode. You should only need to set up a workspace for Robocode once. However, you will need to update the sources from SVN once in a while and merge these with your local changes in order to keep up-to-date with the current versions of Robocode - at least if you work on the trunk/head branch of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
=== Software Requirements ===&lt;br /&gt;
&lt;br /&gt;
'''Required:'''&lt;br /&gt;
* Sun JDK 5.0 ([http://java.sun.com/javase/downloads/index_jdk5.jsp download]).&lt;br /&gt;
* Eclipse Classic 3.4.1 or newer ([http://www.eclipse.org/downloads/ download]).&lt;br /&gt;
* A Subversion client like TortoiseSVN 1.5.7 or newer ([http://tortoisesvn.net/downloads download]) (for Windows) ... or CollabNet Subversion Command-Line Client v1.5.5 ([http://www.collab.net/downloads/subversion/ download]) for Windows and Linux.&lt;br /&gt;
&lt;br /&gt;
'''Highly Recommended:'''&lt;br /&gt;
* [http://www.eclipse.org/subversive/ Eclipse Subversive] 0.7.3 or newer (installation procedure described later) or [http://subclipse.tigris.org/ Subclipse] 1.4.7 or newer (installation procedure is not described in this guide).&lt;br /&gt;
&lt;br /&gt;
==== Install Sun JDK 5.0 ====&lt;br /&gt;
&lt;br /&gt;
First you must ensure that the Sun JDK 5.0 is available on your system. If not, you need to install Sun JDK 5.0 before installing Eclipse, which requires a JDK. Please notice that you must install the '''JDK''' (Java Developer Kit), and ''not'' just the JRE (Java Runtime Environment) as the JRE is insufficient for building Robocode.&lt;br /&gt;
&lt;br /&gt;
It is important that the Java vendor is '''Sun''' in order to guarantee that you'll not run into some unexpected problems when using the Java compiler etc. Most problems caused by building Robocode (and when compiling robots for Robocode) is caused by Java versions from another vendor than Sun. Also make sure that you use '''version 5.0''' of the JDK, not a never version like e.g. the JDK 6. Otherwise. you'll not be able to build the sources of Robocode - at least not without fixing all the compiler errors due to the switch from Java 5.0 into Java 6.&lt;br /&gt;
&lt;br /&gt;
When installing the JDK, it is highly recommended that you '''install the sources provided for Java''' as these are very useful when debugging inside Robocode. However, this is not a requirement.&lt;br /&gt;
&lt;br /&gt;
==== Set the Environment Settings for Java ====&lt;br /&gt;
&lt;br /&gt;
You must set up the environment variable named '''JAVA_HOME''' in your system environment, e.g. &amp;lt;code&amp;gt;JAVA_HOME=&amp;quot;C:\Program Files\Java\jdk1.5.0_16&amp;quot;&amp;lt;/code&amp;gt; (on Windows) or &amp;lt;code&amp;gt;JAVA_HOME=&amp;quot;/usr/local/Java/jdk1.5.0_16&amp;quot;&amp;lt;/code&amp;gt; (on Linux). In addition, you must add JAVA_HOME\bin (on Windows) to your '''PATH''' environment variable, e.g. &amp;lt;code&amp;gt;PATH=%PATH%;%JAVA_HOME%\bin&amp;lt;/code&amp;gt; (on Windows), and &amp;lt;code&amp;gt;PATH=$PATH:$JAVA_HOME/bin&amp;lt;/code&amp;gt; (on Linux). This must be done as Maven is depending on the JAVA_HOME environment variable, and must know where to locate the JDK.&lt;br /&gt;
&lt;br /&gt;
If you want more information of how to set up your JAVA_HOME and PATH environment variables for your specific OS, please read the installation notes provided for the Sun JDK 5.0 here:&lt;br /&gt;
&lt;br /&gt;
'''Installation Notes from Sun:'''&lt;br /&gt;
* [http://java.sun.com/j2se/1.5.0/install.html Java Platform Installation]: Find installation notes for Windows, Linux, and Solaris.&lt;br /&gt;
* [http://java.sun.com/j2se/1.5.0/system-configurations.html Supported System Configurations]: Find the installation notes for ''all'' supported systems.&lt;br /&gt;
&lt;br /&gt;
==== Install Eclipse ====&lt;br /&gt;
&lt;br /&gt;
When the Sun JDK 5.0 is ready on your system, you must install the Eclipse 3.4 if it is not available on your system already. Please notice that older versions of Eclipse, like e.g. Eclipse 3.2 provided with Ubuntu 8.10, will not work with the setup used in this guideline. Consult the installation notes provided for Eclipse in order to find out how to install Eclipse 3.4 for your specific OS.&lt;br /&gt;
&lt;br /&gt;
==== Create a workspace for Robocode ====&lt;br /&gt;
&lt;br /&gt;
The first time you start up Eclipse it will ask for a directory for your workspace. I suggest that you create a workspace named '''robocode-workspace''' or similar and create the workspace on a partition or directory like e.g. &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; (on Windows) or &amp;lt;code&amp;gt;~&amp;lt;/code&amp;gt; (on Linux) - or any other directory of your choice. If you have already got a workspace, e.g. the default one suggested by Eclipse, you can create a new workspace if you wish by selecting 'File' -&amp;gt; 'Switch Workspace' -&amp;gt; 'Other...' from the menu.&lt;br /&gt;
&lt;br /&gt;
==== Use Subversive or Subclipse ====&lt;br /&gt;
&lt;br /&gt;
The next step (which is optional) is to install [http://www.eclipse.org/subversive/ Subversive] or [http://subclipse.tigris.org/ Subclipse] into Eclipse in order to get direct access to the sources of Robocode in the SVN repository. Notice, you'll only have read access to the sources. Also notice, that you don't have to install the Subversive or Subclipse as long as you use another Subversion client. However, it makes life easier when you work within Eclipse.&lt;br /&gt;
&lt;br /&gt;
I recommend you to use Subversive that has proven to be very stable within Eclipse 3.4.1. In the following you can read how to install Subversive into Eclipse.&lt;br /&gt;
&lt;br /&gt;
==== How to install Subversive ====&lt;br /&gt;
&lt;br /&gt;
In order to install Subversive into Eclipse, you can choose between using the Update Site or Archived Update Site. You can get more information [http://www.polarion.com/products/svn/subversive.php?src=eclipseproject here]. You'll need to install:&lt;br /&gt;
&lt;br /&gt;
* Subversive SVN Team Provider Plugin 0.7.3 or newer.&lt;br /&gt;
* SVNKit 1.2.0 or newer, which is a Subversive SVN Connector. At least one Subversive SVN Connector is required. Note that you might gain speed by using another SVN Connector like e.g. the Native JavaHL 1.5.0 or never.&lt;br /&gt;
&lt;br /&gt;
In the following, we will use the Update Site for installing Subversive:&lt;br /&gt;
&lt;br /&gt;
# In Eclipse you must select 'Help' -&amp;gt; 'Software Updates...'' from the menu.&lt;br /&gt;
# Then you select the 'Available Software' tab&lt;br /&gt;
# Press the 'Add Site...' button, and enter http://download.eclipse.org/technology/subversive/0.7/update-site/ into the text field and press OK or enter. Notice, that this update site might change, so might have to get the updated URL to the Update Site from [http://www.polarion.com/products/svn/subversive.php?src=eclipseproject here].&lt;br /&gt;
## Unfold the site you just added and put a checkmark in the 'Subversive SVN Team Provider Plugin'.&lt;br /&gt;
# Again, press the 'Add Site...' button, and enter http://www.polarion.org/projects/subversive/download/eclipse/2.0/update-site/ into the text field and press OK or enter. Notice, that this update site might change, so might have to get the updated URL to the Update Site from [http://www.polarion.com/products/svn/subversive.php?src=eclipseproject here].&lt;br /&gt;
## Unfold the site you just added and put a checkmark in the 'SVNKit 1.2.0' or 'JavaHL 1.5.0' (or never versions) under the 'Subversive SVN Connectors' tree (you can also use a newer version of the SVN Connector of course).&lt;br /&gt;
# Press 'Install' and follow the instruction given by Eclipse to install the plugins. It will ask if you wish to restart Eclipse, and I recommend you to answer 'yes' in order to restart Eclipse.&lt;br /&gt;
# Now, Subversive is ready to be used.&lt;br /&gt;
&lt;br /&gt;
=== Setup the Robocode workspace step by step ===&lt;br /&gt;
&lt;br /&gt;
In the following steps I assume that you now have the JDK, Eclipse, TortoiseSVN or CollabNet Subversion, and Subversive or Subversion up and running. I also assume that the current workspace is set to Robocode workspace; otherwise you should change it to your Robocode workspace. The following steps describes how to setup your workspace for Robocode and how to extract the Robocode sources from the SVN (Subversion).&lt;br /&gt;
&lt;br /&gt;
==== Checkout sources from the SVN ====&lt;br /&gt;
&lt;br /&gt;
Remember the workspace you created for Eclipse in an earlier step? Now, you should navigate into this root folder from your desktop, i.e. not from a command prompt or shell. From within the root folder of your robocode workspace you right-click and select 'SVN Checkout'. A window will pop up, and now you must enter the branch of Robocode you want to work on. That would typically be the trunk or head of the sources, which is the main branch containining the newest sources of Robocode. However, you might also want to check of a specific version of Robocode or some other branch available.&lt;br /&gt;
&lt;br /&gt;
If you want to checkout the sources for the trunk/head, you must use this URL:&lt;br /&gt;
  http://robocode.googlecode.com/svn/robocode/trunk/&lt;br /&gt;
&lt;br /&gt;
If you instead want to checkout the sources for a specific Robocode version, you must use this URL:&lt;br /&gt;
  http://robocode.googlecode.com/svn/robocode/tags/VER_X_X_X&lt;br /&gt;
..where X_X_X must be replaced with a real version number, e.g. '1_5_3' for version 1.5.3&lt;br /&gt;
&lt;br /&gt;
When you have entered or copy-and-pasted the URL into the checkout window you press OK. Now all the sources of the selected branch will be checked out from the SVN.&lt;br /&gt;
&lt;br /&gt;
==== Preparing command-line tools ====&lt;br /&gt;
&lt;br /&gt;
In order to make it build Robocode, batch files / shell scripts have been provided to make trivial tasks easier. For example, you don't need to install tools like Maven, Ant, JUnit, Jacobe yourself. You just run 'loadTools' from the command-line, and it will download required files from the Robocode site so you are able to use these tools from script files.&lt;br /&gt;
&lt;br /&gt;
Hence, you must run the 'loadTools' script from the command line. From a command-promt or shell you must go into the root folder of your robocode workspace. Next you run the loadTools script.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  cd tools&lt;br /&gt;
  loadTools&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  cd ./tools&lt;br /&gt;
  ./loadTools.sh&lt;br /&gt;
&lt;br /&gt;
==== Preparing your workspace for Eclipse ====&lt;br /&gt;
&lt;br /&gt;
Next we must prepare your workspace for Eclipse. Eclipse needs the project files, class files, and other configuration files in order order to let you view, edit, and compile Robocode. Maven provides support for using Eclipse with Maven. You can read more about this here:&lt;br /&gt;
&lt;br /&gt;
* [http://maven.apache.org/guides/mini/guide-ide-eclipse.html Guide to using Eclipse with Maven 2.x]&lt;br /&gt;
&lt;br /&gt;
I highly recommend you to read this in order to understand how Eclipse and Maven works together.&lt;br /&gt;
&lt;br /&gt;
First, we need to create all the required Eclipse files, which we do with another Maven command.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvn eclipse:eclipse&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  ./mvn.sh eclipse:eclipse&lt;br /&gt;
&lt;br /&gt;
Next, you should compile the sources of Robocode in order to have your local Maven repository created and prepared for later.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvn compile&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  ./mvn.sh compile&lt;br /&gt;
&lt;br /&gt;
Now your Robocode workspace is ready almost ready. You just need to import all the projects into your Eclipse workspace. You do this by starting up Eclipse with your Robocode workspace. From the menu bar you select 'File' -&amp;gt; 'Import...' -&amp;gt; 'Existing Projects into Workspace'. Now select the root directory to be the root path of your Robocode workspace. You should see a list of Robocode project. When you do, you must press 'Finish'.&lt;br /&gt;
&lt;br /&gt;
==== M2_REPO class path variable ====&lt;br /&gt;
&lt;br /&gt;
The last thing you need to do is to set up the M2_REPO class path variable for Eclipse, so Eclipse knows where to locate the Maven repository. When building Robocode using Maven, Maven will download all required classes from other sites into this local Maven repository. Hence, Eclipse needs to know the class path for this Maven repository in order to compile all the sources of Robocode. So you need to locate your local Maven repository. Under Windows your Maven repository is put into your %USERPROFILE% directory, and on Linux is put into your home directory (~).&lt;br /&gt;
&lt;br /&gt;
In Eclipse, you go to the menu bar and select 'Window' -&amp;gt; 'Preferences'. On the Preferences window expand the 'Java' -&amp;gt; 'Build Path' and select the 'Classpath Variables'. On the page for the Classpath Variables, you click on the 'New...' button, and enter ''M2_REPO'' as name. Next, you click on the 'Folder...' button and navigate to where you have your .m2/repository directory located (in %USERPROFILE% under Windows, and ~ under Linux), e.g. &amp;lt;code&amp;gt;H:/Users/Flemming/.m2/repository&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/home/fnl/.m2/repository&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
When Eclipse ask you if you want to rebuild the workspace, you select 'Yes' in order to rebuild everything so you are ready to work on Robocode.&lt;br /&gt;
&lt;br /&gt;
==== How to start Robocode in Eclipse? ====&lt;br /&gt;
&lt;br /&gt;
When all sources builds without errors (warnings are expected), you are able to launch Robocode. You do this by selecting 'Run' -&amp;gt; 'Run Configurations...' from th Menu. On the window that shows up, you expand the 'Java Applications', select 'Robocode', and press the 'Run' button.&lt;br /&gt;
&lt;br /&gt;
If you need to start other parts of Robocode like e.g. RoboRumble, you need to create a launch configuration for it, in order to be able to launch it. You can read more about how to create your own launch configurations in Eclipse in this [http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.jdt.doc.user/tasks/tasks-java-local-configuration.htm guide]. This guide is also helpful if you want to modify the Robocode.launch configuration available for launching the Robocode game.&lt;br /&gt;
&lt;br /&gt;
==== How to run the unit tests? ====&lt;br /&gt;
&lt;br /&gt;
When you want to run the unit test from within Eclipse, you must do this from the the Package Explorer, where you right-click on the 'robocode.tests' project and select 'Run As' -&amp;gt; 'JUnit Test'. Now all available unit tests will run automatically.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can start the tests from the command-line by standing on your robocode workspace, and write the following Maven command.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvn test install&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  ./mvn.sh test install&lt;br /&gt;
&lt;br /&gt;
==== How to build the distribution files? ====&lt;br /&gt;
&lt;br /&gt;
In order to build the distribution files containing the installer setup file (robocode-x.x.x-setup.jar) and a .zip file containing all the sources (robocode-x.x.x-src.zip) you start the following batch/shell file wrong the command-line within the robocode workspace directoty.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvnassembly&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  ./mvnassembly.sh&lt;br /&gt;
&lt;br /&gt;
This will build the distribution files, which will be put into the sub-directory named ''target''.&lt;br /&gt;
&lt;br /&gt;
=== Robocode developers and contributions ===&lt;br /&gt;
&lt;br /&gt;
Robocode developers have discussion group at robocode-developers@googlegroups.com. Everybody interested in discussion about future of Robocode are welcome. We also welcome your contributions there. The discussion group is located here: http://groups.google.com/group/robocode-developers.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Robocode/Old Developers Guide for building Robocode|Old version]] of the Developer's Guide for building Robocode for Robocode versions prior to version 1.7.&lt;br /&gt;
* [http://code.google.com/p/robocode/source/browse/ Browse the sources] of Robocode.&lt;br /&gt;
* [http://sourceforge.net/project/showfiles.php?group_id=37202&amp;amp;package_id=218677 Download the sources] of Robocode.&lt;br /&gt;
* [http://groups.google.com/group/robocode-developers Robocode developers discussion group].&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* The [http://sourceforge.net/projects/robocode Robocode project] on SourceForge.&lt;br /&gt;
* [http://sourceforge.net/svn/?group_id=37202 How to access] the SVN Repository for Robocode.&lt;br /&gt;
* [http://www.eclipse.org/ Eclipse] - an open development platform supported by Robocode.&lt;br /&gt;
* [http://maven.apache.org/ Apache Maven] used for building Robocode.&lt;br /&gt;
* [http://maven.apache.org/guides/mini/guide-ide-eclipse.html Guide] to using Eclipse with Maven 2.x.&lt;br /&gt;
* [http://www.eclipse.org/subversive/ Eclipse Subversive] is a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://subclipse.tigris.org/ Subclipse] is also a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://tortoisesvn.net TortoiseSVN], a Subversion client for Windows.&lt;br /&gt;
* [http://www.open.collab.net/downloads/subversion/ CollabNets Subversion], a Subversion client for both Windows and Linux.&lt;br /&gt;
&lt;br /&gt;
[[Category:Robocode Documentation]]&lt;br /&gt;
[[Category:Eclipse IDE]]&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=26808</id>
		<title>Robocode/Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=26808"/>
		<updated>2012-09-18T22:02:44Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: New Developers Guide for building Robocode for Git&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide describes how to build Robocode using [http://git-scm.com/ Git], [http://maven.apache.org Maven] and [http://www.eclipse.org Eclipse].&lt;br /&gt;
&lt;br /&gt;
This guide applies for Robocode version 1.7.4.2 and newer.&lt;br /&gt;
&lt;br /&gt;
== Developer's Guide for building Robocode with Eclipse setup ==&lt;br /&gt;
&lt;br /&gt;
=== Notice ===&lt;br /&gt;
&lt;br /&gt;
This guide is intended for experienced Java developers who want to work on the Robocode game itself, and describes all basic stuff required to compile and run Robocode within the [http://www.eclipse.org Eclipse IDE].&lt;br /&gt;
&lt;br /&gt;
If you just want to browse the sources, you can do it from [https://github.com/robo-code/robocode here] or you can download the zipped sources from [http://sourceforge.net/projects/robocode/files/robocode%20sources/ here].&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
Basically, all you need to get started with building Robocode is:&lt;br /&gt;
&lt;br /&gt;
* Java Developer Kit (JDK) 5.0 or newer ([http://www.oracle.com/technetwork/java/javase/downloads/index.html])&lt;br /&gt;
* The source files of Robocode ([https://github.com/robo-code/robocode])&lt;br /&gt;
* An Internet connection.&lt;br /&gt;
&lt;br /&gt;
Other than that, you need to be a skilled Java developer in order to figure out how Robocode is put together. Robocode is a complex application that requires lots of time to understand and master its internal design.&lt;br /&gt;
&lt;br /&gt;
An Internet connection is required for building Robocode distribution files as the build tool (Maven) needs access to [http://maven.apache.org/guides/introduction/introduction-to-repositories.html remote repositories], which contains various libraries and binaries. Some libraries are used for building Robocode, and other are used for running Robocode, and hence need to be put into the distribution files.&lt;br /&gt;
In order to get updates to the sources of Robocode when new versions emerge, an Internet connection is also critical to download changed sources and merge the changes with your version of the sources etc.&lt;br /&gt;
&lt;br /&gt;
==== Install JDK ====&lt;br /&gt;
&lt;br /&gt;
Robocode is being developed in Java SE, and requires the Java Developer Kit ('''JDK''') to be pre-installed on the system used for building Robocode. Please note that a Java Runtime Environment ('''JRE''') is not enough as it does not contain the required developer tools needed for building Robocode.&lt;br /&gt;
You do not need to use the obsolete JDK 5.0, but the JDK 5.0 is used for the building official releases for Robocode as Java 5.0 is the minimum requirement for running Robocode. Compiling Robocode with the JDK 5.0 guarantees that Robocode will be able to run on Java 5.0. You can get the old Java 5.0 from [http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase5-419410.html#jdk-1.5.0_22-oth-JPR here].&lt;br /&gt;
If you just want to play with the sources, you could use a newer JDK without any trouble. But be aware that you might not be able to run your version of Robocode on older Java versions, if you builld your own version of Robocode.&lt;br /&gt;
Also note that the Sun/Oracle version of the JDK is preferable for building Robocode.&lt;br /&gt;
&lt;br /&gt;
Notice that when installing the JDK, it is highly recommended that you '''install the sources provided for Java''' as the sources are very useful when debugging Robocode. However, this is not a requirement.&lt;br /&gt;
&lt;br /&gt;
==== Set up Java Environment Settings ====&lt;br /&gt;
&lt;br /&gt;
You must set up the environment variable named '''JAVA_HOME''' and extend another environment variable named '''PATH'''. JAVA_HOME must be set up point to the root directory of the JDK to use. PATH is extended in order to locate the Java commands like 'java', 'javac' and lots of other tools in the JDK. This is best practice when setting up the Java development environment, and makes it possible for other tools like e.g. Maven to locate the proper JDK tools. It also makes it possible for you to detirmine which JRE that is being used when running a Java application by writting &amp;lt;code&amp;gt;java -version&amp;lt;/code&amp;gt; in the command-line/shell, and detirmine which Java compiler that is being used by writting &amp;lt;code&amp;gt;javac -version&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
&lt;br /&gt;
'''Windows:'''&lt;br /&gt;
* JAVA_HOME is set to e.g. &amp;lt;code&amp;gt;JAVA_HOME=&amp;quot;C:\Program Files\Java\jdk1.5.0_16&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* PATH is extended, e.g. to &amp;lt;code&amp;gt;PATH=%JAVA_HOME%\bin;PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Linux / *nix:'''&lt;br /&gt;
* JAVA_HOME is set by e.g. &amp;lt;code&amp;gt;export JAVA_HOME=/usr/java/jdk1.5.0_07/bin/java&amp;lt;/code&amp;gt;. (Bash)&lt;br /&gt;
* PATH is extended, e.g. by &amp;lt;code&amp;gt;export PATH=$JAVA_HOME/bin:$PATH&amp;lt;/code&amp;gt;. (Bash)&lt;br /&gt;
&lt;br /&gt;
'''Mac OS X:'''&lt;br /&gt;
* JAVA_HOME is set by e.g. &amp;lt;code&amp;gt;export JAVA_HOME=$(/usr/libexec/java_home)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* PATH is extended, e.g. by &amp;lt;code&amp;gt;export PATH=${JAVA_HOME}/bin:$PATH&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you want more information of how to set up your JAVA_HOME and PATH environment variables for your specific OS, please read the installation notes provided for the Sun JDK 5.0 here:&lt;br /&gt;
&lt;br /&gt;
'''Installation Notes from Sun:'''&lt;br /&gt;
* [http://www.oracle.com/technetwork/java/javase/index-137561.html Installation Notes] for Windows, Linux, Solaris, and Mac.&lt;br /&gt;
* [http://www.oracle.com/technetwork/java/javase/system-configurations-135212.html Certified System Configurations for Java] for ''all'' supported systems.&lt;br /&gt;
&lt;br /&gt;
==== Required technical skills? ====&lt;br /&gt;
&lt;br /&gt;
In order to develop on Robocode, you need to know the basics of these tools:&lt;br /&gt;
&lt;br /&gt;
* Eclipse IDE ([http://www.vogella.com/articles/Eclipse/article.html])&lt;br /&gt;
* Git and GitHub ([http://www.vogella.com/articles/Git/article.html])&lt;br /&gt;
* Maven ([http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html Maven in 5 Minutes])&lt;br /&gt;
&lt;br /&gt;
Notice that you do not have to be an expert in Eclipse, Git/GitHub, and Maven. But you need some basic knowledge about these tools to understand how to build Robocode. In fact, trying to build Robocode might actually be a very good way of learning these tools, if you don't know them already or miss some practical experience with these. :-)&lt;br /&gt;
&lt;br /&gt;
When you need to start editing the sources of Robocode, you naturally might want to use an IDE for compiling and run Robocode on the fly to quickly see the effect of your work. This is where [http://www.eclipse.org Eclipse IDE] comes into the picture for this guide, as many Java developers regards the Eclipse IDE as the best IDE for Java development. Eclipse comes free of charge, has a huge community, automatic compilation, a rich source code editor, a flexible window layout, and lots of plug-ins. Eclipse has been choosen as the primary IDE for building Robocode, and thus this guide only describes how to setup and build Robocode with this IDE.&lt;br /&gt;
If you want to use another IDE for developing Robocode you need to figure out how to set it up by yourself based on the details from this guide. And you are more than welcome to add a page beside this article that described how to setup everything for IDE of your choise and link to it from this article. :-)&lt;br /&gt;
&lt;br /&gt;
All sources of Robocode are available at [https://github.com/robo-code/robocode GitHub]. At GitHub, you can download sources as a zipped file or create your own [https://help.github.com/articles/fork-a-repo clone/fork], if you want to.&lt;br /&gt;
&lt;br /&gt;
Even though Maven is used as build tool, you don't need to pre-install it on your system. Batch (.bat) and shell (.sh) files are provided with the source files. These scripts will automatically download required libraries, scripts and tools required for building Robocode. Hence, no tools needs to be pre-installed in order to build Robocode beside the JDK and correct environment settings for JAVA_HOME and PATH.&lt;br /&gt;
&lt;br /&gt;
Notice that the shell scripts (.sh files) should work under Unix and *nix like OSes including Max OS X. However, the shell scripts have only been tested under Linux (on Ubuntu), so there is no guarantee that these will run without issues on other *nix systems.&lt;br /&gt;
&lt;br /&gt;
You don't have to worry too much about how to setup Eclipse for Robocode as the provided sources contains all configuration files needed by Eclipse. Some of these files are generated using Maven's build-in support for Eclipse. However, you will need to do some basic pre-configuration of Eclipse before you'll be able to get started with working on Robocode. You should only need to set up a workspace for Robocode once. However, you will need to update the sources from the remote repository on GitHub once in a while, and merge changes with your sources in order to keep up-to-date with the current versions of Robocode, i.e. the trunk/head of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
=== Checking out sources from GitHub ===&lt;br /&gt;
&lt;br /&gt;
In the following, I assume that you want to ''check out'' the sources from GitHub using some [http://git-scm.com/downloads Git client].  This could be one of the Git GUI Clients (''git-gui'') recommended [http://git-scm.com/downloads/guis here].&lt;br /&gt;
You don't necessarily need a Git client for building Robocode, as you could simply get the sources from a plain .zip file. However, if you want to update your local source files with the newest sources from the Git repository and the ability to commit and/or merge changes, you will need to use some Git client in order to get access to files beside the files inside (Eclipse) project directories, e.g. if you want to check out the scripts located in the root of the Git repository for Robocode.&lt;br /&gt;
&lt;br /&gt;
The URL of the sources at GitHub is:&lt;br /&gt;
[https://github.com/robo-code/robocode.git https://github.com/robo-code/robocode.git]&lt;br /&gt;
&lt;br /&gt;
==== How to build distribution files? ====&lt;br /&gt;
&lt;br /&gt;
In order to build the distribution files containing the installer setup file (robocode-x.x.x-setup.jar) and a .zip file containing all the sources (robocode-x.x.x-src.zip) you call the '''mvnassembly''' script from the command-line when standing within the root directory of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvnassembly&lt;br /&gt;
&lt;br /&gt;
On *nix:&lt;br /&gt;
  ./mvnassembly.sh&lt;br /&gt;
&lt;br /&gt;
This will build the distribution files, which will be put into the sub-directory named ''robocode.distribution/target''.&lt;br /&gt;
'''mvnassembly''' is a script that compiles all sources of the Robocode game, creates javadoc html files, run test units, and finally creates the target distribution files. The first time this script is run, it will need to download a huge amount of .jar files from various Maven repositories and which contains plugins etc. used for building Robocode. So please be patient with it the first time.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Eclipse for developing on Robocode ===&lt;br /&gt;
&lt;br /&gt;
Here follows a description of how to setup Eclipse for developing on Robocode.&lt;br /&gt;
&lt;br /&gt;
==== Software Requirements for Eclipse IDE ====&lt;br /&gt;
&lt;br /&gt;
Here follows the recommended software needed to start developing on Robocode with the Eclipse IDE:&lt;br /&gt;
&lt;br /&gt;
'''Required:'''&lt;br /&gt;
* Java 6 JRE/JDK or newer ([http://www.oracle.com/technetwork/java/javase/downloads/index.html download])&lt;br /&gt;
* Eclipse Classic 4.2 (Juno) or newer ([http://www.eclipse.org/downloads/ download]). An older version of Eclipse, e.g. Eclipse 3.7 should also be sufficient.&lt;br /&gt;
&lt;br /&gt;
'''Highly Recommended:'''&lt;br /&gt;
* [http://eclipse.github.com/ GitHub for Eclipse] named [http://www.eclipse.org/egit/ EGit] 2.0.0, which is a Eclipse plug-in (installation procedure is described later).&lt;br /&gt;
&lt;br /&gt;
In order to run the Eclipse IDE, a Java 6 JRE or JDK should is required/recommended. That is, the Juno release of Eclipse has been [http://www.eclipse.org/eclipse/development/readme_eclipse_4.2.html#TargetOperatingEnvironments tested] with Java 6 and Java 7.&lt;br /&gt;
&lt;br /&gt;
The version numbers just provided here are as a kind of guarantee that these will work with the present version of Robocode (1.7.4.2) and counts for reference for this guide.&lt;br /&gt;
&lt;br /&gt;
Please consult the [http://wiki.eclipse.org/Eclipse/Installation#Install_a_JVM installation notes] provided for Eclipse in order to find out how to install Eclipse for your specific OS.&lt;br /&gt;
&lt;br /&gt;
==== Create a workspace for Robocode ====&lt;br /&gt;
&lt;br /&gt;
When you have setup and installed Eclipse on your system (if you did not have it on your system already), a workspace must be created for Robocode.&lt;br /&gt;
&lt;br /&gt;
The first time you start up a newly installed Eclipse, it will ask for a directory for your workspace. I suggest that you create a workspace named '''robocode-workspace''' or similar and create the workspace on a partition or directory like e.g. &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; (on Windows) or &amp;lt;code&amp;gt;~&amp;lt;/code&amp;gt; (on Linux) - or any other directory of your choice. If you have already got a workspace, e.g. the default one suggested by Eclipse, you can create a new workspace if you wish by selecting 'File' -&amp;gt; 'Switch Workspace' -&amp;gt; 'Other...' from the menu.&lt;br /&gt;
&lt;br /&gt;
==== M2_REPO class path variable ====&lt;br /&gt;
&lt;br /&gt;
One of the first things you need to do in Eclipse is to set up the '''M2_REPO''' class path variable for Eclipse, which points to your local Maven 2 repository. That is, Eclipse uses the M2_REPO class path variable for locating the Maven repository containing various libraries used for compiling Robocode etc. But before you can setup the M2_REPO class path in Eclipse, you must run the 'mvnassembly' command described earlier if you have not already done that.&lt;br /&gt;
&lt;br /&gt;
When calling the 'mvnassembly' script or alternatively start off Maven within the root of the robocode sources by calling e.g. 'mvn clean install', Maven will download all required libraries from other sites into your local Maven repository. Note that you will need to locate your local Maven repository. Under Windows your Maven repository is put into your %USERPROFILE% directory, and on Linux is put into your home directory (~).&lt;br /&gt;
&lt;br /&gt;
To setup the M2_REPO class path in Eclipse, you must go to the menu bar and select 'Window' -&amp;gt; 'Preferences'. On the Preferences window expand the 'Java' -&amp;gt; 'Build Path' and select the 'Classpath Variables'. On the page for the Classpath Variables, you click on the 'New...' button, and enter ''M2_REPO'' as name. Next, you click on the 'Folder...' button and navigate to where you have your .m2/repository directory located (in %USERPROFILE% under Windows, and ~ under Linux), e.g. &amp;lt;code&amp;gt;H:/Users/Flemming/.m2/repository&amp;lt;/code&amp;gt; (Windows) or &amp;lt;code&amp;gt;/home/fnl/.m2/repository&amp;lt;/code&amp;gt; (Linux).&lt;br /&gt;
&lt;br /&gt;
If or when Eclipse ask you if you want to rebuild the workspace, you select 'Yes'.&lt;br /&gt;
&lt;br /&gt;
==== Configure JRE/JDK for your workspace ====&lt;br /&gt;
&lt;br /&gt;
You must setup which JRE/JDK that will be used for compiling (and running) Robocode in your workspace.&lt;br /&gt;
You do this by...&lt;br /&gt;
# selecting Window -&amp;gt; Preferences from the menu, and then unfold and select Java -&amp;gt; Installed JREs and press 'Add...' on the 'Installed JREs' page.&lt;br /&gt;
# Select 'Standard VM' on the 'JRE Type' page and press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# Press the 'Directory...' button and browse to where you have installed your JDK 5 or 6 (JDK 5 is preferable when developing on Robocode) and press 'Finish' or Enter. Make sure to select a JDK and ''not'' just a JRE.&lt;br /&gt;
# When you get back to the 'Installed JREs' page, make sure to put a check mark in the JDK you just added and press 'OK' or Enter.&lt;br /&gt;
&lt;br /&gt;
==== Using EGit for accessing the sources on GitHub ====&lt;br /&gt;
&lt;br /&gt;
The next step (which is optional) is to install [http://www.eclipse.org/egit/ Egit] into Eclipse in order to get direct access to the sources of Robocode in the GitHub repository. Notice, you'll only have read access to the sources, but could make your own Git repository if you wish to. Also notice, that you don't need to install EGit in Eclipse in order to work with the sources, as you could simply copy and import the Robocode sources into your workspace. However, it makes life easier using EGit, as you will be able to get changes made to Robocode and merge this into your local sources.&lt;br /&gt;
 &lt;br /&gt;
==== Install EGit into Eclipse ====&lt;br /&gt;
&lt;br /&gt;
A description of how to install EGit into Eclipse is provided [http://www.eclipse.org/egit/download/ here]. But if you are not familiar with how it is done, a description is follows here:&lt;br /&gt;
&lt;br /&gt;
# In Eclipse you must select 'Help' -&amp;gt; 'Intall New Software...' from the menu.&lt;br /&gt;
# Enter ''http://download.eclipse.org/egit/updates/'' into the 'Work with:' text field and press the 'Add' button or the enter key. Notice, that this update site might change, so you might have to get the updated URL from [http://www.eclipse.org/egit/download/ here] and use the one that is recommended.&lt;br /&gt;
# Now, unfold the 'Eclipse EGit Team Provider' that appears in the list below the update site you just entered.&lt;br /&gt;
# Put a checkmark into you just added and put a checkmark for the 'Eclipse EGit' and press the 'Next' button.&lt;br /&gt;
# Press 'Finish' on the window that follows and follow the instructions given by Eclipse to install this plugin. It will ask if you wish to restart Eclipse, and I recommend you to answer 'yes' in order to restart Eclipse.&lt;br /&gt;
# When Eclipse has been restarted, EGit will be ready to be used in Eclipse.&lt;br /&gt;
&lt;br /&gt;
==== Importing sources of Robocode using EGit ====&lt;br /&gt;
&lt;br /&gt;
Importing the projects for Robocode into Eclipse from Git can be done from the Package Explorer, which can be opened from the menu by selecting Window -&amp;gt; Show View -&amp;gt; Package Explorer or by using the keyboard shortcut by pressing Alt+Shift+Q and P. In the Package Explorer, you...&lt;br /&gt;
&lt;br /&gt;
# Right-click the mouse and select 'Import...' in the popup menu that occurs.&lt;br /&gt;
# Unfold 'Git' in the 'Import' window and double-click 'Projects from Git'.&lt;br /&gt;
# On the 'Import Projects from Git' you select 'URI'.&lt;br /&gt;
# On the next page named 'Source Git Repository' to enter '''https://github.com/robo-code/robocode.git''' into the 'URI:' text field and press Enter or 'Next &amp;gt;'.&lt;br /&gt;
# On the 'Branch Selection' page you press 'Deselect All' and select the branch you want to work on. This would normally be 'master', which is the master branch of Robocode. When the branch selection is made, you press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# On the 'Local Destination' page, you must note the directory where your local files will be put. I recommend you use the directory suggested by EGit (Eclipse) and press 'Finish' or Enter.&lt;br /&gt;
# On the 'Select a wizard to use for importing projects', make sure 'Import existing projects' is selected and press 'Next &amp;gt;' or Enter.&lt;br /&gt;
# On 'Import Projects', you should deselect the first project named 'plugins' as you would normally not want to develop on plugins for Robocode - otherwise just omit deselecting 'plugins'. Press 'Finish' or Enter.&lt;br /&gt;
# All Robocode projects will now be imported into Eclipse and be visible in the Package Explorer.&lt;br /&gt;
# Now, select all projects (press Ctrl+A) and right-click the Package Explorer and select Replace With -&amp;gt; HEAD Revision on the popup menu that occurs, and press 'OK' or Enter to discard local changes on the dialog that appears.&lt;br /&gt;
&lt;br /&gt;
Congratulations, you should now be able to get started working on the Robocode sources in Eclipse. :-)&lt;br /&gt;
&lt;br /&gt;
==== Launch Robocode ====&lt;br /&gt;
&lt;br /&gt;
Before launching Robocode for the first time, you should make sure that it is cleaned and compiled first. You do this by selecting Project -&amp;gt; Clean... from the menu. You should also make sure that you have run the 'mvnassembly' described previously, which will download and update your local Maven repository, which is necessary for compiling and running Robocode.&lt;br /&gt;
&lt;br /&gt;
Please notice that it might be necessary to refresh the sources in Eclipse when files are changed outside the Eclipse editor, which is the case when running the 'mvnassembly' script. You can do this from the Package Explorer by right-clicking in this and select 'Refresh'.&lt;br /&gt;
&lt;br /&gt;
In order to start running or debugging Robocode, you should select the &amp;quot;Bug&amp;quot; (debug) or &amp;quot;Play&amp;quot; (run) button in the top of Eclipse under the menu. You should press the little arrow beside these green buttons in order to choose among: Robocode, RoboRumble, TeamRumble, and MeleeRumble. The 3 last ones are for running the RoboRumble@Home clients.&lt;br /&gt;
&lt;br /&gt;
==== How to run the unit tests? ====&lt;br /&gt;
&lt;br /&gt;
When you want to run the unit test from within Eclipse, you must do this from the the Package Explorer, where you right-click on the 'robocode.tests' project and select 'Run As' -&amp;gt; 'JUnit Test'. Now all available unit tests will run automatically.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can start the tests from the command-line by standing on your robocode workspace, and write the following Maven command.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvn test install&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  ./mvn.sh test install&lt;br /&gt;
&lt;br /&gt;
=== Robocode developers and contributions ===&lt;br /&gt;
&lt;br /&gt;
Robocode developers have discussion group at robocode-developers@googlegroups.com. Everybody interested in discussion about future of Robocode are welcome. We also welcome your contributions there. The discussion group is located here: http://groups.google.com/group/robocode-developers.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Robocode/Old Developers Guide for building Robocode|Old version]] of the Developer's Guide for building Robocode for Robocode versions prior to version 1.7.&lt;br /&gt;
* [http://code.google.com/p/robocode/source/browse/ Browse the sources] of Robocode.&lt;br /&gt;
* [http://sourceforge.net/project/showfiles.php?group_id=37202&amp;amp;package_id=218677 Download the sources] of Robocode.&lt;br /&gt;
* [http://groups.google.com/group/robocode-developers Robocode developers discussion group].&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* The [http://sourceforge.net/projects/robocode Robocode project] on SourceForge.&lt;br /&gt;
* [http://sourceforge.net/svn/?group_id=37202 How to access] the SVN Repository for Robocode.&lt;br /&gt;
* [http://www.eclipse.org/ Eclipse] - an open development platform supported by Robocode.&lt;br /&gt;
* [http://maven.apache.org/ Apache Maven] used for building Robocode.&lt;br /&gt;
* [http://maven.apache.org/guides/mini/guide-ide-eclipse.html Guide] to using Eclipse with Maven 2.x.&lt;br /&gt;
* [http://www.eclipse.org/subversive/ Eclipse Subversive] is a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://subclipse.tigris.org/ Subclipse] is also a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://tortoisesvn.net TortoiseSVN], a Subversion client for Windows.&lt;br /&gt;
* [http://www.open.collab.net/downloads/subversion/ CollabNets Subversion], a Subversion client for both Windows and Linux.&lt;br /&gt;
&lt;br /&gt;
[[Category:Robocode Documentation]]&lt;br /&gt;
[[Category:Eclipse IDE]]&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Robocode/Old_Developers_Guide_for_building_Robocode&amp;diff=26807</id>
		<title>Robocode/Old Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Robocode/Old_Developers_Guide_for_building_Robocode&amp;diff=26807"/>
		<updated>2012-09-18T22:01:31Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: Moved Robocode/Developers Guide for building Robocode -&amp;gt; Robocode/Old Developers Guide for building Robocode&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide describes how to build the Robocode game using [http://www.eclipse.org Eclipse].&lt;br /&gt;
&lt;br /&gt;
This guide is valid from Robocode version 1.7. If you want to build older versions of Robocode you must use the old version of the developer's guide available [[Robocode/Old Developers Guide for building Robocode|here]].&lt;br /&gt;
&lt;br /&gt;
== Developer's Guide for building Robocode using Eclipse ==&lt;br /&gt;
&lt;br /&gt;
=== Notice ===&lt;br /&gt;
&lt;br /&gt;
This guide is intended for experienced Java developers who want to work on the Robocode game itself. This guide describes all the basic stuff in order to compile and run Robocode using the Eclipse IDE.&lt;br /&gt;
&lt;br /&gt;
If you just want to browse the sources, you can do it [http://code.google.com/p/robocode/source/browse/ here] or you can download the zipped sources from [http://sourceforge.net/project/showfiles.php?group_id=37202&amp;amp;package_id=218677 here].&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
All sources of Robocode are available in the [http://code.google.com/p/robocode/source/browse/ SVN Repository] for the [http://sourceforge.net/projects/robocode Robocode project] on SourceForge (SF). You can read about how to access the SVN Repository for Robocode [http://code.google.com/p/robocode/source/checkout here]. Subversion (SVN) 1.5 is being used as the Version Control System used for Robocode.&lt;br /&gt;
&lt;br /&gt;
Basically, all you need is the sources of Robocode, which can be downloaded as a .zip file or downloaded from the Subversion repository, and [http://maven.apache.org/ Maven] installed. Maven is being used in order to build everything in the Robocode project. However, if you want to work with the sources of Robocode, you might of course want to use an IDE for compiling and run Robocode on the fly to see the effect of your work.&lt;br /&gt;
&lt;br /&gt;
Batch files and shell scripts are provided for building Robocode under Windows and Linux (including Mac OS X). These scripts have been developed for Windows XP/Vista and Ubuntu 8.10 (Linux). Please notice that the Linux setup should also work for e.g. Solaris, FreeBSD etc.&lt;br /&gt;
&lt;br /&gt;
=== What skills do you need? ===&lt;br /&gt;
&lt;br /&gt;
* Eclipse ([https://eclipse-tutorial.dev.java.net/ Eclipse tutorial])&lt;br /&gt;
* Subversion ([http://svnbook.red-bean.com/ Subversion book])&lt;br /&gt;
* Maven ([http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html Maven in 5 Minutes])&lt;br /&gt;
&lt;br /&gt;
This guide is focusing on how to build and run Robocode using the [http://www.eclipse.org/ Eclipse], which is supported by Robocode. Eclipse is a very popular IDE that comes free of charge, and which supports SVN access to the sources, a rich source code editor, automatic compilation, has a big supporting community, lot's of plugins, and much much more.&lt;br /&gt;
&lt;br /&gt;
This guide assumes that you have some basic knowledge about how to download, install and use Eclipse. Hence, this guide will not teach you how to use Eclipse, but rather focus on how to build Robocode within Eclipse. The same applies to other tools used within this guide.&lt;br /&gt;
&lt;br /&gt;
Please notice that you do not have to be an expert in Eclipse, Subversion, and Maven. But you need some basic knowledge about these in order to understand how to build Robocode. In fact, trying to build Robocode might actually be a very good way of learning these tools, if you don't know them already or miss some practical experience with these.&lt;br /&gt;
&lt;br /&gt;
You don't have to worry too much about how to setup Eclipse for Robocode as the provided sources in SVN contains all configuration files needed by Eclipse. Some of these files are generated using Maven's build-in support for Eclipse. However, you still need to do some basic pre-configuration of Eclipse before you'll be able to get started with working on Robocode. You should only need to set up a workspace for Robocode once. However, you will need to update the sources from SVN once in a while and merge these with your local changes in order to keep up-to-date with the current versions of Robocode - at least if you work on the trunk/head branch of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
=== Software Requirements ===&lt;br /&gt;
&lt;br /&gt;
'''Required:'''&lt;br /&gt;
* Sun JDK 5.0 ([http://java.sun.com/javase/downloads/index_jdk5.jsp download]).&lt;br /&gt;
* Eclipse Classic 3.4.1 or newer ([http://www.eclipse.org/downloads/ download]).&lt;br /&gt;
* A Subversion client like TortoiseSVN 1.5.7 or newer ([http://tortoisesvn.net/downloads download]) (for Windows) ... or CollabNet Subversion Command-Line Client v1.5.5 ([http://www.collab.net/downloads/subversion/ download]) for Windows and Linux.&lt;br /&gt;
&lt;br /&gt;
'''Highly Recommended:'''&lt;br /&gt;
* [http://www.eclipse.org/subversive/ Eclipse Subversive] 0.7.3 or newer (installation procedure described later) or [http://subclipse.tigris.org/ Subclipse] 1.4.7 or newer (installation procedure is not described in this guide).&lt;br /&gt;
&lt;br /&gt;
==== Install Sun JDK 5.0 ====&lt;br /&gt;
&lt;br /&gt;
First you must ensure that the Sun JDK 5.0 is available on your system. If not, you need to install Sun JDK 5.0 before installing Eclipse, which requires a JDK. Please notice that you must install the '''JDK''' (Java Developer Kit), and ''not'' just the JRE (Java Runtime Environment) as the JRE is insufficient for building Robocode.&lt;br /&gt;
&lt;br /&gt;
It is important that the Java vendor is '''Sun''' in order to guarantee that you'll not run into some unexpected problems when using the Java compiler etc. Most problems caused by building Robocode (and when compiling robots for Robocode) is caused by Java versions from another vendor than Sun. Also make sure that you use '''version 5.0''' of the JDK, not a never version like e.g. the JDK 6. Otherwise. you'll not be able to build the sources of Robocode - at least not without fixing all the compiler errors due to the switch from Java 5.0 into Java 6.&lt;br /&gt;
&lt;br /&gt;
When installing the JDK, it is highly recommended that you '''install the sources provided for Java''' as these are very useful when debugging inside Robocode. However, this is not a requirement.&lt;br /&gt;
&lt;br /&gt;
==== Set the Environment Settings for Java ====&lt;br /&gt;
&lt;br /&gt;
You must set up the environment variable named '''JAVA_HOME''' in your system environment, e.g. &amp;lt;code&amp;gt;JAVA_HOME=&amp;quot;C:\Program Files\Java\jdk1.5.0_16&amp;quot;&amp;lt;/code&amp;gt; (on Windows) or &amp;lt;code&amp;gt;JAVA_HOME=&amp;quot;/usr/local/Java/jdk1.5.0_16&amp;quot;&amp;lt;/code&amp;gt; (on Linux). In addition, you must add JAVA_HOME\bin (on Windows) to your '''PATH''' environment variable, e.g. &amp;lt;code&amp;gt;PATH=%PATH%;%JAVA_HOME%\bin&amp;lt;/code&amp;gt; (on Windows), and &amp;lt;code&amp;gt;PATH=$PATH:$JAVA_HOME/bin&amp;lt;/code&amp;gt; (on Linux). This must be done as Maven is depending on the JAVA_HOME environment variable, and must know where to locate the JDK.&lt;br /&gt;
&lt;br /&gt;
If you want more information of how to set up your JAVA_HOME and PATH environment variables for your specific OS, please read the installation notes provided for the Sun JDK 5.0 here:&lt;br /&gt;
&lt;br /&gt;
'''Installation Notes from Sun:'''&lt;br /&gt;
* [http://java.sun.com/j2se/1.5.0/install.html Java Platform Installation]: Find installation notes for Windows, Linux, and Solaris.&lt;br /&gt;
* [http://java.sun.com/j2se/1.5.0/system-configurations.html Supported System Configurations]: Find the installation notes for ''all'' supported systems.&lt;br /&gt;
&lt;br /&gt;
==== Install Eclipse ====&lt;br /&gt;
&lt;br /&gt;
When the Sun JDK 5.0 is ready on your system, you must install the Eclipse 3.4 if it is not available on your system already. Please notice that older versions of Eclipse, like e.g. Eclipse 3.2 provided with Ubuntu 8.10, will not work with the setup used in this guideline. Consult the installation notes provided for Eclipse in order to find out how to install Eclipse 3.4 for your specific OS.&lt;br /&gt;
&lt;br /&gt;
==== Create a workspace for Robocode ====&lt;br /&gt;
&lt;br /&gt;
The first time you start up Eclipse it will ask for a directory for your workspace. I suggest that you create a workspace named '''robocode-workspace''' or similar and create the workspace on a partition or directory like e.g. &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; (on Windows) or &amp;lt;code&amp;gt;~&amp;lt;/code&amp;gt; (on Linux) - or any other directory of your choice. If you have already got a workspace, e.g. the default one suggested by Eclipse, you can create a new workspace if you wish by selecting 'File' -&amp;gt; 'Switch Workspace' -&amp;gt; 'Other...' from the menu.&lt;br /&gt;
&lt;br /&gt;
==== Use Subversive or Subclipse ====&lt;br /&gt;
&lt;br /&gt;
The next step (which is optional) is to install [http://www.eclipse.org/subversive/ Subversive] or [http://subclipse.tigris.org/ Subclipse] into Eclipse in order to get direct access to the sources of Robocode in the SVN repository. Notice, you'll only have read access to the sources. Also notice, that you don't have to install the Subversive or Subclipse as long as you use another Subversion client. However, it makes life easier when you work within Eclipse.&lt;br /&gt;
&lt;br /&gt;
I recommend you to use Subversive that has proven to be very stable within Eclipse 3.4.1. In the following you can read how to install Subversive into Eclipse.&lt;br /&gt;
&lt;br /&gt;
==== How to install Subversive ====&lt;br /&gt;
&lt;br /&gt;
In order to install Subversive into Eclipse, you can choose between using the Update Site or Archived Update Site. You can get more information [http://www.polarion.com/products/svn/subversive.php?src=eclipseproject here]. You'll need to install:&lt;br /&gt;
&lt;br /&gt;
* Subversive SVN Team Provider Plugin 0.7.3 or newer.&lt;br /&gt;
* SVNKit 1.2.0 or newer, which is a Subversive SVN Connector. At least one Subversive SVN Connector is required. Note that you might gain speed by using another SVN Connector like e.g. the Native JavaHL 1.5.0 or never.&lt;br /&gt;
&lt;br /&gt;
In the following, we will use the Update Site for installing Subversive:&lt;br /&gt;
&lt;br /&gt;
# In Eclipse you must select 'Help' -&amp;gt; 'Software Updates...'' from the menu.&lt;br /&gt;
# Then you select the 'Available Software' tab&lt;br /&gt;
# Press the 'Add Site...' button, and enter http://download.eclipse.org/technology/subversive/0.7/update-site/ into the text field and press OK or enter. Notice, that this update site might change, so might have to get the updated URL to the Update Site from [http://www.polarion.com/products/svn/subversive.php?src=eclipseproject here].&lt;br /&gt;
## Unfold the site you just added and put a checkmark in the 'Subversive SVN Team Provider Plugin'.&lt;br /&gt;
# Again, press the 'Add Site...' button, and enter http://www.polarion.org/projects/subversive/download/eclipse/2.0/update-site/ into the text field and press OK or enter. Notice, that this update site might change, so might have to get the updated URL to the Update Site from [http://www.polarion.com/products/svn/subversive.php?src=eclipseproject here].&lt;br /&gt;
## Unfold the site you just added and put a checkmark in the 'SVNKit 1.2.0' or 'JavaHL 1.5.0' (or never versions) under the 'Subversive SVN Connectors' tree (you can also use a newer version of the SVN Connector of course).&lt;br /&gt;
# Press 'Install' and follow the instruction given by Eclipse to install the plugins. It will ask if you wish to restart Eclipse, and I recommend you to answer 'yes' in order to restart Eclipse.&lt;br /&gt;
# Now, Subversive is ready to be used.&lt;br /&gt;
&lt;br /&gt;
=== Setup the Robocode workspace step by step ===&lt;br /&gt;
&lt;br /&gt;
In the following steps I assume that you now have the JDK, Eclipse, TortoiseSVN or CollabNet Subversion, and Subversive or Subversion up and running. I also assume that the current workspace is set to Robocode workspace; otherwise you should change it to your Robocode workspace. The following steps describes how to setup your workspace for Robocode and how to extract the Robocode sources from the SVN (Subversion).&lt;br /&gt;
&lt;br /&gt;
==== Checkout sources from the SVN ====&lt;br /&gt;
&lt;br /&gt;
Remember the workspace you created for Eclipse in an earlier step? Now, you should navigate into this root folder from your desktop, i.e. not from a command prompt or shell. From within the root folder of your robocode workspace you right-click and select 'SVN Checkout'. A window will pop up, and now you must enter the branch of Robocode you want to work on. That would typically be the trunk or head of the sources, which is the main branch containining the newest sources of Robocode. However, you might also want to check of a specific version of Robocode or some other branch available.&lt;br /&gt;
&lt;br /&gt;
If you want to checkout the sources for the trunk/head, you must use this URL:&lt;br /&gt;
  http://robocode.googlecode.com/svn/robocode/trunk/&lt;br /&gt;
&lt;br /&gt;
If you instead want to checkout the sources for a specific Robocode version, you must use this URL:&lt;br /&gt;
  http://robocode.googlecode.com/svn/robocode/tags/VER_X_X_X&lt;br /&gt;
..where X_X_X must be replaced with a real version number, e.g. '1_5_3' for version 1.5.3&lt;br /&gt;
&lt;br /&gt;
When you have entered or copy-and-pasted the URL into the checkout window you press OK. Now all the sources of the selected branch will be checked out from the SVN.&lt;br /&gt;
&lt;br /&gt;
==== Preparing command-line tools ====&lt;br /&gt;
&lt;br /&gt;
In order to make it build Robocode, batch files / shell scripts have been provided to make trivial tasks easier. For example, you don't need to install tools like Maven, Ant, JUnit, Jacobe yourself. You just run 'loadTools' from the command-line, and it will download required files from the Robocode site so you are able to use these tools from script files.&lt;br /&gt;
&lt;br /&gt;
Hence, you must run the 'loadTools' script from the command line. From a command-promt or shell you must go into the root folder of your robocode workspace. Next you run the loadTools script.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  cd tools&lt;br /&gt;
  loadTools&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  cd ./tools&lt;br /&gt;
  ./loadTools.sh&lt;br /&gt;
&lt;br /&gt;
==== Preparing your workspace for Eclipse ====&lt;br /&gt;
&lt;br /&gt;
Next we must prepare your workspace for Eclipse. Eclipse needs the project files, class files, and other configuration files in order order to let you view, edit, and compile Robocode. Maven provides support for using Eclipse with Maven. You can read more about this here:&lt;br /&gt;
&lt;br /&gt;
* [http://maven.apache.org/guides/mini/guide-ide-eclipse.html Guide to using Eclipse with Maven 2.x]&lt;br /&gt;
&lt;br /&gt;
I highly recommend you to read this in order to understand how Eclipse and Maven works together.&lt;br /&gt;
&lt;br /&gt;
First, we need to create all the required Eclipse files, which we do with another Maven command.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvn eclipse:eclipse&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  ./mvn.sh eclipse:eclipse&lt;br /&gt;
&lt;br /&gt;
Next, you should compile the sources of Robocode in order to have your local Maven repository created and prepared for later.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvn compile&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  ./mvn.sh compile&lt;br /&gt;
&lt;br /&gt;
Now your Robocode workspace is ready almost ready. You just need to import all the projects into your Eclipse workspace. You do this by starting up Eclipse with your Robocode workspace. From the menu bar you select 'File' -&amp;gt; 'Import...' -&amp;gt; 'Existing Projects into Workspace'. Now select the root directory to be the root path of your Robocode workspace. You should see a list of Robocode project. When you do, you must press 'Finish'.&lt;br /&gt;
&lt;br /&gt;
==== M2_REPO class path variable ====&lt;br /&gt;
&lt;br /&gt;
The last thing you need to do is to set up the M2_REPO class path variable for Eclipse, so Eclipse knows where to locate the Maven repository. When building Robocode using Maven, Maven will download all required classes from other sites into this local Maven repository. Hence, Eclipse needs to know the class path for this Maven repository in order to compile all the sources of Robocode. So you need to locate your local Maven repository. Under Windows your Maven repository is put into your %USERPROFILE% directory, and on Linux is put into your home directory (~).&lt;br /&gt;
&lt;br /&gt;
In Eclipse, you go to the menu bar and select 'Window' -&amp;gt; 'Preferences'. On the Preferences window expand the 'Java' -&amp;gt; 'Build Path' and select the 'Classpath Variables'. On the page for the Classpath Variables, you click on the 'New...' button, and enter ''M2_REPO'' as name. Next, you click on the 'Folder...' button and navigate to where you have your .m2/repository directory located (in %USERPROFILE% under Windows, and ~ under Linux), e.g. &amp;lt;code&amp;gt;H:/Users/Flemming/.m2/repository&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/home/fnl/.m2/repository&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
When Eclipse ask you if you want to rebuild the workspace, you select 'Yes' in order to rebuild everything so you are ready to work on Robocode.&lt;br /&gt;
&lt;br /&gt;
==== How to start Robocode in Eclipse? ====&lt;br /&gt;
&lt;br /&gt;
When all sources builds without errors (warnings are expected), you are able to launch Robocode. You do this by selecting 'Run' -&amp;gt; 'Run Configurations...' from th Menu. On the window that shows up, you expand the 'Java Applications', select 'Robocode', and press the 'Run' button.&lt;br /&gt;
&lt;br /&gt;
If you need to start other parts of Robocode like e.g. RoboRumble, you need to create a launch configuration for it, in order to be able to launch it. You can read more about how to create your own launch configurations in Eclipse in this [http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.jdt.doc.user/tasks/tasks-java-local-configuration.htm guide]. This guide is also helpful if you want to modify the Robocode.launch configuration available for launching the Robocode game.&lt;br /&gt;
&lt;br /&gt;
==== How to run the unit tests? ====&lt;br /&gt;
&lt;br /&gt;
When you want to run the unit test from within Eclipse, you must do this from the the Package Explorer, where you right-click on the 'robocode.tests' project and select 'Run As' -&amp;gt; 'JUnit Test'. Now all available unit tests will run automatically.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can start the tests from the command-line by standing on your robocode workspace, and write the following Maven command.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvn test install&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  ./mvn.sh test install&lt;br /&gt;
&lt;br /&gt;
==== How to build the distribution files? ====&lt;br /&gt;
&lt;br /&gt;
In order to build the distribution files containing the installer setup file (robocode-x.x.x-setup.jar) and a .zip file containing all the sources (robocode-x.x.x-src.zip) you start the following batch/shell file wrong the command-line within the robocode workspace directoty.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvnassembly&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  ./mvnassembly.sh&lt;br /&gt;
&lt;br /&gt;
This will build the distribution files, which will be put into the sub-directory named ''target''.&lt;br /&gt;
&lt;br /&gt;
=== Robocode developers and contributions ===&lt;br /&gt;
&lt;br /&gt;
Robocode developers have discussion group at robocode-developers@googlegroups.com. Everybody interested in discussion about future of Robocode are welcome. We also welcome your contributions there. The discussion group is located here: http://groups.google.com/group/robocode-developers.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Robocode/Old Developers Guide for building Robocode|Old version]] of the Developer's Guide for building Robocode for Robocode versions prior to version 1.7.&lt;br /&gt;
* [http://code.google.com/p/robocode/source/browse/ Browse the sources] of Robocode.&lt;br /&gt;
* [http://sourceforge.net/project/showfiles.php?group_id=37202&amp;amp;package_id=218677 Download the sources] of Robocode.&lt;br /&gt;
* [http://groups.google.com/group/robocode-developers Robocode developers discussion group].&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* The [http://sourceforge.net/projects/robocode Robocode project] on SourceForge.&lt;br /&gt;
* [http://sourceforge.net/svn/?group_id=37202 How to access] the SVN Repository for Robocode.&lt;br /&gt;
* [http://www.eclipse.org/ Eclipse] - an open development platform supported by Robocode.&lt;br /&gt;
* [http://maven.apache.org/ Apache Maven] used for building Robocode.&lt;br /&gt;
* [http://maven.apache.org/guides/mini/guide-ide-eclipse.html Guide] to using Eclipse with Maven 2.x.&lt;br /&gt;
* [http://www.eclipse.org/subversive/ Eclipse Subversive] is a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://subclipse.tigris.org/ Subclipse] is also a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://tortoisesvn.net TortoiseSVN], a Subversion client for Windows.&lt;br /&gt;
* [http://www.open.collab.net/downloads/subversion/ CollabNets Subversion], a Subversion client for both Windows and Linux.&lt;br /&gt;
&lt;br /&gt;
[[Category:Robocode Documentation]]&lt;br /&gt;
[[Category:Eclipse IDE]]&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=26803</id>
		<title>Robocode/Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=26803"/>
		<updated>2012-09-18T22:00:11Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: moved Old Robocode/Developers Guide for building Robocode to Robocode/Developers Guide for building Robocode over redirect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide describes how to build the Robocode game using [http://www.eclipse.org Eclipse].&lt;br /&gt;
&lt;br /&gt;
This guide is valid from Robocode version 1.7. If you want to build older versions of Robocode you must use the old version of the developer's guide available [[Robocode/Old Developers Guide for building Robocode|here]].&lt;br /&gt;
&lt;br /&gt;
== Developer's Guide for building Robocode using Eclipse ==&lt;br /&gt;
&lt;br /&gt;
=== Notice ===&lt;br /&gt;
&lt;br /&gt;
This guide is intended for experienced Java developers who want to work on the Robocode game itself. This guide describes all the basic stuff in order to compile and run Robocode using the Eclipse IDE.&lt;br /&gt;
&lt;br /&gt;
If you just want to browse the sources, you can do it [http://code.google.com/p/robocode/source/browse/ here] or you can download the zipped sources from [http://sourceforge.net/project/showfiles.php?group_id=37202&amp;amp;package_id=218677 here].&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
All sources of Robocode are available in the [http://code.google.com/p/robocode/source/browse/ SVN Repository] for the [http://sourceforge.net/projects/robocode Robocode project] on SourceForge (SF). You can read about how to access the SVN Repository for Robocode [http://code.google.com/p/robocode/source/checkout here]. Subversion (SVN) 1.5 is being used as the Version Control System used for Robocode.&lt;br /&gt;
&lt;br /&gt;
Basically, all you need is the sources of Robocode, which can be downloaded as a .zip file or downloaded from the Subversion repository, and [http://maven.apache.org/ Maven] installed. Maven is being used in order to build everything in the Robocode project. However, if you want to work with the sources of Robocode, you might of course want to use an IDE for compiling and run Robocode on the fly to see the effect of your work.&lt;br /&gt;
&lt;br /&gt;
Batch files and shell scripts are provided for building Robocode under Windows and Linux (including Mac OS X). These scripts have been developed for Windows XP/Vista and Ubuntu 8.10 (Linux). Please notice that the Linux setup should also work for e.g. Solaris, FreeBSD etc.&lt;br /&gt;
&lt;br /&gt;
=== What skills do you need? ===&lt;br /&gt;
&lt;br /&gt;
* Eclipse ([https://eclipse-tutorial.dev.java.net/ Eclipse tutorial])&lt;br /&gt;
* Subversion ([http://svnbook.red-bean.com/ Subversion book])&lt;br /&gt;
* Maven ([http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html Maven in 5 Minutes])&lt;br /&gt;
&lt;br /&gt;
This guide is focusing on how to build and run Robocode using the [http://www.eclipse.org/ Eclipse], which is supported by Robocode. Eclipse is a very popular IDE that comes free of charge, and which supports SVN access to the sources, a rich source code editor, automatic compilation, has a big supporting community, lot's of plugins, and much much more.&lt;br /&gt;
&lt;br /&gt;
This guide assumes that you have some basic knowledge about how to download, install and use Eclipse. Hence, this guide will not teach you how to use Eclipse, but rather focus on how to build Robocode within Eclipse. The same applies to other tools used within this guide.&lt;br /&gt;
&lt;br /&gt;
Please notice that you do not have to be an expert in Eclipse, Subversion, and Maven. But you need some basic knowledge about these in order to understand how to build Robocode. In fact, trying to build Robocode might actually be a very good way of learning these tools, if you don't know them already or miss some practical experience with these.&lt;br /&gt;
&lt;br /&gt;
You don't have to worry too much about how to setup Eclipse for Robocode as the provided sources in SVN contains all configuration files needed by Eclipse. Some of these files are generated using Maven's build-in support for Eclipse. However, you still need to do some basic pre-configuration of Eclipse before you'll be able to get started with working on Robocode. You should only need to set up a workspace for Robocode once. However, you will need to update the sources from SVN once in a while and merge these with your local changes in order to keep up-to-date with the current versions of Robocode - at least if you work on the trunk/head branch of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
=== Software Requirements ===&lt;br /&gt;
&lt;br /&gt;
'''Required:'''&lt;br /&gt;
* Sun JDK 5.0 ([http://java.sun.com/javase/downloads/index_jdk5.jsp download]).&lt;br /&gt;
* Eclipse Classic 3.4.1 or newer ([http://www.eclipse.org/downloads/ download]).&lt;br /&gt;
* A Subversion client like TortoiseSVN 1.5.7 or newer ([http://tortoisesvn.net/downloads download]) (for Windows) ... or CollabNet Subversion Command-Line Client v1.5.5 ([http://www.collab.net/downloads/subversion/ download]) for Windows and Linux.&lt;br /&gt;
&lt;br /&gt;
'''Highly Recommended:'''&lt;br /&gt;
* [http://www.eclipse.org/subversive/ Eclipse Subversive] 0.7.3 or newer (installation procedure described later) or [http://subclipse.tigris.org/ Subclipse] 1.4.7 or newer (installation procedure is not described in this guide).&lt;br /&gt;
&lt;br /&gt;
==== Install Sun JDK 5.0 ====&lt;br /&gt;
&lt;br /&gt;
First you must ensure that the Sun JDK 5.0 is available on your system. If not, you need to install Sun JDK 5.0 before installing Eclipse, which requires a JDK. Please notice that you must install the '''JDK''' (Java Developer Kit), and ''not'' just the JRE (Java Runtime Environment) as the JRE is insufficient for building Robocode.&lt;br /&gt;
&lt;br /&gt;
It is important that the Java vendor is '''Sun''' in order to guarantee that you'll not run into some unexpected problems when using the Java compiler etc. Most problems caused by building Robocode (and when compiling robots for Robocode) is caused by Java versions from another vendor than Sun. Also make sure that you use '''version 5.0''' of the JDK, not a never version like e.g. the JDK 6. Otherwise. you'll not be able to build the sources of Robocode - at least not without fixing all the compiler errors due to the switch from Java 5.0 into Java 6.&lt;br /&gt;
&lt;br /&gt;
When installing the JDK, it is highly recommended that you '''install the sources provided for Java''' as these are very useful when debugging inside Robocode. However, this is not a requirement.&lt;br /&gt;
&lt;br /&gt;
==== Set the Environment Settings for Java ====&lt;br /&gt;
&lt;br /&gt;
You must set up the environment variable named '''JAVA_HOME''' in your system environment, e.g. &amp;lt;code&amp;gt;JAVA_HOME=&amp;quot;C:\Program Files\Java\jdk1.5.0_16&amp;quot;&amp;lt;/code&amp;gt; (on Windows) or &amp;lt;code&amp;gt;JAVA_HOME=&amp;quot;/usr/local/Java/jdk1.5.0_16&amp;quot;&amp;lt;/code&amp;gt; (on Linux). In addition, you must add JAVA_HOME\bin (on Windows) to your '''PATH''' environment variable, e.g. &amp;lt;code&amp;gt;PATH=%PATH%;%JAVA_HOME%\bin&amp;lt;/code&amp;gt; (on Windows), and &amp;lt;code&amp;gt;PATH=$PATH:$JAVA_HOME/bin&amp;lt;/code&amp;gt; (on Linux). This must be done as Maven is depending on the JAVA_HOME environment variable, and must know where to locate the JDK.&lt;br /&gt;
&lt;br /&gt;
If you want more information of how to set up your JAVA_HOME and PATH environment variables for your specific OS, please read the installation notes provided for the Sun JDK 5.0 here:&lt;br /&gt;
&lt;br /&gt;
'''Installation Notes from Sun:'''&lt;br /&gt;
* [http://java.sun.com/j2se/1.5.0/install.html Java Platform Installation]: Find installation notes for Windows, Linux, and Solaris.&lt;br /&gt;
* [http://java.sun.com/j2se/1.5.0/system-configurations.html Supported System Configurations]: Find the installation notes for ''all'' supported systems.&lt;br /&gt;
&lt;br /&gt;
==== Install Eclipse ====&lt;br /&gt;
&lt;br /&gt;
When the Sun JDK 5.0 is ready on your system, you must install the Eclipse 3.4 if it is not available on your system already. Please notice that older versions of Eclipse, like e.g. Eclipse 3.2 provided with Ubuntu 8.10, will not work with the setup used in this guideline. Consult the installation notes provided for Eclipse in order to find out how to install Eclipse 3.4 for your specific OS.&lt;br /&gt;
&lt;br /&gt;
==== Create a workspace for Robocode ====&lt;br /&gt;
&lt;br /&gt;
The first time you start up Eclipse it will ask for a directory for your workspace. I suggest that you create a workspace named '''robocode-workspace''' or similar and create the workspace on a partition or directory like e.g. &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; (on Windows) or &amp;lt;code&amp;gt;~&amp;lt;/code&amp;gt; (on Linux) - or any other directory of your choice. If you have already got a workspace, e.g. the default one suggested by Eclipse, you can create a new workspace if you wish by selecting 'File' -&amp;gt; 'Switch Workspace' -&amp;gt; 'Other...' from the menu.&lt;br /&gt;
&lt;br /&gt;
==== Use Subversive or Subclipse ====&lt;br /&gt;
&lt;br /&gt;
The next step (which is optional) is to install [http://www.eclipse.org/subversive/ Subversive] or [http://subclipse.tigris.org/ Subclipse] into Eclipse in order to get direct access to the sources of Robocode in the SVN repository. Notice, you'll only have read access to the sources. Also notice, that you don't have to install the Subversive or Subclipse as long as you use another Subversion client. However, it makes life easier when you work within Eclipse.&lt;br /&gt;
&lt;br /&gt;
I recommend you to use Subversive that has proven to be very stable within Eclipse 3.4.1. In the following you can read how to install Subversive into Eclipse.&lt;br /&gt;
&lt;br /&gt;
==== How to install Subversive ====&lt;br /&gt;
&lt;br /&gt;
In order to install Subversive into Eclipse, you can choose between using the Update Site or Archived Update Site. You can get more information [http://www.polarion.com/products/svn/subversive.php?src=eclipseproject here]. You'll need to install:&lt;br /&gt;
&lt;br /&gt;
* Subversive SVN Team Provider Plugin 0.7.3 or newer.&lt;br /&gt;
* SVNKit 1.2.0 or newer, which is a Subversive SVN Connector. At least one Subversive SVN Connector is required. Note that you might gain speed by using another SVN Connector like e.g. the Native JavaHL 1.5.0 or never.&lt;br /&gt;
&lt;br /&gt;
In the following, we will use the Update Site for installing Subversive:&lt;br /&gt;
&lt;br /&gt;
# In Eclipse you must select 'Help' -&amp;gt; 'Software Updates...'' from the menu.&lt;br /&gt;
# Then you select the 'Available Software' tab&lt;br /&gt;
# Press the 'Add Site...' button, and enter http://download.eclipse.org/technology/subversive/0.7/update-site/ into the text field and press OK or enter. Notice, that this update site might change, so might have to get the updated URL to the Update Site from [http://www.polarion.com/products/svn/subversive.php?src=eclipseproject here].&lt;br /&gt;
## Unfold the site you just added and put a checkmark in the 'Subversive SVN Team Provider Plugin'.&lt;br /&gt;
# Again, press the 'Add Site...' button, and enter http://www.polarion.org/projects/subversive/download/eclipse/2.0/update-site/ into the text field and press OK or enter. Notice, that this update site might change, so might have to get the updated URL to the Update Site from [http://www.polarion.com/products/svn/subversive.php?src=eclipseproject here].&lt;br /&gt;
## Unfold the site you just added and put a checkmark in the 'SVNKit 1.2.0' or 'JavaHL 1.5.0' (or never versions) under the 'Subversive SVN Connectors' tree (you can also use a newer version of the SVN Connector of course).&lt;br /&gt;
# Press 'Install' and follow the instruction given by Eclipse to install the plugins. It will ask if you wish to restart Eclipse, and I recommend you to answer 'yes' in order to restart Eclipse.&lt;br /&gt;
# Now, Subversive is ready to be used.&lt;br /&gt;
&lt;br /&gt;
=== Setup the Robocode workspace step by step ===&lt;br /&gt;
&lt;br /&gt;
In the following steps I assume that you now have the JDK, Eclipse, TortoiseSVN or CollabNet Subversion, and Subversive or Subversion up and running. I also assume that the current workspace is set to Robocode workspace; otherwise you should change it to your Robocode workspace. The following steps describes how to setup your workspace for Robocode and how to extract the Robocode sources from the SVN (Subversion).&lt;br /&gt;
&lt;br /&gt;
==== Checkout sources from the SVN ====&lt;br /&gt;
&lt;br /&gt;
Remember the workspace you created for Eclipse in an earlier step? Now, you should navigate into this root folder from your desktop, i.e. not from a command prompt or shell. From within the root folder of your robocode workspace you right-click and select 'SVN Checkout'. A window will pop up, and now you must enter the branch of Robocode you want to work on. That would typically be the trunk or head of the sources, which is the main branch containining the newest sources of Robocode. However, you might also want to check of a specific version of Robocode or some other branch available.&lt;br /&gt;
&lt;br /&gt;
If you want to checkout the sources for the trunk/head, you must use this URL:&lt;br /&gt;
  http://robocode.googlecode.com/svn/robocode/trunk/&lt;br /&gt;
&lt;br /&gt;
If you instead want to checkout the sources for a specific Robocode version, you must use this URL:&lt;br /&gt;
  http://robocode.googlecode.com/svn/robocode/tags/VER_X_X_X&lt;br /&gt;
..where X_X_X must be replaced with a real version number, e.g. '1_5_3' for version 1.5.3&lt;br /&gt;
&lt;br /&gt;
When you have entered or copy-and-pasted the URL into the checkout window you press OK. Now all the sources of the selected branch will be checked out from the SVN.&lt;br /&gt;
&lt;br /&gt;
==== Preparing command-line tools ====&lt;br /&gt;
&lt;br /&gt;
In order to make it build Robocode, batch files / shell scripts have been provided to make trivial tasks easier. For example, you don't need to install tools like Maven, Ant, JUnit, Jacobe yourself. You just run 'loadTools' from the command-line, and it will download required files from the Robocode site so you are able to use these tools from script files.&lt;br /&gt;
&lt;br /&gt;
Hence, you must run the 'loadTools' script from the command line. From a command-promt or shell you must go into the root folder of your robocode workspace. Next you run the loadTools script.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  cd tools&lt;br /&gt;
  loadTools&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  cd ./tools&lt;br /&gt;
  ./loadTools.sh&lt;br /&gt;
&lt;br /&gt;
==== Preparing your workspace for Eclipse ====&lt;br /&gt;
&lt;br /&gt;
Next we must prepare your workspace for Eclipse. Eclipse needs the project files, class files, and other configuration files in order order to let you view, edit, and compile Robocode. Maven provides support for using Eclipse with Maven. You can read more about this here:&lt;br /&gt;
&lt;br /&gt;
* [http://maven.apache.org/guides/mini/guide-ide-eclipse.html Guide to using Eclipse with Maven 2.x]&lt;br /&gt;
&lt;br /&gt;
I highly recommend you to read this in order to understand how Eclipse and Maven works together.&lt;br /&gt;
&lt;br /&gt;
First, we need to create all the required Eclipse files, which we do with another Maven command.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvn eclipse:eclipse&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  ./mvn.sh eclipse:eclipse&lt;br /&gt;
&lt;br /&gt;
Next, you should compile the sources of Robocode in order to have your local Maven repository created and prepared for later.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvn compile&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  ./mvn.sh compile&lt;br /&gt;
&lt;br /&gt;
Now your Robocode workspace is ready almost ready. You just need to import all the projects into your Eclipse workspace. You do this by starting up Eclipse with your Robocode workspace. From the menu bar you select 'File' -&amp;gt; 'Import...' -&amp;gt; 'Existing Projects into Workspace'. Now select the root directory to be the root path of your Robocode workspace. You should see a list of Robocode project. When you do, you must press 'Finish'.&lt;br /&gt;
&lt;br /&gt;
==== M2_REPO class path variable ====&lt;br /&gt;
&lt;br /&gt;
The last thing you need to do is to set up the M2_REPO class path variable for Eclipse, so Eclipse knows where to locate the Maven repository. When building Robocode using Maven, Maven will download all required classes from other sites into this local Maven repository. Hence, Eclipse needs to know the class path for this Maven repository in order to compile all the sources of Robocode. So you need to locate your local Maven repository. Under Windows your Maven repository is put into your %USERPROFILE% directory, and on Linux is put into your home directory (~).&lt;br /&gt;
&lt;br /&gt;
In Eclipse, you go to the menu bar and select 'Window' -&amp;gt; 'Preferences'. On the Preferences window expand the 'Java' -&amp;gt; 'Build Path' and select the 'Classpath Variables'. On the page for the Classpath Variables, you click on the 'New...' button, and enter ''M2_REPO'' as name. Next, you click on the 'Folder...' button and navigate to where you have your .m2/repository directory located (in %USERPROFILE% under Windows, and ~ under Linux), e.g. &amp;lt;code&amp;gt;H:/Users/Flemming/.m2/repository&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/home/fnl/.m2/repository&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
When Eclipse ask you if you want to rebuild the workspace, you select 'Yes' in order to rebuild everything so you are ready to work on Robocode.&lt;br /&gt;
&lt;br /&gt;
==== How to start Robocode in Eclipse? ====&lt;br /&gt;
&lt;br /&gt;
When all sources builds without errors (warnings are expected), you are able to launch Robocode. You do this by selecting 'Run' -&amp;gt; 'Run Configurations...' from th Menu. On the window that shows up, you expand the 'Java Applications', select 'Robocode', and press the 'Run' button.&lt;br /&gt;
&lt;br /&gt;
If you need to start other parts of Robocode like e.g. RoboRumble, you need to create a launch configuration for it, in order to be able to launch it. You can read more about how to create your own launch configurations in Eclipse in this [http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.jdt.doc.user/tasks/tasks-java-local-configuration.htm guide]. This guide is also helpful if you want to modify the Robocode.launch configuration available for launching the Robocode game.&lt;br /&gt;
&lt;br /&gt;
==== How to run the unit tests? ====&lt;br /&gt;
&lt;br /&gt;
When you want to run the unit test from within Eclipse, you must do this from the the Package Explorer, where you right-click on the 'robocode.tests' project and select 'Run As' -&amp;gt; 'JUnit Test'. Now all available unit tests will run automatically.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can start the tests from the command-line by standing on your robocode workspace, and write the following Maven command.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvn test install&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  ./mvn.sh test install&lt;br /&gt;
&lt;br /&gt;
==== How to build the distribution files? ====&lt;br /&gt;
&lt;br /&gt;
In order to build the distribution files containing the installer setup file (robocode-x.x.x-setup.jar) and a .zip file containing all the sources (robocode-x.x.x-src.zip) you start the following batch/shell file wrong the command-line within the robocode workspace directoty.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvnassembly&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  ./mvnassembly.sh&lt;br /&gt;
&lt;br /&gt;
This will build the distribution files, which will be put into the sub-directory named ''target''.&lt;br /&gt;
&lt;br /&gt;
=== Robocode developers and contributions ===&lt;br /&gt;
&lt;br /&gt;
Robocode developers have discussion group at robocode-developers@googlegroups.com. Everybody interested in discussion about future of Robocode are welcome. We also welcome your contributions there. The discussion group is located here: http://groups.google.com/group/robocode-developers.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Robocode/Old Developers Guide for building Robocode|Old version]] of the Developer's Guide for building Robocode for Robocode versions prior to version 1.7.&lt;br /&gt;
* [http://code.google.com/p/robocode/source/browse/ Browse the sources] of Robocode.&lt;br /&gt;
* [http://sourceforge.net/project/showfiles.php?group_id=37202&amp;amp;package_id=218677 Download the sources] of Robocode.&lt;br /&gt;
* [http://groups.google.com/group/robocode-developers Robocode developers discussion group].&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* The [http://sourceforge.net/projects/robocode Robocode project] on SourceForge.&lt;br /&gt;
* [http://sourceforge.net/svn/?group_id=37202 How to access] the SVN Repository for Robocode.&lt;br /&gt;
* [http://www.eclipse.org/ Eclipse] - an open development platform supported by Robocode.&lt;br /&gt;
* [http://maven.apache.org/ Apache Maven] used for building Robocode.&lt;br /&gt;
* [http://maven.apache.org/guides/mini/guide-ide-eclipse.html Guide] to using Eclipse with Maven 2.x.&lt;br /&gt;
* [http://www.eclipse.org/subversive/ Eclipse Subversive] is a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://subclipse.tigris.org/ Subclipse] is also a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://tortoisesvn.net TortoiseSVN], a Subversion client for Windows.&lt;br /&gt;
* [http://www.open.collab.net/downloads/subversion/ CollabNets Subversion], a Subversion client for both Windows and Linux.&lt;br /&gt;
&lt;br /&gt;
[[Category:Robocode Documentation]]&lt;br /&gt;
[[Category:Eclipse IDE]]&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Old_Robocode/Developers_Guide_for_building_Robocode&amp;diff=26804</id>
		<title>Old Robocode/Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Old_Robocode/Developers_Guide_for_building_Robocode&amp;diff=26804"/>
		<updated>2012-09-18T22:00:11Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: moved Old Robocode/Developers Guide for building Robocode to Robocode/Developers Guide for building Robocode over redirect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Robocode/Developers Guide for building Robocode]]&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Talk:Robocode/Developers_Guide_for_building_Robocode&amp;diff=26805</id>
		<title>Talk:Robocode/Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Talk:Robocode/Developers_Guide_for_building_Robocode&amp;diff=26805"/>
		<updated>2012-09-18T22:00:11Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: moved Talk:Old Robocode/Developers Guide for building Robocode to Talk:Robocode/Developers Guide for building Robocode over redirect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Talk:Robocode/Old Developers Guide for building Robocode]]&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Talk:Old_Robocode/Developers_Guide_for_building_Robocode&amp;diff=26806</id>
		<title>Talk:Old Robocode/Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Talk:Old_Robocode/Developers_Guide_for_building_Robocode&amp;diff=26806"/>
		<updated>2012-09-18T22:00:11Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: moved Talk:Old Robocode/Developers Guide for building Robocode to Talk:Robocode/Developers Guide for building Robocode over redirect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Talk:Robocode/Developers Guide for building Robocode]]&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Robocode/Old_Developers_Guide_for_building_Robocode&amp;diff=26801</id>
		<title>Robocode/Old Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Robocode/Old_Developers_Guide_for_building_Robocode&amp;diff=26801"/>
		<updated>2012-09-18T21:59:29Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: moved Robocode/Old2 Developers Guide for building Robocode to Robocode/Old Developers Guide for building Robocode over redirect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Robocode/Old2_Developers_Guide_for_building_Robocode&amp;diff=26802</id>
		<title>Robocode/Old2 Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Robocode/Old2_Developers_Guide_for_building_Robocode&amp;diff=26802"/>
		<updated>2012-09-18T21:59:29Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: moved Robocode/Old2 Developers Guide for building Robocode to Robocode/Old Developers Guide for building Robocode over redirect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Robocode/Old Developers Guide for building Robocode]]&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Robocode/Old_Developers_Guide_for_building_Robocode&amp;diff=26799</id>
		<title>Robocode/Old Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Robocode/Old_Developers_Guide_for_building_Robocode&amp;diff=26799"/>
		<updated>2012-09-18T21:59:07Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: moved Robocode/Old Developers Guide for building Robocode to Robocode/Old2 Developers Guide for building Robocode&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Robocode/Old_Developers_Guide_for_building_Robocode&amp;diff=26798</id>
		<title>Robocode/Old Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Robocode/Old_Developers_Guide_for_building_Robocode&amp;diff=26798"/>
		<updated>2012-09-18T21:57:50Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: Blanked the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=26794</id>
		<title>Robocode/Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode&amp;diff=26794"/>
		<updated>2012-09-18T21:52:10Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: moved Robocode/Developers Guide for building Robocode to Old Robocode/Developers Guide for building Robocode: Deprecated - replaced with new one for Git.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide describes how to build the Robocode game using [http://www.eclipse.org Eclipse].&lt;br /&gt;
&lt;br /&gt;
This guide is valid from Robocode version 1.7. If you want to build older versions of Robocode you must use the old version of the developer's guide available [[Robocode/Old Developers Guide for building Robocode|here]].&lt;br /&gt;
&lt;br /&gt;
== Developer's Guide for building Robocode using Eclipse ==&lt;br /&gt;
&lt;br /&gt;
=== Notice ===&lt;br /&gt;
&lt;br /&gt;
This guide is intended for experienced Java developers who want to work on the Robocode game itself. This guide describes all the basic stuff in order to compile and run Robocode using the Eclipse IDE.&lt;br /&gt;
&lt;br /&gt;
If you just want to browse the sources, you can do it [http://code.google.com/p/robocode/source/browse/ here] or you can download the zipped sources from [http://sourceforge.net/project/showfiles.php?group_id=37202&amp;amp;package_id=218677 here].&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
All sources of Robocode are available in the [http://code.google.com/p/robocode/source/browse/ SVN Repository] for the [http://sourceforge.net/projects/robocode Robocode project] on SourceForge (SF). You can read about how to access the SVN Repository for Robocode [http://code.google.com/p/robocode/source/checkout here]. Subversion (SVN) 1.5 is being used as the Version Control System used for Robocode.&lt;br /&gt;
&lt;br /&gt;
Basically, all you need is the sources of Robocode, which can be downloaded as a .zip file or downloaded from the Subversion repository, and [http://maven.apache.org/ Maven] installed. Maven is being used in order to build everything in the Robocode project. However, if you want to work with the sources of Robocode, you might of course want to use an IDE for compiling and run Robocode on the fly to see the effect of your work.&lt;br /&gt;
&lt;br /&gt;
Batch files and shell scripts are provided for building Robocode under Windows and Linux (including Mac OS X). These scripts have been developed for Windows XP/Vista and Ubuntu 8.10 (Linux). Please notice that the Linux setup should also work for e.g. Solaris, FreeBSD etc.&lt;br /&gt;
&lt;br /&gt;
=== What skills do you need? ===&lt;br /&gt;
&lt;br /&gt;
* Eclipse ([https://eclipse-tutorial.dev.java.net/ Eclipse tutorial])&lt;br /&gt;
* Subversion ([http://svnbook.red-bean.com/ Subversion book])&lt;br /&gt;
* Maven ([http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html Maven in 5 Minutes])&lt;br /&gt;
&lt;br /&gt;
This guide is focusing on how to build and run Robocode using the [http://www.eclipse.org/ Eclipse], which is supported by Robocode. Eclipse is a very popular IDE that comes free of charge, and which supports SVN access to the sources, a rich source code editor, automatic compilation, has a big supporting community, lot's of plugins, and much much more.&lt;br /&gt;
&lt;br /&gt;
This guide assumes that you have some basic knowledge about how to download, install and use Eclipse. Hence, this guide will not teach you how to use Eclipse, but rather focus on how to build Robocode within Eclipse. The same applies to other tools used within this guide.&lt;br /&gt;
&lt;br /&gt;
Please notice that you do not have to be an expert in Eclipse, Subversion, and Maven. But you need some basic knowledge about these in order to understand how to build Robocode. In fact, trying to build Robocode might actually be a very good way of learning these tools, if you don't know them already or miss some practical experience with these.&lt;br /&gt;
&lt;br /&gt;
You don't have to worry too much about how to setup Eclipse for Robocode as the provided sources in SVN contains all configuration files needed by Eclipse. Some of these files are generated using Maven's build-in support for Eclipse. However, you still need to do some basic pre-configuration of Eclipse before you'll be able to get started with working on Robocode. You should only need to set up a workspace for Robocode once. However, you will need to update the sources from SVN once in a while and merge these with your local changes in order to keep up-to-date with the current versions of Robocode - at least if you work on the trunk/head branch of the Robocode sources.&lt;br /&gt;
&lt;br /&gt;
=== Software Requirements ===&lt;br /&gt;
&lt;br /&gt;
'''Required:'''&lt;br /&gt;
* Sun JDK 5.0 ([http://java.sun.com/javase/downloads/index_jdk5.jsp download]).&lt;br /&gt;
* Eclipse Classic 3.4.1 or newer ([http://www.eclipse.org/downloads/ download]).&lt;br /&gt;
* A Subversion client like TortoiseSVN 1.5.7 or newer ([http://tortoisesvn.net/downloads download]) (for Windows) ... or CollabNet Subversion Command-Line Client v1.5.5 ([http://www.collab.net/downloads/subversion/ download]) for Windows and Linux.&lt;br /&gt;
&lt;br /&gt;
'''Highly Recommended:'''&lt;br /&gt;
* [http://www.eclipse.org/subversive/ Eclipse Subversive] 0.7.3 or newer (installation procedure described later) or [http://subclipse.tigris.org/ Subclipse] 1.4.7 or newer (installation procedure is not described in this guide).&lt;br /&gt;
&lt;br /&gt;
==== Install Sun JDK 5.0 ====&lt;br /&gt;
&lt;br /&gt;
First you must ensure that the Sun JDK 5.0 is available on your system. If not, you need to install Sun JDK 5.0 before installing Eclipse, which requires a JDK. Please notice that you must install the '''JDK''' (Java Developer Kit), and ''not'' just the JRE (Java Runtime Environment) as the JRE is insufficient for building Robocode.&lt;br /&gt;
&lt;br /&gt;
It is important that the Java vendor is '''Sun''' in order to guarantee that you'll not run into some unexpected problems when using the Java compiler etc. Most problems caused by building Robocode (and when compiling robots for Robocode) is caused by Java versions from another vendor than Sun. Also make sure that you use '''version 5.0''' of the JDK, not a never version like e.g. the JDK 6. Otherwise. you'll not be able to build the sources of Robocode - at least not without fixing all the compiler errors due to the switch from Java 5.0 into Java 6.&lt;br /&gt;
&lt;br /&gt;
When installing the JDK, it is highly recommended that you '''install the sources provided for Java''' as these are very useful when debugging inside Robocode. However, this is not a requirement.&lt;br /&gt;
&lt;br /&gt;
==== Set the Environment Settings for Java ====&lt;br /&gt;
&lt;br /&gt;
You must set up the environment variable named '''JAVA_HOME''' in your system environment, e.g. &amp;lt;code&amp;gt;JAVA_HOME=&amp;quot;C:\Program Files\Java\jdk1.5.0_16&amp;quot;&amp;lt;/code&amp;gt; (on Windows) or &amp;lt;code&amp;gt;JAVA_HOME=&amp;quot;/usr/local/Java/jdk1.5.0_16&amp;quot;&amp;lt;/code&amp;gt; (on Linux). In addition, you must add JAVA_HOME\bin (on Windows) to your '''PATH''' environment variable, e.g. &amp;lt;code&amp;gt;PATH=%PATH%;%JAVA_HOME%\bin&amp;lt;/code&amp;gt; (on Windows), and &amp;lt;code&amp;gt;PATH=$PATH:$JAVA_HOME/bin&amp;lt;/code&amp;gt; (on Linux). This must be done as Maven is depending on the JAVA_HOME environment variable, and must know where to locate the JDK.&lt;br /&gt;
&lt;br /&gt;
If you want more information of how to set up your JAVA_HOME and PATH environment variables for your specific OS, please read the installation notes provided for the Sun JDK 5.0 here:&lt;br /&gt;
&lt;br /&gt;
'''Installation Notes from Sun:'''&lt;br /&gt;
* [http://java.sun.com/j2se/1.5.0/install.html Java Platform Installation]: Find installation notes for Windows, Linux, and Solaris.&lt;br /&gt;
* [http://java.sun.com/j2se/1.5.0/system-configurations.html Supported System Configurations]: Find the installation notes for ''all'' supported systems.&lt;br /&gt;
&lt;br /&gt;
==== Install Eclipse ====&lt;br /&gt;
&lt;br /&gt;
When the Sun JDK 5.0 is ready on your system, you must install the Eclipse 3.4 if it is not available on your system already. Please notice that older versions of Eclipse, like e.g. Eclipse 3.2 provided with Ubuntu 8.10, will not work with the setup used in this guideline. Consult the installation notes provided for Eclipse in order to find out how to install Eclipse 3.4 for your specific OS.&lt;br /&gt;
&lt;br /&gt;
==== Create a workspace for Robocode ====&lt;br /&gt;
&lt;br /&gt;
The first time you start up Eclipse it will ask for a directory for your workspace. I suggest that you create a workspace named '''robocode-workspace''' or similar and create the workspace on a partition or directory like e.g. &amp;lt;code&amp;gt;C:&amp;lt;/code&amp;gt; (on Windows) or &amp;lt;code&amp;gt;~&amp;lt;/code&amp;gt; (on Linux) - or any other directory of your choice. If you have already got a workspace, e.g. the default one suggested by Eclipse, you can create a new workspace if you wish by selecting 'File' -&amp;gt; 'Switch Workspace' -&amp;gt; 'Other...' from the menu.&lt;br /&gt;
&lt;br /&gt;
==== Use Subversive or Subclipse ====&lt;br /&gt;
&lt;br /&gt;
The next step (which is optional) is to install [http://www.eclipse.org/subversive/ Subversive] or [http://subclipse.tigris.org/ Subclipse] into Eclipse in order to get direct access to the sources of Robocode in the SVN repository. Notice, you'll only have read access to the sources. Also notice, that you don't have to install the Subversive or Subclipse as long as you use another Subversion client. However, it makes life easier when you work within Eclipse.&lt;br /&gt;
&lt;br /&gt;
I recommend you to use Subversive that has proven to be very stable within Eclipse 3.4.1. In the following you can read how to install Subversive into Eclipse.&lt;br /&gt;
&lt;br /&gt;
==== How to install Subversive ====&lt;br /&gt;
&lt;br /&gt;
In order to install Subversive into Eclipse, you can choose between using the Update Site or Archived Update Site. You can get more information [http://www.polarion.com/products/svn/subversive.php?src=eclipseproject here]. You'll need to install:&lt;br /&gt;
&lt;br /&gt;
* Subversive SVN Team Provider Plugin 0.7.3 or newer.&lt;br /&gt;
* SVNKit 1.2.0 or newer, which is a Subversive SVN Connector. At least one Subversive SVN Connector is required. Note that you might gain speed by using another SVN Connector like e.g. the Native JavaHL 1.5.0 or never.&lt;br /&gt;
&lt;br /&gt;
In the following, we will use the Update Site for installing Subversive:&lt;br /&gt;
&lt;br /&gt;
# In Eclipse you must select 'Help' -&amp;gt; 'Software Updates...'' from the menu.&lt;br /&gt;
# Then you select the 'Available Software' tab&lt;br /&gt;
# Press the 'Add Site...' button, and enter http://download.eclipse.org/technology/subversive/0.7/update-site/ into the text field and press OK or enter. Notice, that this update site might change, so might have to get the updated URL to the Update Site from [http://www.polarion.com/products/svn/subversive.php?src=eclipseproject here].&lt;br /&gt;
## Unfold the site you just added and put a checkmark in the 'Subversive SVN Team Provider Plugin'.&lt;br /&gt;
# Again, press the 'Add Site...' button, and enter http://www.polarion.org/projects/subversive/download/eclipse/2.0/update-site/ into the text field and press OK or enter. Notice, that this update site might change, so might have to get the updated URL to the Update Site from [http://www.polarion.com/products/svn/subversive.php?src=eclipseproject here].&lt;br /&gt;
## Unfold the site you just added and put a checkmark in the 'SVNKit 1.2.0' or 'JavaHL 1.5.0' (or never versions) under the 'Subversive SVN Connectors' tree (you can also use a newer version of the SVN Connector of course).&lt;br /&gt;
# Press 'Install' and follow the instruction given by Eclipse to install the plugins. It will ask if you wish to restart Eclipse, and I recommend you to answer 'yes' in order to restart Eclipse.&lt;br /&gt;
# Now, Subversive is ready to be used.&lt;br /&gt;
&lt;br /&gt;
=== Setup the Robocode workspace step by step ===&lt;br /&gt;
&lt;br /&gt;
In the following steps I assume that you now have the JDK, Eclipse, TortoiseSVN or CollabNet Subversion, and Subversive or Subversion up and running. I also assume that the current workspace is set to Robocode workspace; otherwise you should change it to your Robocode workspace. The following steps describes how to setup your workspace for Robocode and how to extract the Robocode sources from the SVN (Subversion).&lt;br /&gt;
&lt;br /&gt;
==== Checkout sources from the SVN ====&lt;br /&gt;
&lt;br /&gt;
Remember the workspace you created for Eclipse in an earlier step? Now, you should navigate into this root folder from your desktop, i.e. not from a command prompt or shell. From within the root folder of your robocode workspace you right-click and select 'SVN Checkout'. A window will pop up, and now you must enter the branch of Robocode you want to work on. That would typically be the trunk or head of the sources, which is the main branch containining the newest sources of Robocode. However, you might also want to check of a specific version of Robocode or some other branch available.&lt;br /&gt;
&lt;br /&gt;
If you want to checkout the sources for the trunk/head, you must use this URL:&lt;br /&gt;
  http://robocode.googlecode.com/svn/robocode/trunk/&lt;br /&gt;
&lt;br /&gt;
If you instead want to checkout the sources for a specific Robocode version, you must use this URL:&lt;br /&gt;
  http://robocode.googlecode.com/svn/robocode/tags/VER_X_X_X&lt;br /&gt;
..where X_X_X must be replaced with a real version number, e.g. '1_5_3' for version 1.5.3&lt;br /&gt;
&lt;br /&gt;
When you have entered or copy-and-pasted the URL into the checkout window you press OK. Now all the sources of the selected branch will be checked out from the SVN.&lt;br /&gt;
&lt;br /&gt;
==== Preparing command-line tools ====&lt;br /&gt;
&lt;br /&gt;
In order to make it build Robocode, batch files / shell scripts have been provided to make trivial tasks easier. For example, you don't need to install tools like Maven, Ant, JUnit, Jacobe yourself. You just run 'loadTools' from the command-line, and it will download required files from the Robocode site so you are able to use these tools from script files.&lt;br /&gt;
&lt;br /&gt;
Hence, you must run the 'loadTools' script from the command line. From a command-promt or shell you must go into the root folder of your robocode workspace. Next you run the loadTools script.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  cd tools&lt;br /&gt;
  loadTools&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  cd ./tools&lt;br /&gt;
  ./loadTools.sh&lt;br /&gt;
&lt;br /&gt;
==== Preparing your workspace for Eclipse ====&lt;br /&gt;
&lt;br /&gt;
Next we must prepare your workspace for Eclipse. Eclipse needs the project files, class files, and other configuration files in order order to let you view, edit, and compile Robocode. Maven provides support for using Eclipse with Maven. You can read more about this here:&lt;br /&gt;
&lt;br /&gt;
* [http://maven.apache.org/guides/mini/guide-ide-eclipse.html Guide to using Eclipse with Maven 2.x]&lt;br /&gt;
&lt;br /&gt;
I highly recommend you to read this in order to understand how Eclipse and Maven works together.&lt;br /&gt;
&lt;br /&gt;
First, we need to create all the required Eclipse files, which we do with another Maven command.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvn eclipse:eclipse&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  ./mvn.sh eclipse:eclipse&lt;br /&gt;
&lt;br /&gt;
Next, you should compile the sources of Robocode in order to have your local Maven repository created and prepared for later.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvn compile&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  ./mvn.sh compile&lt;br /&gt;
&lt;br /&gt;
Now your Robocode workspace is ready almost ready. You just need to import all the projects into your Eclipse workspace. You do this by starting up Eclipse with your Robocode workspace. From the menu bar you select 'File' -&amp;gt; 'Import...' -&amp;gt; 'Existing Projects into Workspace'. Now select the root directory to be the root path of your Robocode workspace. You should see a list of Robocode project. When you do, you must press 'Finish'.&lt;br /&gt;
&lt;br /&gt;
==== M2_REPO class path variable ====&lt;br /&gt;
&lt;br /&gt;
The last thing you need to do is to set up the M2_REPO class path variable for Eclipse, so Eclipse knows where to locate the Maven repository. When building Robocode using Maven, Maven will download all required classes from other sites into this local Maven repository. Hence, Eclipse needs to know the class path for this Maven repository in order to compile all the sources of Robocode. So you need to locate your local Maven repository. Under Windows your Maven repository is put into your %USERPROFILE% directory, and on Linux is put into your home directory (~).&lt;br /&gt;
&lt;br /&gt;
In Eclipse, you go to the menu bar and select 'Window' -&amp;gt; 'Preferences'. On the Preferences window expand the 'Java' -&amp;gt; 'Build Path' and select the 'Classpath Variables'. On the page for the Classpath Variables, you click on the 'New...' button, and enter ''M2_REPO'' as name. Next, you click on the 'Folder...' button and navigate to where you have your .m2/repository directory located (in %USERPROFILE% under Windows, and ~ under Linux), e.g. &amp;lt;code&amp;gt;H:/Users/Flemming/.m2/repository&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/home/fnl/.m2/repository&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
When Eclipse ask you if you want to rebuild the workspace, you select 'Yes' in order to rebuild everything so you are ready to work on Robocode.&lt;br /&gt;
&lt;br /&gt;
==== How to start Robocode in Eclipse? ====&lt;br /&gt;
&lt;br /&gt;
When all sources builds without errors (warnings are expected), you are able to launch Robocode. You do this by selecting 'Run' -&amp;gt; 'Run Configurations...' from th Menu. On the window that shows up, you expand the 'Java Applications', select 'Robocode', and press the 'Run' button.&lt;br /&gt;
&lt;br /&gt;
If you need to start other parts of Robocode like e.g. RoboRumble, you need to create a launch configuration for it, in order to be able to launch it. You can read more about how to create your own launch configurations in Eclipse in this [http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.jdt.doc.user/tasks/tasks-java-local-configuration.htm guide]. This guide is also helpful if you want to modify the Robocode.launch configuration available for launching the Robocode game.&lt;br /&gt;
&lt;br /&gt;
==== How to run the unit tests? ====&lt;br /&gt;
&lt;br /&gt;
When you want to run the unit test from within Eclipse, you must do this from the the Package Explorer, where you right-click on the 'robocode.tests' project and select 'Run As' -&amp;gt; 'JUnit Test'. Now all available unit tests will run automatically.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can start the tests from the command-line by standing on your robocode workspace, and write the following Maven command.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvn test install&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  ./mvn.sh test install&lt;br /&gt;
&lt;br /&gt;
==== How to build the distribution files? ====&lt;br /&gt;
&lt;br /&gt;
In order to build the distribution files containing the installer setup file (robocode-x.x.x-setup.jar) and a .zip file containing all the sources (robocode-x.x.x-src.zip) you start the following batch/shell file wrong the command-line within the robocode workspace directoty.&lt;br /&gt;
&lt;br /&gt;
On Windows:&lt;br /&gt;
  mvnassembly&lt;br /&gt;
&lt;br /&gt;
On Linux:&lt;br /&gt;
  ./mvnassembly.sh&lt;br /&gt;
&lt;br /&gt;
This will build the distribution files, which will be put into the sub-directory named ''target''.&lt;br /&gt;
&lt;br /&gt;
=== Robocode developers and contributions ===&lt;br /&gt;
&lt;br /&gt;
Robocode developers have discussion group at robocode-developers@googlegroups.com. Everybody interested in discussion about future of Robocode are welcome. We also welcome your contributions there. The discussion group is located here: http://groups.google.com/group/robocode-developers.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Robocode/Old Developers Guide for building Robocode|Old version]] of the Developer's Guide for building Robocode for Robocode versions prior to version 1.7.&lt;br /&gt;
* [http://code.google.com/p/robocode/source/browse/ Browse the sources] of Robocode.&lt;br /&gt;
* [http://sourceforge.net/project/showfiles.php?group_id=37202&amp;amp;package_id=218677 Download the sources] of Robocode.&lt;br /&gt;
* [http://groups.google.com/group/robocode-developers Robocode developers discussion group].&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* The [http://sourceforge.net/projects/robocode Robocode project] on SourceForge.&lt;br /&gt;
* [http://sourceforge.net/svn/?group_id=37202 How to access] the SVN Repository for Robocode.&lt;br /&gt;
* [http://www.eclipse.org/ Eclipse] - an open development platform supported by Robocode.&lt;br /&gt;
* [http://maven.apache.org/ Apache Maven] used for building Robocode.&lt;br /&gt;
* [http://maven.apache.org/guides/mini/guide-ide-eclipse.html Guide] to using Eclipse with Maven 2.x.&lt;br /&gt;
* [http://www.eclipse.org/subversive/ Eclipse Subversive] is a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://subclipse.tigris.org/ Subclipse] is also a plugin used for accessing Subversion from Eclipse.&lt;br /&gt;
* [http://tortoisesvn.net TortoiseSVN], a Subversion client for Windows.&lt;br /&gt;
* [http://www.open.collab.net/downloads/subversion/ CollabNets Subversion], a Subversion client for both Windows and Linux.&lt;br /&gt;
&lt;br /&gt;
[[Category:Robocode Documentation]]&lt;br /&gt;
[[Category:Eclipse IDE]]&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Talk:Robocode/Developers_Guide_for_building_Robocode&amp;diff=26796</id>
		<title>Talk:Robocode/Developers Guide for building Robocode</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Talk:Robocode/Developers_Guide_for_building_Robocode&amp;diff=26796"/>
		<updated>2012-09-18T21:52:10Z</updated>

		<summary type="html">&lt;p&gt;FlemmingLarsen: moved Talk:Robocode/Developers Guide for building Robocode to Talk:Old Robocode/Developers Guide for building Robocode: Deprecated - replaced with new one for Git.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Talk:Robocode/Old Developers Guide for building Robocode]]&lt;/div&gt;</summary>
		<author><name>FlemmingLarsen</name></author>
		
	</entry>
</feed>