Compiled but can't see...

From RoboWiki
Jump to: navigation, search
Revision as of 1 October 2012 at 21:06.
The [/w/index.php?title=Talk:Robocode/My_First_Robot&offset=20121001210645&lqt_mustshow=1684 highlighted comment] was created in this revision.

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.

    Therealdrag004: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?

      Jdev11: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?

        Therealdrag020: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.

          Voidious21:06, 1 October 2012
           
          Personal tools