Re: Help please!

Farhan Sadique <[email protected]> Wed, 7 Aug 2024 12:25:53 -0700 (PDT)
Newsgroups gmane.comp.java.robocode
Message-ID <[email protected]>
------=_Part_103614_1311903734.1723058753646
Content-Type: multipart/alternative; 
	boundary="----=_Part_103615_148295721.1723058753646"

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

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 robocode.sh/ba=
t=20
> file that fixes this error, when you use Java 11 or 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 file=
=20
> to ensure all Java options are setup correctly for both your system, and=
=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 launcher=
=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 butto=
n=20
> on the right side of the battle view to see if error messages are printed=
=20
> out. If Robocode is running on an older Java version than the Java versio=
n=20
> used for compiling the bot, you will probably see an error in the console=
=20
> 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 st=
art=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 are=
=20
>>> trying to run has been compiled with Java class file version 65=20
>>> <https://stackoverflow.com/questions/9170832/list-of-java-class-file-fo=
rmat-major-version-numbers> which=20
>>> means *Java 21*.
>>> But you are running the Robot on a Java version, the supports up to Jav=
a=20
>>> class file version 52=20
>>> <https://stackoverflow.com/questions/9170832/list-of-java-class-file-fo=
rmat-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), which=
=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 the=
=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 version=
,=20
>>> e.g. Java 11, which is the minimum requirement for running the newest=
=20
>>> Robocode version.
>>>
>>> I hope this helps? =F0=9F=99=82
>>> tirsdag den 6. august 2024 kl. 20.37.25 UTC+2 skrev [email protected]=
m
>>> :
>>>
>>>> [image: Capture1.PNG]
>>>> I've made my 1st robot in IntelliJ idea but when I open robocode, this=
=20
>>>> 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/b1983407-7d20-4b2c-aec9-92dbcd51e4b2n%40googlegroups.com.

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

My issue is fixed now.Thank you very much!<br /><br /><div class=3D"gmail_q=
uote"><div dir=3D"auto" class=3D"gmail_attr">On Wednesday, August 7, 2024 a=
t 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, 2=
04); padding-left: 1ex;">Please make sure you use the newest version of Rob=
ocode<a href=3D"https://sourceforge.net/projects/robocode/files/robocode/1.=
9.5.2/" target=3D"_blank" rel=3D"nofollow" data-saferedirecturl=3D"https://=
www.google.com/url?hl=3Den&amp;q=3Dhttps://sourceforge.net/projects/robocod=
e/files/robocode/1.9.5.2/&amp;source=3Dgmail&amp;ust=3D1723144581460000&amp=
;usg=3DAOvVaw1PE1BTUEMKbueEuzxkDhHr"> 1.9.5.2</a>, as it contains a fix in =
<a href=3D"http://set_java_options.sh/bat" target=3D"_blank" rel=3D"nofollo=
w" data-saferedirecturl=3D"https://www.google.com/url?hl=3Den&amp;q=3Dhttp:=
//set_java_options.sh/bat&amp;source=3Dgmail&amp;ust=3D1723144581460000&amp=
;usg=3DAOvVaw3HSwHY0y2lO9Xfa5W7hRnP">set_java_options.sh/bat</a> file run f=
rom <a href=3D"http://robocode.sh/bat" target=3D"_blank" rel=3D"nofollow" d=
ata-saferedirecturl=3D"https://www.google.com/url?hl=3Den&amp;q=3Dhttp://ro=
bocode.sh/bat&amp;source=3Dgmail&amp;ust=3D1723144581460000&amp;usg=3DAOvVa=
w1wOZbVLnxk9DKDNe1jXcZq">robocode.sh/bat</a> file that fixes this error, wh=
en you use Java 11 or newer:<br><br><div style=3D"color:rgb(204,204,204);ba=
ckground-color:rgb(31,31,31);font-family:Consolas,&quot;Courier New&quot;,m=
onospace;line-height:19px;white-space:pre"><div><span style=3D"color:rgb(21=
2,212,212)">@</span><span style=3D"color:rgb(86,156,214)">rem</span><span s=
tyle=3D"color:rgb(106,153,85)"> Only set &#39;java.security.manager=3Dallow=
&#39; for Java version </span><span style=3D"color:rgb(244,71,71)">&gt;</sp=
an><span style=3D"color:rgb(106,153,85)"> 11</span></div><div><span style=
=3D"color:rgb(197,134,192)">if</span> <span style=3D"color:rgb(156,220,254)=
">%JAVA_MAJOR_VERSION%</span> <span style=3D"color:rgb(212,212,212)">GTR</s=
pan> <span style=3D"color:rgb(181,206,168)">11</span> <span style=3D"color:=
rgb(86,156,214)">set</span> <span style=3D"color:rgb(156,220,254)">_JAVA_OP=
TIONS</span><span style=3D"color:rgb(212,212,212)">=3D</span><span style=3D=
"color:rgb(206,145,120)">&quot;-Djava.security.manager=3Dallow&quot;</span>=
</div></div><br>Also make sure that you run Robocode by running the robocod=
e.bat/sh file to ensure all Java options are setup correctly for both your =
system, and the specific Java version being used for running Robocode.<br>I=
f you set the Java options yourself in IntelliJ, then add the=C2=A0

<span style=3D"color:rgb(206,145,120);font-family:Consolas,&quot;Courier Ne=
w&quot;,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 href data-email-masked=
 rel=3D"nofollow">[email protected]</a>:<br></div><blockquote class=3D"g=
mail_quote" style=3D"margin:0 0 0 0.8ex;border-left:1px solid rgb(204,204,2=
04);padding-left:1ex">I&#39;ve recompiled using Java 11 as you mentioned.No=
w the robot is shown with the package name in the robot list.But after sele=
cting it,when I start the 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" c=
lass=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 trying to run has been compiled with <a href=3D"htt=
ps://stackoverflow.com/questions/9170832/list-of-java-class-file-format-maj=
or-version-numbers" rel=3D"nofollow" target=3D"_blank" data-saferedirecturl=
=3D"https://www.google.com/url?hl=3Den&amp;q=3Dhttps://stackoverflow.com/qu=
estions/9170832/list-of-java-class-file-format-major-version-numbers&amp;so=
urce=3Dgmail&amp;ust=3D1723144581460000&amp;usg=3DAOvVaw0b9DH73Cbz2_MCOeexB=
goD">Java class file version 65</a>=C2=A0which means <b>Java 21</b>.<div>Bu=
t you are running the Robot on a Java version, the supports up to <a href=
=3D"https://stackoverflow.com/questions/9170832/list-of-java-class-file-for=
mat-major-version-numbers" rel=3D"nofollow" target=3D"_blank" data-saferedi=
recturl=3D"https://www.google.com/url?hl=3Den&amp;q=3Dhttps://stackoverflow=
.com/questions/9170832/list-of-java-class-file-format-major-version-numbers=
&amp;source=3Dgmail&amp;ust=3D1723144581460000&amp;usg=3DAOvVaw0b9DH73Cbz2_=
MCOeexBgoD">Java class file version 52</a> which means up to <b>Java 8</b> =
(aka Java 1.8)<br><br></div><div>In short this means that you are probably =
running Robocode with Java 8 from inside IntelliJ, which does not support J=
ava 21, which is many versions newer.<br>I recommend that you switch to a n=
ewer 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 -&g=
t; Project Structure... -&gt; Platform Settings / SDKs. Then you should &qu=
ot;Add New SDK&quot; by pressing the plus (+) symbol and select <b>Download=
 SDK</b> and select version 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 your system.<br><br>Alternatively, you can recompil=
e your robot using an older Java version, e.g. Java 11, which is the minimu=
m requirement for running the newest Robocode version.<br><br>I hope this h=
elps? =F0=9F=99=82</div><div class=3D"gmail_quote"><div dir=3D"auto" class=
=3D"gmail_attr">tirsdag den 6. august 2024 kl. 20.37.25 UTC+2 skrev <a 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 rgb(204,204,204);=
padding-left:1ex"><img alt=3D"Capture1.PNG" width=3D"550px" height=3D"13px"=
 src=3D"https://groups.google.com/group/robocode/attach/3b7ab209c7115/Captu=
re1.PNG?part=3D0.1&amp;view=3D1"><br>I&#39;ve made my 1st robot in IntelliJ=
 idea but when I open robocode, this error message is shown. How to fix it?=
</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/b1983407-7d20-4b2c-aec9-92dbcd51e4b2n%40googlegroups.co=
m?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid=
/robocode/b1983407-7d20-4b2c-aec9-92dbcd51e4b2n%40googlegroups.com</a>.<br =
/>

------=_Part_103615_148295721.1723058753646--

------=_Part_103614_1311903734.1723058753646--