Thread history

From Talk:Robocode/My First Robot
Viewing a history listing
Jump to navigation Jump to search
Time User Activity Comment
05:35, 1 October 2012 Therealdrag0 (talk | contribs) New thread created  
12:34, 1 October 2012 Jdev (talk | contribs) New reply created (Reply to Compiled but can't see...)
21:37, 1 October 2012 Therealdrag0 (talk | contribs) New reply created (Reply to Compiled but can't see...)
21:39, 1 October 2012 Therealdrag0 (talk | contribs) Comment text edited  
21:42, 1 October 2012 Therealdrag0 (talk | contribs) Comment text edited  
22:06, 1 October 2012 Voidious (talk | contribs) New reply created (Reply to Compiled but can't see...)
22:30, 1 October 2012 MN (talk | contribs) New reply created (Reply to Compiled but can't see...)
22:33, 1 October 2012 MN (talk | contribs) Comment text edited  
22:39, 1 October 2012 MN (talk | contribs) New reply created (Reply to Compiled but can't see...)
00:23, 2 October 2012 Therealdrag0 (talk | contribs) New reply created (Reply to Compiled but can't see...)
13:58, 2 October 2012 MN (talk | contribs) New reply created (Reply to Compiled but can't see...)
13:59, 2 October 2012 MN (talk | contribs) Comment text edited  
18:12, 14 October 2012 Therealdrag0 (talk | contribs) New reply created (Reply to Compiled but can't see...)

Compiled but can't see...

I set up a robot project on my NetBeans. I loaded the robocode libraries, etc. All this seemed to go successfully. I can even compile my robot class with success. I also pointed robocode to the directory my robot class is in.

But my robot doesn't show up in the robot list for fights!

Any ideas? Thanks.

Therealdrag005:35, 1 October 2012

Hi! How you "pointed robocode to the directory my robot class is in"? What this directory contents? Do you added ${robot.name}.properties file? Which package are you use?

Jdev12:34, 1 October 2012
 

Thanks for the reply!

I added the directory, "C:\MyRobots\build\classes\zjk", to development options. In that directory is only the class file, "drag0.class"

Okay, since you mentioned properties file, I looked around (I don't see any ${robot.name}.properties file). I tried adding the other directories above the one mentioned above and it still doesn't work. how is a .properties file generated and what is its purpose?

Therealdrag021:37, 1 October 2012
 

The .properties file is added to the JAR when you package your bot, but it shouldn't be needed in order to see a development version of your bot. I'm not sure, but I think you'll need to add the top level directory in Robocode - e.g., if your bot is zjk.MyRobot, under ...\build\classes\zjk\MyRobot.java, you'd need to point Robocode to ...\build\classes.

I have my things setup the other way, with Eclipse compiling the .class files into robocode/robots/, but that's kind of a stupid setup that I've just never bothered to change.

Voidious22:06, 1 October 2012

Not that stupid. Many times I saw a development version working, only to generate a non-working JAR. Wrong .properties file, security violations, wrong file names...

And the opposite problem (non-working development versions) arises when you use the engine API directly instead of the GUI . i.e. genetic tuning with full battles.

I also develop and test using JARs instead of raw .class files.

MN22:30, 1 October 2012
 

There was one time when codesize calculated the wrong size for a nanobot, adding the size of 2 development bots together.

I ended trying to shrink the code a lot only to discover it did already fit in the nanobot category before with lots of room for more code.

MN22:39, 1 October 2012
 

Okay, so I took the .class file and folder and threw it in the native Robocode folder and it works fine. So I know that's okay.

But still when I have it in my dev folder it doesn't show. In Robocode I have added: C:\MyRobots\build\classes\zjk C:\MyRobots\build\classes\ C:\MyRobots\build\ C:\MyRobots\

...and none of them work! :/

Therealdrag000:23, 2 October 2012

Did you add them all at the same time? I had problems with multiple classpath folders.

And the correct path should be C:\MyRobots\build\classes

MN13:58, 2 October 2012
 

Thanks I got it to work.

Therealdrag018:12, 14 October 2012