Re: Help please!
Farhan Sadique <[email protected]> Wed, 7 Aug 2024 21:53:12 -0700 (PDT)
| Newsgroups | gmane.comp.java.robocode |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_76422_1418414391.1723092792055 Content-Type: multipart/alternative; boundary="----=_Part_76423_1320044291.1723092792055" ------=_Part_76423_1320044291.1723092792055 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Actually my JDK version wasn't up-to-date. Just updated it and changed the= =20 launcher settings as you mentioned. It worked! On Thursday, August 8, 2024 at 2:37:53=E2=80=AFAM UTC+6 fnl wrote: > You are welcome. I am happy to hear that the issue was fixed. > > What caused the issue? > > Best regards, > - Flemming > > onsdag den 7. august 2024 kl. 22.36.45 UTC+2 skrev [email protected]: > >> My issue is fixed now.Thank you very much! >> >> On Wednesday, August 7, 2024 at 9:09:32=E2=80=AFPM UTC+6 fnl wrote: >> >>> Please make sure you use the newest version of Robocode 1.9.5.2=20 >>> <https://sourceforge.net/projects/robocode/files/robocode/1.9.5.2/>, as= =20 >>> it contains a fix in set_java_options.sh/bat file run from=20 >>> robocode.sh/bat file that fixes this error, when you use Java 11 or=20 >>> newer: >>> >>> @rem Only set 'java.security.manager=3Dallow' for Java version > 11 >>> if %JAVA_MAJOR_VERSION% GTR 11 set _JAVA_OPTIONS=3D >>> "-Djava.security.manager=3Dallow" >>> >>> Also make sure that you run Robocode by running the robocode.bat/sh fil= e=20 >>> to ensure all Java options are setup correctly for both your system, an= d=20 >>> the specific Java version being used for running Robocode. >>> If you set the Java options yourself in IntelliJ, then add the =20 >>> -Djava.security.manager=3Dallow in the the Java options of the launche= r=20 >>> settings. >>> >>> Make sure Robocode itself is running on at least Java 11. You can check= =20 >>> this from the About box, which writes which Java version it run on. >>> >>> If a robot will not run, then check the bot console by clicking its=20 >>> button on the right side of the battle view to see if error messages ar= e=20 >>> printed out. If Robocode is running on an older Java version than the J= ava=20 >>> version used for compiling the bot, you will probably see an error in t= he=20 >>> console for the bot. >>> >>> Write again, if you still got issues. >>> >>> onsdag den 7. august 2024 kl. 16.55.24 UTC+2 skrev [email protected]= : >>> >>>> I've recompiled using Java 11 as you mentioned.Now the robot is shown= =20 >>>> with the package name in the robot list.But after selecting it,when I = start=20 >>>> the battle,my robot is not shown in game. >>>> >>>> On Wednesday, August 7, 2024 at 12:54:58=E2=80=AFAM UTC+6 fnl wrote: >>>> >>>>> It is a very cryptic message at first. It seems that the robot your= =20 >>>>> are trying to run has been compiled with Java class file version 65= =20 >>>>> <https://stackoverflow.com/questions/9170832/list-of-java-class-file-= format-major-version-numbers> which=20 >>>>> means *Java 21*. >>>>> But you are running the Robot on a Java version, the supports up to J= ava=20 >>>>> class file version 52=20 >>>>> <https://stackoverflow.com/questions/9170832/list-of-java-class-file-= format-major-version-numbers>=20 >>>>> which means up to *Java 8* (aka Java 1.8) >>>>> >>>>> In short this means that you are probably running Robocode with Java = 8=20 >>>>> from inside IntelliJ, which does not support Java 21, which is many= =20 >>>>> versions newer. >>>>> I recommend that you switch to a newer JDK (Java Developer Kit), whic= h=20 >>>>> should be *version 21* as minimum for running your robot. >>>>> You do this in IntelliJ from the menu: File -> Project Structure... -= >=20 >>>>> Platform Settings / SDKs. Then you should "Add New SDK" by pressing t= he=20 >>>>> plus (+) symbol and select *Download SDK* and select version 21 (or= =20 >>>>> newer) and choose e.g. Oracle OpenJDK 21, or alternatively *Add SDK* = if=20 >>>>> you already have Java 21 or never installed somewhere on your system. >>>>> >>>>> Alternatively, you can recompile your robot using an older Java=20 >>>>> version, e.g. Java 11, which is the minimum requirement for running t= he=20 >>>>> newest Robocode version. >>>>> >>>>> I hope this helps? =F0=9F=99=82 >>>>> tirsdag den 6. august 2024 kl. 20.37.25 UTC+2 skrev=20 >>>>> [email protected]: >>>>> >>>>>> [image: Capture1.PNG] >>>>>> I've made my 1st robot in IntelliJ idea but when I open robocode,=20 >>>>>> this error message is shown. How to fix it? >>>>> >>>>> --=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/bc240178-ab0b-44e6-bab8-af0711e2637bn%40googlegroups.com. ------=_Part_76423_1320044291.1723092792055 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Actually my JDK version wasn't up-to-date. Just updated it and changed the = launcher settings as you mentioned. It worked!<br /><br /><div class=3D"gma= il_quote"><div dir=3D"auto" class=3D"gmail_attr">On Thursday, August 8, 202= 4 at 2:37:53=E2=80=AFAM UTC+6 fnl wrote:<br/></div><blockquote class=3D"gma= il_quote" style=3D"margin: 0 0 0 0.8ex; border-left: 1px solid rgb(204, 204= , 204); padding-left: 1ex;">You are welcome. I am happy to hear that the is= sue was fixed.<br><br>What caused the issue?<br><br>Best regards,<div>- Fle= mming<br><br></div><div class=3D"gmail_quote"><div dir=3D"auto" class=3D"gm= ail_attr">onsdag den 7. august 2024 kl. 22.36.45 UTC+2 skrev <a href data-e= mail-masked rel=3D"nofollow">[email protected]</a>:<br></div><blockquote= class=3D"gmail_quote" style=3D"margin:0 0 0 0.8ex;border-left:1px solid rg= b(204,204,204);padding-left:1ex">My issue is fixed now.Thank you very much!= <br><br><div class=3D"gmail_quote"><div dir=3D"auto" class=3D"gmail_attr">O= n Wednesday, August 7, 2024 at 9:09:32=E2=80=AFPM UTC+6 fnl wrote:<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 make sure you use the n= ewest version of Robocode<a href=3D"https://sourceforge.net/projects/roboco= de/files/robocode/1.9.5.2/" rel=3D"nofollow" target=3D"_blank" data-safered= irecturl=3D"https://www.google.com/url?hl=3Den&q=3Dhttps://sourceforge.= net/projects/robocode/files/robocode/1.9.5.2/&source=3Dgmail&ust=3D= 1723178992171000&usg=3DAOvVaw1nPFi0Y2CfueHUxcjwXNjp"> 1.9.5.2</a>, as i= t contains a fix in <a href=3D"http://set_java_options.sh/bat" rel=3D"nofol= low" target=3D"_blank" data-saferedirecturl=3D"https://www.google.com/url?h= l=3Den&q=3Dhttp://set_java_options.sh/bat&source=3Dgmail&ust=3D= 1723178992171000&usg=3DAOvVaw1yZvX4dYKd9c1Fk6AsCa5E">set_java_options.s= h/bat</a> file run from <a href=3D"http://robocode.sh/bat" rel=3D"nofollow"= target=3D"_blank" data-saferedirecturl=3D"https://www.google.com/url?hl=3D= en&q=3Dhttp://robocode.sh/bat&source=3Dgmail&ust=3D172317899217= 1000&usg=3DAOvVaw3qD3m2qYTF3WFH4zsHI2bf">robocode.sh/bat</a> file that = fixes this error, when you use Java 11 or newer:<br><br><div style=3D"color= :rgb(204,204,204);background-color:rgb(31,31,31);font-family:Consolas,"= ;Courier New",monospace;line-height:19px;white-space:pre"><div><span s= tyle=3D"color:rgb(212,212,212)">@</span><span style=3D"color:rgb(86,156,214= )">rem</span><span style=3D"color:rgb(106,153,85)"> Only set 'java.secu= rity.manager=3Dallow' for Java version </span><span style=3D"color:rgb(= 244,71,71)">></span><span style=3D"color:rgb(106,153,85)"> 11</span></di= v><div><span style=3D"color:rgb(197,134,192)">if</span> <span style=3D"colo= r:rgb(156,220,254)">%JAVA_MAJOR_VERSION%</span> <span style=3D"color:rgb(21= 2,212,212)">GTR</span> <span style=3D"color:rgb(181,206,168)">11</span> <sp= an style=3D"color:rgb(86,156,214)">set</span> <span style=3D"color:rgb(156,= 220,254)">_JAVA_OPTIONS</span><span style=3D"color:rgb(212,212,212)">=3D</s= pan><span style=3D"color:rgb(206,145,120)">"-Djava.security.manager=3D= allow"</span></div></div><br>Also make sure that you run Robocode by r= unning the robocode.bat/sh file to ensure all Java options are setup correc= tly for both your system, and the specific Java version being used for runn= ing Robocode.<br>If you set the Java options yourself in IntelliJ, then add= the=C2=A0 <span style=3D"color:rgb(206,145,120);font-family:Consolas,"Courier Ne= w",monospace;white-space:pre;background-color:rgb(31,31,31)">-Djava.se= curity.manager=3Dallow</span>=C2=A0=C2=A0in the the Java options of the lau= ncher settings.<br><br>Make sure Robocode itself is running on at least Jav= a 11. You can check this from the About box, which writes which Java versio= n it run on.<br><br>If a robot will not run, then check the bot console by = clicking its button on the right side of the battle view to see if error me= ssages are printed out. If Robocode is running on an older Java version tha= n the Java version used for compiling the bot, you will probably see an err= or in the console for the bot.<br><br>Write again, if you still got issues.= <br><br><div class=3D"gmail_quote"><div dir=3D"auto" class=3D"gmail_attr">o= nsdag den 7. august 2024 kl. 16.55.24 UTC+2 skrev <a rel=3D"nofollow">gamer= [email protected]</a>:<br></div><blockquote class=3D"gmail_quote" style=3D"ma= rgin:0 0 0 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I= 've recompiled using Java 11 as you mentioned.Now the robot is shown wi= th the package name in the robot list.But after selecting it,when I start t= he battle,my robot is not shown in game.<br><br><div class=3D"gmail_quote">= </div><div class=3D"gmail_quote"><div dir=3D"auto" class=3D"gmail_attr">On = Wednesday, August 7, 2024 at 12:54:58=E2=80=AFAM UTC+6 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= ">It is a very cryptic message at first. It seems that the robot your are t= rying to run has been compiled with <a href=3D"https://stackoverflow.com/qu= estions/9170832/list-of-java-class-file-format-major-version-numbers" rel= =3D"nofollow" target=3D"_blank" data-saferedirecturl=3D"https://www.google.= com/url?hl=3Den&q=3Dhttps://stackoverflow.com/questions/9170832/list-of= -java-class-file-format-major-version-numbers&source=3Dgmail&ust=3D= 1723178992171000&usg=3DAOvVaw1y5VbjjGUgueN-571rPa7E">Java class file ve= rsion 65</a>=C2=A0which means <b>Java 21</b>.<div>But you are running the R= obot on a Java version, the supports up to <a href=3D"https://stackoverflow= .com/questions/9170832/list-of-java-class-file-format-major-version-numbers= " rel=3D"nofollow" target=3D"_blank" data-saferedirecturl=3D"https://www.go= ogle.com/url?hl=3Den&q=3Dhttps://stackoverflow.com/questions/9170832/li= st-of-java-class-file-format-major-version-numbers&source=3Dgmail&u= st=3D1723178992171000&usg=3DAOvVaw1y5VbjjGUgueN-571rPa7E">Java class fi= le version 52</a> which means up to <b>Java 8</b> (aka Java 1.8)<br><br></d= iv><div>In short this means that you are probably running Robocode with Jav= a 8 from inside IntelliJ, which does not support Java 21, which is many ver= sions newer.<br>I recommend that you switch to a newer JDK (Java Developer = Kit), which should be <b>version 21</b> as minimum for running your robot.<= br>You do this in IntelliJ from the menu: File -> Project Structure... -= > Platform Settings / SDKs. Then you should "Add New SDK" by p= ressing the plus (+) symbol and select <b>Download SDK</b> and select versi= on 21 (or newer) and choose e.g. Oracle OpenJDK 21, or alternatively <b>Add= SDK</b>=C2=A0if you already have Java 21 or never installed somewhere on y= our system.<br><br>Alternatively, you can recompile your robot using an old= er Java version, e.g. Java 11, which is the minimum requirement for running= the newest Robocode version.<br><br>I hope this helps? =F0=9F=99=82</div><= div class=3D"gmail_quote"><div dir=3D"auto" class=3D"gmail_attr">tirsdag de= n 6. august 2024 kl. 20.37.25 UTC+2 skrev <a rel=3D"nofollow">gamermu...@gm= ail.com</a>:<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"><img alt= =3D"Capture1.PNG" width=3D"550px" height=3D"13px" src=3D"https://groups.goo= gle.com/group/robocode/attach/3b7ab209c7115/Capture1.PNG?part=3D0.1&vie= w=3D1"><br>I've made my 1st robot in IntelliJ idea but when I open robo= code, this error message is shown. How to fix it?</blockquote></div></block= quote></div></blockquote></div></blockquote></div></blockquote></div></bloc= kquote></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/bc240178-ab0b-44e6-bab8-af0711e2637bn%40googlegroups.co= m?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid= /robocode/bc240178-ab0b-44e6-bab8-af0711e2637bn%40googlegroups.com</a>.<br = /> ------=_Part_76423_1320044291.1723092792055-- ------=_Part_76422_1418414391.1723092792055--