0

I have installed latest Java version then tried to install Robocode from terminal and from sourceforge but in first case i got an error:

 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.robocodeMain(HiddenAccess.java:279)
    at robocode.Robocode.main(Robocode.java:27)

Can't find robocode.core-1.x.jar module near to robocode.jar
Class path: /usr/share/java/robocode.jar

I also tried installing from setup.jar but then in file directory there is no robocode.sh file. any suggestions?

SgerS1
  • 131
  • 5
  • `from terminal` how? `apt install `? `sourceforge` link? which `setup.jar` did you download from some where? If yes post the link. What is your OS? – Subir Kumar Sao Jun 05 '19 at 22:34
  • @SubirKumarSao link [https://sourceforge.net/projects/robocode/files/] . after downloading i put the file on desktop, then from terminal : `cd Desktop/robocode-1.9.3.6-setup.jar` then `java -jar robocode-1.9.3.6-setup.jar` and when it finished installation i went to it's file directory from terminal then `robocode.sh` to start the program but nothing happened. edit:i fixed it. problem was that i did all the updates and things but as it seems it needed restart. f**k – SgerS1 Jun 06 '19 at 07:05
  • If you installed robocode from the Debian repositories (or any of its derivative repositories e.g. from Ubuntu), see: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=929483. Also see: https://sourceforge.net/p/robocode/bugs/407/. This problem has something to do with the use of Java 11. – Flux Jan 10 '20 at 01:29

1 Answers1

0

Robocode does not support Java 11 yet. So you have to do some work before like adding all the jar files under /libs to your class path.

That was a more work than I wanted, so I changed my compiler to an older version, Java 1.8. Either way it works.

Hernanvq
  • 13
  • 2