Where do I find the robocode.control and robocode.control.events packages?
I'm trying to set up a program using the java robocode control API, I've found the example battle runner but I don't know how to get that running. Directing the engine to my robocode directory does not solve the problem as the program can't import robocode.control or robocode.control.events.
I tried extracting the contents of robocode/libs and running the battlerunner in that directory, but that just threw errors "Main modules not loaded"
Hopefully this is the right place to post this.
Last edit: lonzo99 2014-03-09
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Basically, you can create a new Java project/application in your favorite development environment and create a new source file named BattleRunner.java and copy paste the code from the example directly into this source file.
In order to satisfy the compiler regarding the robocode.control and robocode.control.events packages, you just need to add the robocode.jar file as a class path to your Java project.
The robocode.jar file is located under the 'libs' in the Robocode install directory e.g. C:\robocode or somewhere else, where you installed Robocode.
I hope this helps? :-)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Where do I find the robocode.control and robocode.control.events packages?
I'm trying to set up a program using the java robocode control API, I've found the example battle runner but I don't know how to get that running. Directing the engine to my robocode directory does not solve the problem as the program can't import robocode.control or robocode.control.events.
I tried extracting the contents of robocode/libs and running the battlerunner in that directory, but that just threw errors "Main modules not loaded"
Hopefully this is the right place to post this.
Last edit: lonzo99 2014-03-09
Basically, you can create a new Java project/application in your favorite development environment and create a new source file named BattleRunner.java and copy paste the code from the example directly into this source file.
In order to satisfy the compiler regarding the robocode.control and robocode.control.events packages, you just need to add the robocode.jar file as a class path to your Java project.
The robocode.jar file is located under the 'libs' in the Robocode install directory e.g. C:\robocode or somewhere else, where you installed Robocode.
I hope this helps? :-)
Perfect, thank you so much :D