Hi.
I am trying to compile the robots and I get the message:
Compiling...
Unable to load annotation processing manager org.eclipse.jdt.internal.compiler.apt.dispatch.BatchAnnotationProcessorManager from classpath.
Compile Failed (-1)
---- Codesize ----
Codesize: 4369 bytes
Robot weight class: MegaBot (codesize >= 1500 bytes)
How can I to fix it?
Thanks.
You do not write which OS you are running Robocode on, or if you are using a JRE/JDK from Oracle + which Java version.
With Robocode you have several options for compiling a robot:
1) Compile robots using the JDK (found here)
2) Compile robots using the built-in ECJ (Eclipse Compiler for Java)
3) Build robots using an external IDE like e.g. Eclipse, IntelliJ or Netbeans
If you are running Robocode "stand-alone" outside an IDE, you could try to reset the compiler by clicking Compiler -> Options -> Reset Compiler from the Robocode Editor. If you have the JDK installed correctly, Robocode should be able to locate the 'javac' compiler automatically. You can choose to use the Eclipse Compiler for Java instead as well.
HI,
Clean install of java and Robocode today.
jre1.8.0_181.
Windows 10.
Built in compiler.
Same error :(
Running from a command line :
java -cp compilers/ecj.jar org.eclipse.jdt.internal.compiler.batch.Main -deprecation -g -source 1.6 -encoding UTF-8 -classpath "C:\Program Files\Java\jre1.8.0_181/lib/rt.jar";libs\robocode.jar;C:\robocode\robots C:\robocode\robots\njb\Rastas.java
gives:
Error: Could not find or load main class org.eclipse.jdt.internal.compiler.batch.Main
Not sure what basic 1st step ive missed
Update after looking at someone elses problem i tried removing "-source 1.6" from the compile options. I dont know what that does, but it now compiles.
Thanks for the tips for "-source 1.6". It simply means that the compiled code is for Java 6 (1.6). But with newer versions of java, it can be left out.
Hence, I will remove it with the next release of Robocode. :-)
Ticket moved from /p/robocode/support-requests/27/