Re: [robocode-developers] Digest for robocode-developers@googlegroups.com - 3 updates in 1 topic

49 views
Skip to first unread message

Flemming N. Larsen

unread,
Sep 9, 2017, 10:25:11 AM9/9/17
to robocode-...@googlegroups.com
Hi Rakhitha,

Its a strange problem with the error message you got:

Error: A JNI error has occurred, please check your installation and try
again
Exception in thread "main" java.lang.ClassFormatError: Unknown constant tag
98 in class file Loader
...

To me it seems like a Java problem?!

I have no problem building Robocode on a Windows 10 PC. When using 'mvnassembly', your local 'mvn' version should not matter.

Perhaps something is wrong with your Java installation? JAVA_HOME must be set you point on a Oracle JDK, e.g. JDK 8.
I have also set up MAVEN_HOME to point on my Maven dir (3.3.9)

You might also try to rename your .m2 (Maven) directory temporarily to e.g. .m2_old to see if some downloaded files from Maven have become corrupt?

This is my info:

>java -version
java version "9"
Java(TM) SE Runtime Environment (build 9+181)
Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)

>javac -version
javac 1.8.0_141

>mvn -version   (in 'robocode' workspace dir):
Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
Java version: 1.8.0_141
Java home: C:\Program Files\Java\jdk1.8.0_141\jre
Default locale: da_DK, platform encoding: Cp1252
OS name: "windows 10" version: "10.0" arch: "amd64" Family: "dos"

>mvn -version    (not inside 'robocode' workspace dir)
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T17:41:47+01:00)
Maven home: C:\Program Files (x86)\apache-maven-3.3.9\bin\..
Java version: 1.8.0_141, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_141\jre
Default locale: da_DK, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "dos"

fre. 8. sep. 2017 kl. 05.51 skrev <robocode-...@googlegroups.com>:
Rakhitha Karunarathne <rakhitha.k...@gmail.com>: Sep 07 12:46PM +0530

Hi,
 
Thanks for the Info.
 
I am still getting following error with JDK 1.8.
 
Whats interesting is that the same erorr show up if I just run MVN command.
Which made me think problem is with MVN itself.
 
Do I need to use a different version of maven or something?
 
Best Regards!
/Rakhitha
 
Error: A JNI error has occurred, please check your installation and try
again
Exception in thread "main" java.lang.ClassFormatError: Unknown constant tag
98 in class file Loader
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at
sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)
Error: Could not find or load main class org.codehaus.classworlds.Launcher
 
On Wed, Sep 6, 2017 at 11:04 PM, Flemming Larsen <
 
--
--------------------------------------------
Rakhitha .M. Karunarathne
http://RaKasUniverse.info
Rakhitha Karunarathne <rakhitha.k...@gmail.com>: Sep 07 02:04PM +0530

Hi Again,
 
Sorry about repeated mails.
 
I was able to narrow down the error to following line in LoadTools.cmd
 
java -cp "%~dp0\loader" Loader http://robocode.sourceforge.net/tools/libs/
"%~dp0\lib/" ant.jar ant-contrib-0.6.jar ant-launcher.jar jacobe.jar
junit.jar classworlds-1.1.jar maven-2.2.1-uber.jar
 
Any ideas?
 
Best Regards
/Rakhitha
 
 
 
On Thu, Sep 7, 2017 at 12:46 PM, Rakhitha Karunarathne <
 
--
--------------------------------------------
Rakhitha .M. Karunarathne
http://RaKasUniverse.info
Rakhitha Karunarathne <rakhitha.k...@gmail.com>: Sep 07 02:09PM +0530

got it fixed. just downloaded those files manually.
 
On Thu, Sep 7, 2017 at 2:04 PM, Rakhitha Karunarathne <
 
--
--------------------------------------------
Rakhitha .M. Karunarathne
http://RaKasUniverse.info
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to robocode-develo...@googlegroups.com.

Rakhitha Karunarathne

unread,
Sep 11, 2017, 1:28:45 AM9/11/17
to robocode-developers
Hi,

Thanks for the comments.

You seems to be using a separate Maven installation. Which also worked for my. However I am still having some additional issues now.


"net.sf.robocode.host.jarjar.JarJarTest" is failing with error "src\test\resources\Outer.jar (The system cannot find the path specified)".

There is no such file in the path. I tried with a Outer.jar file which I took from some online path (from robocode version 1.7.2.2). Which fixed the build. But finished version did not run.

Do you have any suggestion on how to get through missing Outer.jar error?

Best Regards!
/Rakhitha
To unsubscribe from this group and stop receiving emails from it send an email to robocode-developers+unsub...@googlegroups.com.

Flemming Larsen

unread,
Sep 12, 2017, 4:32:54 PM9/12/17
to robocode-developers
Hi Rakhitha,

I think I found the cause of the problems. You build Robocode from robocode-1.9.2.6-src.zip.
This is okay to do, but it seems like files are missing from the .zip file, like e.g. the Outer.jar file.
I think I will need to try to build everything from the zip file to check if another stuff is missing as well.

I just check my file system and also the checked file on GitHub fro the current version 1.9.2.6 of Robocode.
The file is here:

Perhaps you could try to checkout the Robocode sources from GitHub to another Robocode workspace, and try to build from these sources?
I am sure that this fixes your problems.

Then I will check up on the sources.zip file, when time allows it.

Rakhitha Karunarathne

unread,
Sep 13, 2017, 6:11:24 AM9/13/17
to robocode-...@googlegroups.com
Thanks and will do and let you know the result.

Before this I did manage to get a build by commenting out JarJarTest.java. Also by placing an Outer.jar from an older version. Because it seams that Outer.jar is just there for a test and is not added to final distribution.
Hover that build did not run (No errors, just loaded until it try to locate a properties file and then exited). So something more than Outer.jar has to be missing.

Will test with your files and let you know. I may be able to do a file comparison as well.

Best Regards!
/Rakhitha

--

---
You received this message because you are subscribed to the Google Groups "robocode-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robocode-developers+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages