Menu

#407 RobocodeEngine: Can't find robocode.core-1.x.jar

1.9.3.7
closed
None
1
2019-08-31
2019-05-11
No

I'm trying to start Robocode from a Java project in Eclipse using RobocodeEngine, but everytime I try it fails with the following:

java.lang.ClassNotFoundException: net.sf.robocode.core.RobocodeMainBase
    at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
    at net.sf.robocode.security.HiddenAccess.init(HiddenAccess.java:86)
    at net.sf.robocode.security.HiddenAccess.initContainerForRobotEngine(HiddenAccess.java:246)
    at robocode.control.RobocodeEngine.init(RobocodeEngine.java:138)
    at robocode.control.RobocodeEngine.<init>(RobocodeEngine.java:72)
    at prueba.RouteFinder.main(RouteFinder.java:40)

Can't find robocode.core-1.x.jar module near to robocode.jar
Class path: /home/rober/Documentos/robocode/Robocode/bin:/opt/robocode/libs/robocode.jar

Which is stupid because robocode.core-.jar, is exactly in the location it is looking for robocode.jar (/opt/robocode/libs), so it has to be a bug.

Information

  • OS: Arch Linux x64
  • Robocode: 1.9.3.4 installed from AUR / 1.9.3.5 installed from this repository
  • Java 11

Discussion

  • Flemming N. Larsen

    Robocode does not support Java 11 yet.

    That said, you should be able to get the RobocodeEngine up and running on Java 11. I just did that.
    You "just" need to add all the jar files under /libs to your class path.

    Newer Java versions require you to explicitly add which jars and modules you need for your application. You can leave out roborumble.jar. If you don't use the Robocode UI, you can leave out those jar files as well.

     

    Last edit: Flemming N. Larsen 2019-05-12
  • Flemming N. Larsen

    I will definitely update the Javadoc for the RobocodeEngine with this information. However, an ordinary robot project only needs robocode.jar, which includes "only" the Robot API. :-)

     

    Last edit: Flemming N. Larsen 2019-05-13
  • Flemming N. Larsen

    • status: open --> closed
    • assigned_to: Flemming N. Larsen
    • Group: Future Release --> 1.9.3.7
     

Log in to post a comment.

MongoDB Logo MongoDB