Re: Robocode crashing at intialization

Alessandro <[email protected]> Mon, 3 Oct 2022 10:00:14 -0700 (PDT)
Newsgroups gmane.comp.java.robocode
Message-ID <[email protected]>
------=_Part_6903_863747291.1664816414024
Content-Type: multipart/alternative; 
	boundary="----=_Part_6904_1893278910.1664816414024"

------=_Part_6904_1893278910.1664816414024
Content-Type: text/plain; charset="UTF-8"

Hello Flemming,

Just had the same issue now on Ubuntu20.04 using jdk-17.0.4.1+1 from 
https://adoptium.net/temurin/releases/ (amongst others). I am sill a bit 
confused between Gradle, Jetbrains and OS configuration of the JDKs, 
however I thinks that is what I configured. In the end to get the test 
(mostly) running I had to use the VM option 
"--add-opens=java.base/java.util=ALL-UNNAMED" as described in 
https://github.com/junit-pioneer/junit-pioneer/issues/509. Although this 
has nothing to do with robocode, that helped.

BR
Alessandro
fnl schrieb am Dienstag, 5. April 2022 um 20:00:32 UTC+2:

> It seems to be a problem with the Java version.
> I have tested Robocode against Java 17 with Eclipse Adoptium (Temurin) on 
> Windows 11, where it seems to run.
>
> I suggest you try to use an older Java version when running Robocode, e.g. 
> version 11.
>
> Which version of Java are you running? You can find out by writting this 
> command from the command line:
>
> java -version
>
> Best regards,
>
> - Flemming
> tirsdag den 5. april 2022 kl. 19.58.02 UTC+2 skrev John Davis:
>
>> Hi
>> can anyone help me please? I'm trying to setup a basic robot in Robocode 
>> for a college assignment. I did a basic program in eclipse, and set 
>> Robocode to initialize from there. Robocode starts up and then crashes. Has 
>> anyone every seen this? Please Please Help....Thanks
>>
>> See the fault below from the console.....
>>
>> Loaded net.sf.robocode.api
>> Loaded net.sf.robocode.core
>> Loading plugins from C:\robocode\libs
>> Loaded net.sf.robocode.battle
>> Loaded net.sf.robocode.host
>> Loaded net.sf.robocode.repository
>> Loaded net.sf.robocode.sound
>> Loaded net.sf.robocode.ui
>> Loaded net.sf.robocode.ui.editor
>> No robocode.properties. Using defaults.
>> No robocode.properties. Using defaults.
>> WARNING: A terminally deprecated method in java.lang.System has been 
>> called
>> WARNING: System::setSecurityManager has been called by 
>> net.sf.robocode.host.security.RobocodeSecurityManager 
>> (file:/C:/robocode/libs/robocode.host-1.9.4.5.jar)
>> WARNING: Please consider reporting this to the maintainers of 
>> net.sf.robocode.host.security.RobocodeSecurityManager
>> WARNING: System::setSecurityManager will be removed in a future release
>> java.lang.ExceptionInInitializerError
>>     at 
>> net.sf.robocode.repository.RepositoryManager.reload(RepositoryManager.java:164)
>>     at 
>> net.sf.robocode.ui.WindowManager.showSplashScreen(WindowManager.java:358)
>>     at net.sf.robocode.core.RobocodeMain.run(RobocodeMain.java:124)
>>     at java.base/java.lang.Thread.run(Thread.java:833)
>> Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make 
>> field private static final java.util.HashMap 
>> sun.net.www.protocol.jar.JarFileFactory.fileCache accessible: module 
>> java.base does not "opens sun.net.www.protocol.jar" to unnamed module 
>> @529abded
>>     at 
>> java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
>>     at 
>> java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
>>     at 
>> java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)
>>     at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
>>     at 
>> net.sf.robocode.io.URLJarCollector.<clinit>(URLJarCollector.java:48)
>>     ... 4 more
>>
>> java.lang.ExceptionInInitializerError
>>     at 
>> net.sf.robocode.repository.RepositoryManager.reload(RepositoryManager.java:164)
>>     at 
>> net.sf.robocode.ui.WindowManager.showSplashScreen(WindowManager.java:358)
>>     at net.sf.robocode.core.RobocodeMain.run(RobocodeMain.java:124)
>>     at java.base/java.lang.Thread.run(Thread.java:833)
>> Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make 
>> field private static final java.util.HashMap 
>> sun.net.www.protocol.jar.JarFileFactory.fileCache accessible: module 
>> java.base does not "opens sun.net.www.protocol.jar" to unnamed module 
>> @529abded
>>     at 
>> java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
>>     at 
>> java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
>>     at 
>> java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)
>>     at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
>>     at 
>> net.sf.robocode.io.URLJarCollector.<clinit>(URLJarCollector.java:48)
>>     ... 4 more
>>
>>

-- 
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 [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/robocode/b48e11ae-6412-49bc-9bda-5d039c7d3fd8n%40googlegroups.com.

------=_Part_6904_1893278910.1664816414024
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div>Hello Flemming,</div><div><br></div><div>Just had the same issue now o=
n Ubuntu20.04 using jdk-17.0.4.1+1 from https://adoptium.net/temurin/releas=
es/ (amongst others). I am sill a bit confused between Gradle, Jetbrains an=
d OS configuration of the JDKs, however I thinks that is what I configured.=
 In the end to get the test (mostly) running I had to <span>use the VM opti=
on "--add-opens=3Djava.base/java.util=3DALL-UNNAMED" as described in https:=
//github.com/junit-pioneer/junit-pioneer/issues/509. Although this has noth=
ing to do with robocode, that helped.<br></span></div><div><span><br></span=
></div><div><span>BR<br></span></div>Alessandro<br><div class=3D"gmail_quot=
e"><div dir=3D"auto" class=3D"gmail_attr">fnl schrieb am Dienstag, 5. April=
 2022 um 20:00:32 UTC+2:<br/></div><blockquote class=3D"gmail_quote" style=
=3D"margin: 0 0 0 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding=
-left: 1ex;"><p>It seems to be a problem with the Java version.<br>I have t=
ested Robocode against Java 17 with Eclipse Adoptium=C2=A0(Temurin) on Wind=
ows 11, where it seems to run.</p><p>I suggest you try to use an older Java=
 version when running Robocode, e.g. version 11.<br><br>Which version of Ja=
va are you running? You can find out by writting this command from the comm=
and line:</p><p>java -version</p><p>Best regards,</p><p>- Flemming</p><div =
class=3D"gmail_quote"><div dir=3D"auto" class=3D"gmail_attr">tirsdag den 5.=
 april 2022 kl. 19.58.02 UTC+2 skrev John Davis:<br></div><blockquote class=
=3D"gmail_quote" style=3D"margin:0 0 0 0.8ex;border-left:1px solid rgb(204,=
204,204);padding-left:1ex"><div>Hi</div><div>can anyone help me please? I&#=
39;m trying to setup a basic robot in Robocode for a college assignment. I =
did a basic program in eclipse, and set Robocode to initialize from there. =
Robocode starts up and then crashes. Has anyone every seen this? Please Ple=
ase Help....Thanks</div><div><br></div><div>See the fault below from the co=
nsole.....<br></div><div><br></div>Loaded net.sf.robocode.api<br>Loaded net=
.sf.robocode.core<br>Loading plugins from C:\robocode\libs<br>Loaded net.sf=
.robocode.battle<br>Loaded net.sf.robocode.host<br>Loaded net.sf.robocode.r=
epository<br>Loaded net.sf.robocode.sound<br>Loaded net.sf.robocode.ui<br>L=
oaded net.sf.robocode.ui.editor<br>No robocode.properties. Using defaults.<=
br>No robocode.properties. Using defaults.<br>WARNING: A terminally depreca=
ted method in java.lang.System has been called<br>WARNING: System::setSecur=
ityManager has been called by net.sf.robocode.host.security.RobocodeSecurit=
yManager (file:/C:/robocode/libs/robocode.host-1.9.4.5.jar)<br>WARNING: Ple=
ase consider reporting this to the maintainers of net.sf.robocode.host.secu=
rity.RobocodeSecurityManager<br>WARNING: System::setSecurityManager will be=
 removed in a future release<br>java.lang.ExceptionInInitializerError<br>=
=C2=A0 =C2=A0 at net.sf.robocode.repository.RepositoryManager.reload(Reposi=
toryManager.java:164)<br>=C2=A0 =C2=A0 at net.sf.robocode.ui.WindowManager.=
showSplashScreen(WindowManager.java:358)<br>=C2=A0 =C2=A0 at net.sf.robocod=
e.core.RobocodeMain.run(RobocodeMain.java:124)<br>=C2=A0 =C2=A0 at java.bas=
e/java.lang.Thread.run(Thread.java:833)<br>Caused by: java.lang.reflect.Ina=
ccessibleObjectException: Unable to make field private static final java.ut=
il.HashMap sun.net.www.protocol.jar.JarFileFactory.fileCache accessible: mo=
dule java.base does not &quot;opens sun.net.www.protocol.jar&quot; to unnam=
ed module @529abded<br>=C2=A0 =C2=A0 at java.base/java.lang.reflect.Accessi=
bleObject.checkCanSetAccessible(AccessibleObject.java:354)<br>=C2=A0 =C2=A0=
 at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(Acce=
ssibleObject.java:297)<br>=C2=A0 =C2=A0 at java.base/java.lang.reflect.Fiel=
d.checkCanSetAccessible(Field.java:178)<br>=C2=A0 =C2=A0 at java.base/java.=
lang.reflect.Field.setAccessible(Field.java:172)<br>=C2=A0 =C2=A0 at net.sf=
.robocode.io.URLJarCollector.&lt;clinit&gt;(URLJarCollector.java:48)<br>=C2=
=A0 =C2=A0 ... 4 more<br><br>java.lang.ExceptionInInitializerError<br>=C2=
=A0 =C2=A0 at net.sf.robocode.repository.RepositoryManager.reload(Repositor=
yManager.java:164)<br>=C2=A0 =C2=A0 at net.sf.robocode.ui.WindowManager.sho=
wSplashScreen(WindowManager.java:358)<br>=C2=A0 =C2=A0 at net.sf.robocode.c=
ore.RobocodeMain.run(RobocodeMain.java:124)<br>=C2=A0 =C2=A0 at java.base/j=
ava.lang.Thread.run(Thread.java:833)<br>Caused by: java.lang.reflect.Inacce=
ssibleObjectException: Unable to make field private static final java.util.=
HashMap sun.net.www.protocol.jar.JarFileFactory.fileCache accessible: modul=
e java.base does not &quot;opens sun.net.www.protocol.jar&quot; to unnamed =
module @529abded<br>=C2=A0 =C2=A0 at java.base/java.lang.reflect.Accessible=
Object.checkCanSetAccessible(AccessibleObject.java:354)<br>=C2=A0 =C2=A0 at=
 java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(Accessi=
bleObject.java:297)<br>=C2=A0 =C2=A0 at java.base/java.lang.reflect.Field.c=
heckCanSetAccessible(Field.java:178)<br>=C2=A0 =C2=A0 at java.base/java.lan=
g.reflect.Field.setAccessible(Field.java:172)<br>=C2=A0 =C2=A0 at net.sf.ro=
bocode.io.URLJarCollector.&lt;clinit&gt;(URLJarCollector.java:48)<br>=C2=A0=
 =C2=A0 ... 4 more<br><br></blockquote></div></blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;Robocode&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:[email protected]">robocode+u=
[email protected]</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/d/msgid/robocode/b48e11ae-6412-49bc-9bda-5d039c7d3fd8n%40googlegroups.co=
m?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid=
/robocode/b48e11ae-6412-49bc-9bda-5d039c7d3fd8n%40googlegroups.com</a>.<br =
/>

------=_Part_6904_1893278910.1664816414024--

------=_Part_6903_863747291.1664816414024--