Re: Robocode crashing at intialization

fnl <[email protected]> Sat, 5 Nov 2022 01:59:59 -0700 (PDT)
Newsgroups gmane.comp.java.robocode
Message-ID <[email protected]>
------=_Part_5065_699324756.1667638799594
Content-Type: multipart/alternative; 
	boundary="----=_Part_5066_1390719071.1667638799594"

------=_Part_5066_1390719071.1667638799594
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hello everybody,

Newer versions of Robocode has issues with running with Java 12 or newer=20
unless this option is being used: -Djava.security.manager=3Dallow
Robocode make use of the Security Manager in Java, which is now *deprecated=
=20
for removal*. Hence, setting the java.security.manager to allow will make=
=20
sure the Security Manager can still be used.

l=C3=B8rdag den 5. november 2022 kl. 09.50.40 UTC+1 skrev [email protected]=
om:

> please i have this issue any solution ????
>
> On Thursday, October 6, 2022 at 6:21:24 AM UTC-7 fnl wrote:
>
>> Thank you for the follow-up. =F0=9F=99=82=F0=9F=91=8D
>>  I will keep this in mind if we see this issue again, which is very=20
>> likely.
>>
>> Cheers,
>> - Flemming
>>
>> mandag den 3. oktober 2022 kl. 22.38.57 UTC+2 skrev [email protected]:
>>
>>> Hello Flemming,
>>>
>>> Just had the same issue now on Ubuntu20.04 using jdk-17.0.4.1+1 from=20
>>> https://adoptium.net/temurin/releases/ (amongst others). I am sill a=20
>>> bit confused between Gradle, Jetbrains and OS configuration of the JDKs=
,=20
>>> however I thinks that is what I configured. In the end to get the test=
=20
>>> (mostly) running I had to use the VM option=20
>>> "--add-opens=3Djava.base/java.util=3DALL-UNNAMED" as described in=20
>>> https://github.com/junit-pioneer/junit-pioneer/issues/509. Although=20
>>> 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)=
=20
>>>> on Windows 11, where it seems to run.
>>>>
>>>> I suggest you try to use an older Java version when running Robocode,=
=20
>>>> e.g. version 11.
>>>>
>>>> Which version of Java are you running? You can find out by writting=20
>>>> 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=20
>>>>> Robocode for a college assignment. I did a basic program in eclipse, =
and=20
>>>>> set Robocode to initialize from there. Robocode starts up and then cr=
ashes.=20
>>>>> 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=
=20
>>>>> called
>>>>> WARNING: System::setSecurityManager has been called by=20
>>>>> net.sf.robocode.host.security.RobocodeSecurityManager=20
>>>>> (file:/C:/robocode/libs/robocode.host-1.9.4.5.jar)
>>>>> WARNING: Please consider reporting this to the maintainers of=20
>>>>> net.sf.robocode.host.security.RobocodeSecurityManager
>>>>> WARNING: System::setSecurityManager will be removed in a future relea=
se
>>>>> java.lang.ExceptionInInitializerError
>>>>>     at=20
>>>>> net.sf.robocode.repository.RepositoryManager.reload(RepositoryManager=
.java:164)
>>>>>     at=20
>>>>> 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=
=20
>>>>> make field private static final java.util.HashMap=20
>>>>> sun.net.www.protocol.jar.JarFileFactory.fileCache accessible: module=
=20
>>>>> java.base does not "opens sun.net.www.protocol.jar" to unnamed module=
=20
>>>>> @529abded
>>>>>     at=20
>>>>> java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(Ac=
cessibleObject.java:354)
>>>>>     at=20
>>>>> java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(Ac=
cessibleObject.java:297)
>>>>>     at=20
>>>>> java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:17=
8)
>>>>>     at java.base/java.lang.reflect.Field.setAccessible(Field.java:172=
)
>>>>>     at=20
>>>>> net.sf.robocode.io.URLJarCollector.<clinit>(URLJarCollector.java:48)
>>>>>     ... 4 more
>>>>>
>>>>> java.lang.ExceptionInInitializerError
>>>>>     at=20
>>>>> net.sf.robocode.repository.RepositoryManager.reload(RepositoryManager=
.java:164)
>>>>>     at=20
>>>>> 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=
=20
>>>>> make field private static final java.util.HashMap=20
>>>>> sun.net.www.protocol.jar.JarFileFactory.fileCache accessible: module=
=20
>>>>> java.base does not "opens sun.net.www.protocol.jar" to unnamed module=
=20
>>>>> @529abded
>>>>>     at=20
>>>>> java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(Ac=
cessibleObject.java:354)
>>>>>     at=20
>>>>> java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(Ac=
cessibleObject.java:297)
>>>>>     at=20
>>>>> java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:17=
8)
>>>>>     at java.base/java.lang.reflect.Field.setAccessible(Field.java:172=
)
>>>>>     at=20
>>>>> net.sf.robocode.io.URLJarCollector.<clinit>(URLJarCollector.java:48)
>>>>>     ... 4 more
>>>>>
>>>>>

--=20
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 e=
mail to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/=
robocode/d0266dca-aa8c-4895-9ced-f377fc19e6dan%40googlegroups.com.

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

Hello everybody,<div><br></div><div>Newer versions of Robocode has issues w=
ith running with Java 12 or newer unless this option is being used: <font f=
ace=3D"Times New Roman">-Djava.security.manager=3Dallow</font><br>Robocode =
make use of the Security Manager in Java, which is now <i>deprecated for re=
moval</i>. Hence, setting the<font face=3D"Courier New">&nbsp;java.security=
.manager</font> to allow will make sure the Security Manager can still be u=
sed.<br><br></div><div class=3D"gmail_quote"><div dir=3D"auto" class=3D"gma=
il_attr">l=C3=B8rdag den 5. november 2022 kl. 09.50.40 UTC+1 skrev heromo..=
[email protected]:<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;">=
please i have this issue any solution ????<br><br><div class=3D"gmail_quote=
"></div><div class=3D"gmail_quote"><div dir=3D"auto" class=3D"gmail_attr">O=
n Thursday, October 6, 2022 at 6:21:24 AM UTC-7 fnl wrote:<br></div></div><=
div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margin=
:0 0 0 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thank=
 you for the follow-up. =F0=9F=99=82=F0=9F=91=8D<div>=C2=A0I will keep this=
 in mind if we see this issue again, which is very likely.</div><div><br></=
div><div>Cheers,<br></div><div>- Flemming</div><div><br></div><div class=3D=
"gmail_quote"><div dir=3D"auto" class=3D"gmail_attr">mandag den 3. oktober =
2022 kl. 22.38.57 UTC+2 skrev <a rel=3D"nofollow">[email protected]</a>:<b=
r></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 0.8ex;borde=
r-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Hello Flemming,</d=
iv><div><br></div><div>Just had the same issue now on Ubuntu20.04 using jdk=
-17.0.4.1+1 from <a href=3D"https://adoptium.net/temurin/releases/" rel=3D"=
nofollow" target=3D"_blank" data-saferedirecturl=3D"https://www.google.com/=
url?hl=3Dda&amp;q=3Dhttps://adoptium.net/temurin/releases/&amp;source=3Dgma=
il&amp;ust=3D1667724819608000&amp;usg=3DAOvVaw1vBdiGP4VkClYKx04TpGge">https=
://adoptium.net/temurin/releases/</a> (amongst others). I am sill a bit con=
fused 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) runn=
ing I had to <span>use the VM option &quot;--add-opens=3Djava.base/java.uti=
l=3DALL-UNNAMED&quot; as described in <a href=3D"https://github.com/junit-p=
ioneer/junit-pioneer/issues/509" rel=3D"nofollow" target=3D"_blank" data-sa=
feredirecturl=3D"https://www.google.com/url?hl=3Dda&amp;q=3Dhttps://github.=
com/junit-pioneer/junit-pioneer/issues/509&amp;source=3Dgmail&amp;ust=3D166=
7724819608000&amp;usg=3DAOvVaw2R5amz6yNMn4nZCsE3tQ-T">https://github.com/ju=
nit-pioneer/junit-pioneer/issues/509</a>. Although this has nothing to do w=
ith robocode, that helped.<br></span></div><div><span><br></span></div><div=
><span>BR<br></span></div>Alessandro<br><div class=3D"gmail_quote"><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 se=
ems to be a problem with the Java version.<br>I have tested Robocode agains=
t Java 17 with Eclipse Adoptium=C2=A0(Temurin) on Windows 11, where it seem=
s 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 Java are you running? Y=
ou can find out by writting this command from the command 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" styl=
e=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 i=
n eclipse, and set Robocode to initialize from there. Robocode starts up an=
d then crashes. Has anyone every seen this? Please Please Help....Thanks</d=
iv><div><br></div><div>See the fault below from the console.....<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>L=
oaded net.sf.robocode.host<br>Loaded net.sf.robocode.repository<br>Loaded n=
et.sf.robocode.sound<br>Loaded net.sf.robocode.ui<br>Loaded net.sf.robocode=
.ui.editor<br>No robocode.properties. Using defaults.<br>No robocode.proper=
ties. Using defaults.<br>WARNING: A terminally deprecated method in java.la=
ng.System has been called<br>WARNING: System::setSecurityManager has been c=
alled by net.sf.robocode.host.security.RobocodeSecurityManager (file:/C:/ro=
bocode/libs/robocode.host-1.9.4.5.jar)<br>WARNING: Please consider reportin=
g this to the maintainers of net.sf.robocode.host.security.RobocodeSecurity=
Manager<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(RepositoryManager.java:164)<b=
r>=C2=A0 =C2=A0 at net.sf.robocode.ui.WindowManager.showSplashScreen(Window=
Manager.java:358)<br>=C2=A0 =C2=A0 at net.sf.robocode.core.RobocodeMain.run=
(RobocodeMain.java:124)<br>=C2=A0 =C2=A0 at java.base/java.lang.Thread.run(=
Thread.java:833)<br>Caused by: java.lang.reflect.InaccessibleObjectExceptio=
n: Unable to make field private static final java.util.HashMap sun.net.www.=
protocol.jar.JarFileFactory.fileCache accessible: module 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.AccessibleObject.checkCanSetAc=
cessible(AccessibleObject.java:354)<br>=C2=A0 =C2=A0 at java.base/java.lang=
.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)<=
br>=C2=A0 =C2=A0 at java.base/java.lang.reflect.Field.checkCanSetAccessible=
(Field.java:178)<br>=C2=A0 =C2=A0 at java.base/java.lang.reflect.Field.setA=
ccessible(Field.java:172)<br>=C2=A0 =C2=A0 at net.sf.robocode.io.URLJarColl=
ector.&lt;clinit&gt;(URLJarCollector.java:48)<br>=C2=A0 =C2=A0 ... 4 more<b=
r><br>java.lang.ExceptionInInitializerError<br>=C2=A0 =C2=A0 at net.sf.robo=
code.repository.RepositoryManager.reload(RepositoryManager.java:164)<br>=C2=
=A0 =C2=A0 at net.sf.robocode.ui.WindowManager.showSplashScreen(WindowManag=
er.java:358)<br>=C2=A0 =C2=A0 at net.sf.robocode.core.RobocodeMain.run(Robo=
codeMain.java:124)<br>=C2=A0 =C2=A0 at java.base/java.lang.Thread.run(Threa=
d.java:833)<br>Caused by: java.lang.reflect.InaccessibleObjectException: Un=
able to make field private static final java.util.HashMap sun.net.www.proto=
col.jar.JarFileFactory.fileCache accessible: module java.base does not &quo=
t;opens sun.net.www.protocol.jar&quot; to unnamed module @529abded<br>=C2=
=A0 =C2=A0 at java.base/java.lang.reflect.AccessibleObject.checkCanSetAcces=
sible(AccessibleObject.java:354)<br>=C2=A0 =C2=A0 at java.base/java.lang.re=
flect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)<br>=
=C2=A0 =C2=A0 at java.base/java.lang.reflect.Field.checkCanSetAccessible(Fi=
eld.java:178)<br>=C2=A0 =C2=A0 at java.base/java.lang.reflect.Field.setAcce=
ssible(Field.java:172)<br>=C2=A0 =C2=A0 at net.sf.robocode.io.URLJarCollect=
or.&lt;clinit&gt;(URLJarCollector.java:48)<br>=C2=A0 =C2=A0 ... 4 more<br><=
br></blockquote></div></blockquote></div></blockquote></div></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/d0266dca-aa8c-4895-9ced-f377fc19e6dan%40googlegroups.co=
m?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid=
/robocode/d0266dca-aa8c-4895-9ced-f377fc19e6dan%40googlegroups.com</a>.<br =
/>

------=_Part_5066_1390719071.1667638799594--

------=_Part_5065_699324756.1667638799594--