[Home]RobocodeGL/TroubleShooting

Robo Home | RobocodeGL | Changes | Preferences | AllPages

Difference (from prior major revision) (no other diffs)

Changed: 201c201,205
If you have Robocode 1.0.7 and not 1.0.6, the names of the explosion image files are different. You'll have to modify GLRenderer.java to use the new explosion image paths (which should be relatively simple to figure out). Otherwise, RobocodeGL will throw an exception on boot. -- Kawigi
If you have Robocode 1.0.7 and not 1.0.6, the names of the explosion image files are different. You'll have to modify GLRenderer.java to use the new explosion image paths (which should be relatively simple to figure out). Otherwise, RobocodeGL will throw an exception on boot. -- Kawigi

return (10<<getX()<<(getBattleFieldWidth?()-10));
*** Semantic Error: The type of this expression, "double", is not an integral type.?
jeremybub?

From the StatGrapher page...

Sorry for a dumb question. I can't compile the above:

|| Found 4 semantic errors compiling "C:/robocode/robots/wiki/graphing/StatGrapher.java":
|| 
|| 3. import robocode.robocodeGL.LineGL;
|| <------------------------>
|| *** Error: The import "robocode/robocodeGL/LineGL" is not valid, since it does not name a type in a package.
It's the first time I try to compile any RobocodeGLV014 stuff so it's probably just some classpath thing or what? I have just installed gl4java and RobocodeGLV014 and it seems to work great. David, if you read this, can you post a link to where DuelistMiniGL? can be downloaded? -- PEZ

DuelistMicroGL?: http://robocoderepository.com/BotDetail.jsp?id=1296 Have fun! :-) --David Alves

Does the path to the robocode package point to the one with RobocodeGLV014 installed in it, or just to a plain install? -- Kuuran

Yeah, most likely the problem is that the original robocode.jar is on the classpath, and the RobocodeGLV014 classes are not. -- nano

How should the classpath be set then? -- PEZ

gl:
	C:/Program/Java/j2sdk_nb/j2sdk1.4.2/bin/javac -classpath "C:\Program\Java\j2sdk_nb\j2sdk1.4.2\jre\lib\rt.jar;C:\Program\Java\j2sdk_nb\j2sdk1.4.2\jre\lib\ext\gl4java.jar;${ROBOCODE_DIR}/robocode/robocodeGL;${ROBOCODE_DIR}/robots" *.java
I get similar results using jikes. -- PEZ

Found it! I needed to include ${ROBOCODE_DIR} in my classpath as well. Naturally, since I no longer include robocode.jar. -- PEZ


I've reduced the number of errors I've been getting, but I don't understand this one:

 c:\robocodeGL\robocodeGL_0.1.4.zip(robocode/manager/GLPreferences?.java):13: class GLPreferences is public, should be declared in a file named GLPreferences.java

It looks like it's complaining that a file doesn't exist when it is looking at it... -- Tango

Have you not unzipped it yet?? -- Kawigi

I unzipped it, but it failed to find some of the files (it looks like I have to include every single folder separately in the classpath, is there not a use subfolders option?), so I added the zip itself to the classpath as well, which fixed most of the errors, leaving just that one. -- Tango

Test with a classpath like this:

"C:\Program\Java\j2sdk_nb\j2sdk1.4.2\jre\lib\rt.jar;C:\Program\Java\j2sdk_nb\j2sdk1.4.2\jre\lib\ext\gl4java.jar;${ROBOCODE_DIR};${ROBOCODE_DIR}/robocode/robocodeGL;${ROBOCODE_DIR}/robots"
Replace the java paths with something working on your machine. And replace ${ROBOCODE_DIR} with your robocode directory unless you are using "make" like I do. -- PEZ

After trying that, and then fiddling with it a bit (the java installation on this computer is a mess, nothing's where's it's meant to be...), i've got down to one error, which seems to be related to RobocodeGLV014, and not GL in general:

c:\robocodeGL\robocode\robocodeGL\Robocode.
symbol  : class Robocode
location: package robocode
                robocode.Robocode.main(a);
                        ^

I think I extracted everything correctly, so I'm stuck again... I'm sure this could be made easier...

-- Tango

Does that mean you are using a separate robocode dir for robocodeGL? -- PEZ

It does. I tried to use the same install, and it got confused because of all the mods in there, so I made a new one. It shouldn't be a problem, I extracted the robocode.jar and all that. -- Tango

No, it shouldn't be the problem. I'm just trying to figure it out. Did it work as a regular robocode install before you tried RCGL on it? -- PEZ

Yes. I haven't moved any bots over yet, so i've only run the samples, but it seems fine. -- Tango

OK. And then you unjared robocode.jar there. And then unzipped RobocodeGLV014? Did you manage to compile the sources like the readme-file tells to do? -- PEZ

It's compiling the sources that gets the error message above. -- Tango

It doesn't look like much of an error message from here. Try with jikes. It can sometimes give much clearer error messages. (and somtimes it's the other way around. I always try with the other compiler if one of them gives me unhelpful messages.) Can you tell us what command you are using to compile stuff? And the relevant environment variables like CLASSPATH, JAVA_HOME and such. Also the current working directory when you issue the command. -- PEZ

I put it in a batch file:

cd C:\PROGRA~1\j2sdk_nb\j2sdk1.4.2\bin
javac -classpath "C:\Progra~1\j2sdk_nb\j2sdk1.4.2\jre\lib\rt.jar;C:\Progra~1\j2sdk_nb\j2sdk1.4.2\jre\lib\ext\gl4java.jar;c:\robocodeGL;c:\robocodeGL/robocode/robocodeGL;c:\robocodeGL/robots;" c:\robocodeGL\robocode\robocodeGL\*.java

-- Tango

I don't know if it matters any. But you could try this instead maybe:

SET J="C:\PROGRA~1\j2sdk_nb\j2sdk1.4.2"
c:
cd \robocodeGL
%J%\bin javac -classpath "%J%\jre\lib\rt.jar;%J%\jre\lib\ext\gl4java.jar;.;./robocode/robocodeGL;./robots;" .\robocode\robocodeGL\*.java
-- PEZ

Or. Could it be that the robocode dir must be named robocode maybe? -- PEZ

See the update at the bottom of the RobocodeGLV014 page and let me know if it works! -- nano


I get this error, when i am compiling robocodeGL:

robocode\robocodeGL_0.1.4\robocode\robocodeGL\RenderElement??.java:12: package rob ocode.manager does not exist import robocode.manager.GLPreferences; ^ robocode\robocodeGL_0.1.4\robocode\robocodeGL\RenderElement??.java:13: package rob ocode.robocodeGL.system does not exist import robocode.robocodeGL.system.*; ^ robocode\robocodeGL_0.1.4\robocode\robocodeGL\RenderElement??.java:22: cannot find symbol symbol : class GLFont location: class robocode.robocodeGL.RenderElement?? private static GLFont glfont = null; ^ robocode\robocodeGL_0.1.4\robocode\robocodeGL\RenderElement??.java:30: cannot find symbol symbol : class GLFont location: class robocode.robocodeGL.RenderElement?? public static void init(GLFont glf) { ^ robocode\robocodeGL_0.1.4\robocode\robocodeGL\Robocode.java:4: package robocode. manager does not exist import robocode.manager.GLPreferences; ^ robocode\robocodeGL_0.1.4\robocode\robocodeGL\Robocode.java:5: package robocode. robocodeGL.system does not exist import robocode.robocodeGL.system.*; ^ robocode\robocodeGL_0.1.4\robocode\robocodeGL\RenderElement??.java:81: package Sys temRenderElement?? does not exist if( (!(label instanceof SystemRenderElement??.RobotNam?? eLabelElement?? ) || GLPreferences.getInstance().isDrawRobotName??()) && ^ robocode\robocodeGL_0.1.4\robocode\robocodeGL\RenderElement??.java:81: cannot find symbol symbol : variable GLPreferences location: class robocode.robocodeGL.RenderElement?? if( (!(label instanceof SystemRenderElement??.RobotNam?? eLabelElement?? ) || GLPreferences.getInstance().isDrawRobotName??()) &&

^ robocode\robocodeGL_0.1.4\robocode\robocodeGL\RenderElement??.java:82: package Sys temRenderElement?? does not exist (!(label instanceof SystemRenderElement??.RobotEne?? rgyLabelElement??) || GLPreferences.getInstance().isDrawRobotEnergy??())&& ^ robocode\robocodeGL_0.1.4\robocode\robocodeGL\RenderElement??.java:82: cannot find symbol symbol : variable GLPreferences location: class robocode.robocodeGL.RenderElement?? (!(label instanceof SystemRenderElement??.RobotEne?? rgyLabelElement??) || GLPreferences.getInstance().isDrawRobotEnergy??())&&

^ robocode\robocodeGL_0.1.4\robocode\robocodeGL\RenderElement??.java:83: package Sys temRenderElement?? does not exist (!(label instanceof SystemRenderElement??.RobotSco?? reLabelElement??) || GLPreferences.getInstance().isShowScores??())) ^ robocode\robocodeGL_0.1.4\robocode\robocodeGL\RenderElement??.java:83: cannot find symbol symbol : variable GLPreferences location: class robocode.robocodeGL.RenderElement?? (!(label instanceof SystemRenderElement??.RobotSco?? reLabelElement??) || GLPreferences.getInstance().isShowScores??()))

^ robocode\robocodeGL_0.1.4\robocode\robocodeGL\Robocode.java:29: cannot find symb ol symbol : variable GLPreferences location: class robocode.robocodeGL.Robocode GLPreferences.getInstance().setDebugAllowed??(debug); ^ robocode\robocodeGL_0.1.4\robocode\robocodeGL\Robocode.java:32: cannot find symb ol symbol : variable GLRenderer location: class robocode.robocodeGL.Robocode GLRenderer.startup(); ^ robocode\robocodeGL_0.1.4\robocode\robocodeGL\Robocode.java:38: cannot find symb ol symbol : class Robocode location: package robocode robocode.Robocode.main(a); ^ Note: robocode\robocodeGL_0.1.4\robocode\robocodeGL\RenderElement??.java uses unch ecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 15 errors

could anyone help me? -- Krabb

Kawigi solved my problem, big thx to him!!!! -- Krabb

For anyone else that runs into problems that look like this, the problem here was that robocodeGL was extracted into the wrong place. You should:

  1. extract robocode (jar -xf robocde.jar). This should create a folder called robocode with alot of java and class files.
  2. unzip robocodeGL into the base robocode folder (I don't know if the zip file has any files in its root, but all the stuff should pretty much end up in the new robocode folder that came out of robocode.jar at this point).
  3. compile the new java files (javac -classpath .;java4gl.jar robocode\robocodeGL\*.java should probably work)

A side thing we figured out:

If you have Robocode 1.0.7 and not 1.0.6, the names of the explosion image files are different. You'll have to modify GLRenderer.java to use the new explosion image paths (which should be relatively simple to figure out). Otherwise, RobocodeGL will throw an exception on boot. -- Kawigi

return (10<<getX()<<(getBattleFieldWidth?()-10));

jeremybub?

Robo Home | RobocodeGL | Changes | Preferences | AllPages
Edit text of this page | View other revisions
Last edited June 26, 2006 1:51 EST by pool-71-161-136-184.spfdma.east.verizon.net (diff)
Search: