Re: Help please!

fnl <[email protected]> Wed, 7 Aug 2024 13:37:53 -0700 (PDT)
Newsgroups gmane.comp.java.robocode
Message-ID <[email protected]>
------=_Part_3420_420853120.1723063073763
Content-Type: multipart/alternative; 
	boundary="----=_Part_3421_2039284898.1723063073763"

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

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 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=20
>> button on the right side of the battle view to see if error messages are=
=20
>> printed out. If Robocode is running on an older Java version than the Ja=
va=20
>> version used for compiling the bot, you will probably see an error in th=
e=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 s=
tart=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 ar=
e=20
>>>> trying to run has been compiled with Java class file version 65=20
>>>> <https://stackoverflow.com/questions/9170832/list-of-java-class-file-f=
ormat-major-version-numbers> which=20
>>>> means *Java 21*.
>>>> But you are running the Robot on a Java version, the supports up to Ja=
va=20
>>>> class file version 52=20
>>>> <https://stackoverflow.com/questions/9170832/list-of-java-class-file-f=
ormat-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 th=
e=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* i=
f=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 th=
e=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, thi=
s=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/50f54f06-29e3-4293-96a8-a5bcefc46d66n%40googlegroups.com.

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

You are welcome. I am happy to hear that the issue was fixed.<br /><br />Wh=
at caused the issue?<br /><br />Best regards,<div>- Flemming<br /><br /></d=
iv><div class=3D"gmail_quote"><div dir=3D"auto" class=3D"gmail_attr">onsdag=
 den 7. august 2024 kl. 22.36.45 UTC+2 skrev [email protected]:<br/></di=
v><blockquote class=3D"gmail_quote" style=3D"margin: 0 0 0 0.8ex; border-le=
ft: 1px solid rgb(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" c=
lass=3D"gmail_attr">On 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 ma=
ke sure you use the newest version of Robocode<a href=3D"https://sourceforg=
e.net/projects/robocode/files/robocode/1.9.5.2/" rel=3D"nofollow" target=3D=
"_blank" data-saferedirecturl=3D"https://www.google.com/url?hl=3Dda&amp;q=
=3Dhttps://sourceforge.net/projects/robocode/files/robocode/1.9.5.2/&amp;so=
urce=3Dgmail&amp;ust=3D1723149412242000&amp;usg=3DAOvVaw30kJNBdMDcSNSTAnkYp=
oIu"> 1.9.5.2</a>, as it contains a fix in <a href=3D"http://set_java_optio=
ns.sh/bat" rel=3D"nofollow" target=3D"_blank" data-saferedirecturl=3D"https=
://www.google.com/url?hl=3Dda&amp;q=3Dhttp://set_java_options.sh/bat&amp;so=
urce=3Dgmail&amp;ust=3D1723149412242000&amp;usg=3DAOvVaw3FeUAXgeU0T6CjwxH6T=
X_Q">set_java_options.sh/bat</a> file run from <a href=3D"http://robocode.s=
h/bat" rel=3D"nofollow" target=3D"_blank" data-saferedirecturl=3D"https://w=
ww.google.com/url?hl=3Dda&amp;q=3Dhttp://robocode.sh/bat&amp;source=3Dgmail=
&amp;ust=3D1723149412242000&amp;usg=3DAOvVaw1QHgybqpjDKCuGHZMfrn7Q">robocod=
e.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);fon=
t-family:Consolas,&quot;Courier New&quot;,monospace;line-height:19px;white-=
space:pre"><div><span style=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 &#39;java.security.manager=3Dallow&#39; for Java version </span><=
span style=3D"color:rgb(244,71,71)">&gt;</span><span style=3D"color:rgb(106=
,153,85)"> 11</span></div><div><span style=3D"color:rgb(197,134,192)">if</s=
pan> <span style=3D"color:rgb(156,220,254)">%JAVA_MAJOR_VERSION%</span> <sp=
an style=3D"color:rgb(212,212,212)">GTR</span> <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_OPTIONS</span><span style=3D"color:=
rgb(212,212,212)">=3D</span><span style=3D"color:rgb(206,145,120)">&quot;-D=
java.security.manager=3Dallow&quot;</span></div></div><br>Also make sure th=
at you run Robocode by running the robocode.bat/sh file to ensure all Java =
options are setup correctly for both your system, and the specific Java ver=
sion being used for running Robocode.<br>If you set the Java options yourse=
lf 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 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=
&#39;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=3Dda&amp;q=3Dhttps://stackoverflow.com/questions/9170832/list-of=
-java-class-file-format-major-version-numbers&amp;source=3Dgmail&amp;ust=3D=
1723149412242000&amp;usg=3DAOvVaw3I2_yMs8mIPvVG5Hrumjjx">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=3Dda&amp;q=3Dhttps://stackoverflow.com/questions/9170832/li=
st-of-java-class-file-format-major-version-numbers&amp;source=3Dgmail&amp;u=
st=3D1723149412242000&amp;usg=3DAOvVaw3I2_yMs8mIPvVG5Hrumjjx">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 -&gt; Project Structure... -=
&gt; Platform Settings / SDKs. Then you should &quot;Add New SDK&quot; 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&amp;vie=
w=3D1"><br>I&#39;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>

<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/50f54f06-29e3-4293-96a8-a5bcefc46d66n%40googlegroups.co=
m?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid=
/robocode/50f54f06-29e3-4293-96a8-a5bcefc46d66n%40googlegroups.com</a>.<br =
/>

------=_Part_3421_2039284898.1723063073763--

------=_Part_3420_420853120.1723063073763--