Jonathan Addison
2017-03-22 14:22:22 UTC
Hello, I'm trying to write a genetic program for robocode. I want the
battles to be automated, so that I can run the program at night. However, I
can't seem to work out how to do it. I've Ctrl-C the source code from
http://robocode.sourceforge.net/docs/robocode/robocode/control/package-summary.html (I
believe this is for robocode 1.9.2.0) and I'm definitely using 1.9.2.4 . It
compiles, but I get a runtime error.
I enter java BattleRunner on the command line (I use Windows 10)
I've tried java -jar robocode.jar BattleRunner and that doesn't change
anything.
and get this Error: A JNI error has occurred, please check your
installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError:
robocode/control/events/IBattleListener
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException:
robocode.control.events.IBattleListener
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 7 more
My robocode is installed @ C:\robocode. BattleRunner is stored @
C:\robocode\libs.
I can robocode from the command line, but once that's open I can't use the
command prompt.
I'm very sorry, if this has already been answered, many thanks for your
time.
battles to be automated, so that I can run the program at night. However, I
can't seem to work out how to do it. I've Ctrl-C the source code from
http://robocode.sourceforge.net/docs/robocode/robocode/control/package-summary.html (I
believe this is for robocode 1.9.2.0) and I'm definitely using 1.9.2.4 . It
compiles, but I get a runtime error.
I enter java BattleRunner on the command line (I use Windows 10)
I've tried java -jar robocode.jar BattleRunner and that doesn't change
anything.
and get this Error: A JNI error has occurred, please check your
installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError:
robocode/control/events/IBattleListener
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException:
robocode.control.events.IBattleListener
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 7 more
My robocode is installed @ C:\robocode. BattleRunner is stored @
C:\robocode\libs.
I can robocode from the command line, but once that's open I can't use the
command prompt.
I'm very sorry, if this has already been answered, many thanks for your
time.
--
You received this message because you are subscribed to the Google Groups "robocode" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robocode+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "robocode" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robocode+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.