Re: Robocode reading robot database failed when -DNOSECURITY=true
fnl <[email protected]> Mon, 28 Nov 2022 01:18:42 -0800 (PST)
| Newsgroups | gmane.comp.java.robocode |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_9114_605208313.1669627122378 Content-Type: multipart/alternative; boundary="----=_Part_9115_69545615.1669627122378" ------=_Part_9115_69545615.1669627122378 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thank you for reporting this. I have tried this out myself, and I see you are right meaning that we get= =20 a ClassNotFoundException when -DNOSECURITY=3Dtrue I will have a look into this and see if I can make a good fix for it=20 (within a week - no promise?). I will create a new version of Robocode,=20 if/when I succeed. =F0=9F=99=82 Best regards, - Flemming N. Larsen mandag den 28. november 2022 kl. 07.35.51 UTC+1 skrev [email protected]: > Hey guys, I have used robocode for one of my course projects and I am=20 > running into an issue. > > *TL;DR: Not able to load any robot from the robot database (robots/) when= =20 > -DNOSECURITY is set to true.* > > OS: macOS Monterey Version 12.3.1 > Robocode Version: 1.9.4.7 (05-Aug-2022) > JDK: > openjdk version "1.8.0_352" > OpenJDK Runtime Environment (Zulu 8.66.0.15-CA-macos-aarch64) (build=20 > 1.8.0_352-b08) > OpenJDK 64-Bit Server VM (Zulu 8.66.0.15-CA-macos-aarch64) (build=20 > 25.352-b08, mixed mode) > > Description: > I was trying to disable the security manager since I have third-party=20 > dependencies (slf4j, nd4j) for my robot and need additional access.=20 > However, when I try pass in the additional argument -DNOSECURITY =3D true= to=20 > the start up argument provided in robocode.command like following > > java -Xdock:icon=3Drobocode.ico -Xdock:name=3DRobocode -Xmx512M -cp "libs= /*"=20 > -DNOSECURITY=3Dtrue -XX:+IgnoreUnrecognizedVMOptions=20 > "--add-opens=3Djava.base/sun.net.www.protocol.jar=3DALL-UNNAMED"=20 > "--add-opens=3Djava.base/java.lang.reflect=3DALL-UNNAMED"=20 > "--add-opens=3Djava.desktop/javax.swing.text=3DALL-UNNAMED"=20 > "--add-opens=3Djava.desktop/sun.awt=3DALL-UNNAMED" robocode.Robocode $* > > , robocode failed to read any robot files. Those files was successfully= =20 > read if there is no -DNOSECURITY or -DNOSECURITY=3Dfalse. The error log s= hows=20 > java.lang.ClassNotFoundException for each robots like this: Got an error= =20 > with sampleteam.MyFirstLeader: java.lang.ClassNotFoundException:=20 > sampleteam.MyFirstLeader. > > > > --=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/745c7a7c-5442-4194-8cad-da17a32c2b08n%40googlegroups.com. ------=_Part_9115_69545615.1669627122378 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thank you for reporting this.<br><br>I have tried this out myself, and I se= e you are right meaning that we get a ClassNotFoundException when -DNOSECURITY=3Dtrue<br><br>I will ha= ve a look into this and see if I can make a good fix for it (within a week = - no promise?). I will create a new version of Robocode, if/when I succeed.= =F0=9F=99=82<br><br>Best regards,<div>- Flemming N. Larsen<br><br></div><d= iv class=3D"gmail_quote"><div dir=3D"auto" class=3D"gmail_attr">mandag den = 28. november 2022 kl. 07.35.51 UTC+1 skrev [email protected]:<br/></div><b= lockquote class=3D"gmail_quote" style=3D"margin: 0 0 0 0.8ex; border-left: = 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><span style=3D"font-= family:Arial">Hey guys, I have used robocode for one of my course projects = and I am running into an issue.</span></div><div><span style=3D"font-family= :Arial"><br></span></div><div><span style=3D"font-family:Arial"><b>TL;DR: N= ot able to load any robot from the robot database (robots/) when -DNOSECURI= TY is set to true.</b></span></div><div><span style=3D"font-family:Arial"><= br></span></div><div><span style=3D"font-family:Arial">OS: macOS Monterey V= ersion 12.3.1<br></span></div><div><span style=3D"font-family:Arial">Roboco= de Version: <span>1.9.4.7 (05-Aug-2022)</span></span></div><div><span style= =3D"font-family:Arial">JDK:</span></div><div><span style=3D"font-family:Ari= al">openjdk version "1.8.0_352"<br>OpenJDK Runtime Environment (Z= ulu 8.66.0.15-CA-macos-aarch64) (build 1.8.0_352-b08)<br>OpenJDK 64-Bit Ser= ver VM (Zulu 8.66.0.15-CA-macos-aarch64) (build 25.352-b08, mixed mode)</sp= an></div><div><span style=3D"font-family:Arial"><br></span></div><div><span= style=3D"font-family:Arial">Description:</span></div><div><span style=3D"f= ont-family:Arial">I was trying to disable the security manager since I have= third-party dependencies (slf4j, nd4j) for my robot and need additional ac= cess. However, when I try pass in the additional argument -DNOSECURITY =3D = true to the start up argument provided in robocode.command like following</= span></div><div><span style=3D"font-family:Arial"><br></span></div><div><sp= an style=3D"font-family:Arial">java -Xdock:icon=3Drobocode.ico -Xdock:name= =3DRobocode -Xmx512M -cp "libs/*" -DNOSECURITY=3Dtrue -XX:+Ignore= UnrecognizedVMOptions "--add-opens=3Djava.base/sun.net.www.protocol.ja= r=3DALL-UNNAMED" "--add-opens=3Djava.base/java.lang.reflect=3DALL= -UNNAMED" "--add-opens=3Djava.desktop/javax.swing.text=3DALL-UNNA= MED" "--add-opens=3Djava.desktop/sun.awt=3DALL-UNNAMED" robo= code.Robocode $*<br></span></div><div><span style=3D"font-family:Arial"><br= ></span></div><div><span style=3D"font-family:Arial">, robocode failed to r= ead any robot files. Those files was successfully read if there is no -DNOS= ECURITY or -DNOSECURITY=3Dfalse. The error log shows java.lang.ClassNotFoun= dException for each robots like this: Got an error with sampleteam.MyFirstL= eader: java.lang.ClassNotFoundException: sampleteam.MyFirstLeader.</span></= div><div><span style=3D"font-family:Arial"><br></span></div><div><span styl= e=3D"font-family:Arial"><br></span></div><div><span style=3D"font-family:Ar= ial"><br></span></div></blockquote></div> <p></p> -- <br /> You received this message because you are subscribed to the Google Groups &= quot;Robocode" 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/745c7a7c-5442-4194-8cad-da17a32c2b08n%40googlegroups.co= m?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid= /robocode/745c7a7c-5442-4194-8cad-da17a32c2b08n%40googlegroups.com</a>.<br = /> ------=_Part_9115_69545615.1669627122378-- ------=_Part_9114_605208313.1669627122378--