|
View:
New views
13 Messages
—
Rating Filter:
Alert me
|
|
|
update the download jar?One of my students downloaded robocode and compiled TrackFire. It
seems normalRelativeAngle is now a separate util. Seems the utils were not included in the dow2bnload. |
|
|
Re: update the download jar?Hi,
Originally the normalRelativeAngle() method (and similar methods) was available in the internal Robocode class robocode.util.Utils. The robots were not supposed to use these internal methods. But since a lot of old robots count of the Utils class, it has been preserved for backwards compability with old robots. So, the normalRelativeAngle() is not available on the Robot and AdvancedRobot class etc. you have to 'import robocode.util.Utils', and write Utils.normalRelativeAngle() in order to access it. With Java 5 you can do this "smarter" by performing a static import like 'import static robocode.util.Utils.*'. This way you can call 'normalRelativeAngle()' instead of writing 'Utils.' as "prefix". Regards, - Flemming --- In Robocode@..., "Edwin Pilobello" <e_pilobello@...> wrote: > > One of my students downloaded robocode and compiled TrackFire. It > seems normalRelativeAngle is now a separate util. Seems the utils were > not included in the dow2bnload. > |
|
|
Re: update the download jar?The labs have a new image here are Portland State University. It presents all the programs I use in class in one folder. Bottom line is that students in my Lego Robotics class got into robocode. Unfortunately, my "core" dumped robocode after a term on "non-use". So it's going to take me a while to reload robocode and familiarize myself with it. Anyway...
We got into this normalRelativeAngle compile error again. The robot is Tracker and the error is "No accessible method" I tried combinations of the following: 1. Util.normalRelativeAngleDegrees() 2. Util.normalRelativeAngle() 3. import static robocode.util.Util.normalRelativeAngle 4. import static robocode.util.Util 5. import without the static Then I ran out of time. The kids were also getting errors relating to BulletHitBullet in MyFirstRobot, which does not use BulletHitBullet. I'll have to look that up later. Anyway, if someone more knowledgeable can please help a harried teacher to fix the bugs, please accept my sincerest gratitude. Best, Edwin --- In Robocode@..., "flemmingnlarsen" <flemming.n.larsen@...> wrote: > > Hi, > > Originally the normalRelativeAngle() method (and similar methods) was > available in the internal Robocode class robocode.util.Utils. The > robots were not supposed to use these internal methods. But since a > lot of old robots count of the Utils class, it has been preserved for > backwards compability with old robots. > > So, the normalRelativeAngle() is not available on the Robot and > AdvancedRobot class etc. you have to 'import robocode.util.Utils', and > write Utils.normalRelativeAngle() in order to access it. > > With Java 5 you can do this "smarter" by performing a static import > like 'import static robocode.util.Utils.*'. This way you can call > 'normalRelativeAngle()' instead of writing 'Utils.' as "prefix". > > Regards, > - Flemming > > --- In Robocode@..., "Edwin Pilobello" <e_pilobello@> > wrote: > > > > One of my students downloaded robocode and compiled TrackFire. It > > seems normalRelativeAngle is now a separate util. Seems the utils were > > not included in the dow2bnload. > > > |
|
|
Re: update the download jar?Hi Edwin,
You should use robocode.util.Utils.normalRelativeAngle(). All the methods you mention are located in the robocode.util.Utils class. You can see the methods and documentation here (the newest version - 1.7.1.1): http://robocode.sourceforge.net/docs/robocode/ NOTE: You should not download the MyFirstRobot. Instead you should use the sources that comes with Robocode in the folder: \robocode\robots\sample Regarding the compiler problems. If you are using Jikes, then please use the JDK 5.0 or 6 from Sun instead. Lots of people are getting compiler errors with Jikes, which is deprecated now, but still used by many Robocoders. You can read about the problems (and solutions) at the Help forum here: https://sourceforge.net/forum/forum.php?forum_id=116459 If you still run into problems with Robocode, then please tell me which version of Robocode you use, the OS, and the compiler name and version you are using. Best regards, - Flemming N. Larsen --- In Robocode@..., "Edwin Pilobello" <e_pilobello@...> wrote: > > The labs have a new image here are Portland State University. It presents all the programs I use in class in one folder. Bottom line is that students in my Lego Robotics class got into robocode. Unfortunately, my "core" dumped robocode after a term on "non-use". So it's going to take me a while to reload robocode and familiarize myself with it. Anyway... > > We got into this normalRelativeAngle compile error again. > > The robot is Tracker and the error is "No accessible method" > > I tried combinations of the following: > > 1. Util.normalRelativeAngleDegrees() > 2. Util.normalRelativeAngle() > 3. import static robocode.util.Util.normalRelativeAngle > 4. import static robocode.util.Util > 5. import without the static > > Then I ran out of time. > > The kids were also getting errors relating to BulletHitBullet in MyFirstRobot, which does not use BulletHitBullet. I'll have to look that up later. > > Anyway, if someone more knowledgeable can please help a harried teacher to fix the bugs, please accept my sincerest gratitude. > > Best, > Edwin > > --- In Robocode@..., "flemmingnlarsen" <flemming.n.larsen@> wrote: > > > > Hi, > > > > Originally the normalRelativeAngle() method (and similar methods) was > > available in the internal Robocode class robocode.util.Utils. The > > robots were not supposed to use these internal methods. But since a > > lot of old robots count of the Utils class, it has been preserved for > > backwards compability with old robots. > > > > So, the normalRelativeAngle() is not available on the Robot and > > AdvancedRobot class etc. you have to 'import robocode.util.Utils', and > > write Utils.normalRelativeAngle() in order to access it. > > > > With Java 5 you can do this "smarter" by performing a static import > > like 'import static robocode.util.Utils.*'. This way you can call > > 'normalRelativeAngle()' instead of writing 'Utils.' as "prefix". > > > > Regards, > > - Flemming > > > > --- In Robocode@..., "Edwin Pilobello" <e_pilobello@> > > wrote: > > > > > > One of my students downloaded robocode and compiled TrackFire. It > > > seems normalRelativeAngle is now a separate util. Seems the utils were > > > not included in the dow2bnload. > > > > > > |
|
|
Re: update the download jar?I'm trying this at home. I've downloaded the latest version of robocode.
I reset the compiler. It found java home correctly at C:\Program Files\Java\jre1.6.0_06 but reported that there was no javac and continued with testing jikes. It settled on jikes. I looked for javac and could not find it. Of course, compiling Tracker with jikes failed. So, I'm off to looking for javac. Looks like I'll have to install the JDK. Am I on the right track? Best, Edwin --- In Robocode@..., "flemmingnlarsen" <flemming.n.larsen@...> wrote: > > Hi Edwin, > > You should use robocode.util.Utils.normalRelativeAngle(). All the methods you mention are located in the robocode.util.Utils class. > > You can see the methods and documentation here (the newest version - 1.7.1.1): > > http://robocode.sourceforge.net/docs/robocode/ > > NOTE: You should not download the MyFirstRobot. Instead you should use the sources that comes with Robocode in the folder: \robocode\robots\sample > > Regarding the compiler problems. If you are using Jikes, then please use the JDK 5.0 or 6 from Sun instead. Lots of people are getting compiler errors with Jikes, which is deprecated now, but still used by many Robocoders. You can read about the problems (and solutions) at the Help forum here: > > https://sourceforge.net/forum/forum.php?forum_id=116459 > > If you still run into problems with Robocode, then please tell me which version of Robocode you use, the OS, and the compiler name and version you are using. > > Best regards, > - Flemming N. Larsen > > --- In Robocode@..., "Edwin Pilobello" <e_pilobello@> wrote: > > > > The labs have a new image here are Portland State University. It presents all the programs I use in class in one folder. Bottom line is that students in my Lego Robotics class got into robocode. Unfortunately, my "core" dumped robocode after a term on "non-use". So it's going to take me a while to reload robocode and familiarize myself with it. Anyway... > > > > We got into this normalRelativeAngle compile error again. > > > > The robot is Tracker and the error is "No accessible method" > > > > I tried combinations of the following: > > > > 1. Util.normalRelativeAngleDegrees() > > 2. Util.normalRelativeAngle() > > 3. import static robocode.util.Util.normalRelativeAngle > > 4. import static robocode.util.Util > > 5. import without the static > > > > Then I ran out of time. > > > > The kids were also getting errors relating to BulletHitBullet in MyFirstRobot, which does not use BulletHitBullet. I'll have to look that up later. > > > > Anyway, if someone more knowledgeable can please help a harried teacher to fix the bugs, please accept my sincerest gratitude. > > > > Best, > > Edwin > > > > --- In Robocode@..., "flemmingnlarsen" <flemming.n.larsen@> wrote: > > > > > > Hi, > > > > > > Originally the normalRelativeAngle() method (and similar methods) was > > > available in the internal Robocode class robocode.util.Utils. The > > > robots were not supposed to use these internal methods. But since a > > > lot of old robots count of the Utils class, it has been preserved for > > > backwards compability with old robots. > > > > > > So, the normalRelativeAngle() is not available on the Robot and > > > AdvancedRobot class etc. you have to 'import robocode.util.Utils', and > > > write Utils.normalRelativeAngle() in order to access it. > > > > > > With Java 5 you can do this "smarter" by performing a static import > > > like 'import static robocode.util.Utils.*'. This way you can call > > > 'normalRelativeAngle()' instead of writing 'Utils.' as "prefix". > > > > > > Regards, > > > - Flemming > > > > > > --- In Robocode@..., "Edwin Pilobello" <e_pilobello@> > > > wrote: > > > > > > > > One of my students downloaded robocode and compiled TrackFire. It > > > > seems normalRelativeAngle is now a separate util. Seems the utils were > > > > not included in the dow2bnload. > > > > > > > > > > |
|
|
Re: update the download jar?Hi Edwin,
> I reset the compiler. It found java home correctly at C:\Program Files\Java\jre1.6.0_06 but reported that there was no javac and continued with testing jikes. It settled on jikes. I looked for javac and could not find it. > > Of course, compiling Tracker with jikes failed. So, I'm off to looking for javac. Looks like I'll have to install the JDK. You have to. javac is not part of the JRE. HTH Johannes |
|
|
Re: update the download jar?Yes, you are on the right track.
But you need to install a JDK (Java Development Kit) as the JRE (Java Runtime Environment is not enough). Jikes could be used instead of javac, but I do not recommend this anymore as it cause people lots of trouble when compiling. Best, - Flemming --- In Robocode@..., "Edwin Pilobello" <e_pilobello@...> wrote: > > I'm trying this at home. I've downloaded the latest version of robocode. > > I reset the compiler. It found java home correctly at C:\Program Files\Java\jre1.6.0_06 but reported that there was no javac and continued with testing jikes. It settled on jikes. I looked for javac and could not find it. > > Of course, compiling Tracker with jikes failed. So, I'm off to looking for javac. Looks like I'll have to install the JDK. > > Am I on the right track? > > Best, > Edwin > > > --- In Robocode@..., "flemmingnlarsen" <flemming.n.larsen@> wrote: > > > > Hi Edwin, > > > > You should use robocode.util.Utils.normalRelativeAngle(). All the methods you mention are located in the robocode.util.Utils class. > > > > You can see the methods and documentation here (the newest version - 1.7.1.1): > > > > http://robocode.sourceforge.net/docs/robocode/ > > > > NOTE: You should not download the MyFirstRobot. Instead you should use the sources that comes with Robocode in the folder: \robocode\robots\sample > > > > Regarding the compiler problems. If you are using Jikes, then please use the JDK 5.0 or 6 from Sun instead. Lots of people are getting compiler errors with Jikes, which is deprecated now, but still used by many Robocoders. You can read about the problems (and solutions) at the Help forum here: > > > > https://sourceforge.net/forum/forum.php?forum_id=116459 > > > > If you still run into problems with Robocode, then please tell me which version of Robocode you use, the OS, and the compiler name and version you are using. > > > > Best regards, > > - Flemming N. Larsen > > > > --- In Robocode@..., "Edwin Pilobello" <e_pilobello@> wrote: > > > > > > The labs have a new image here are Portland State University. It presents all the programs I use in class in one folder. Bottom line is that students in my Lego Robotics class got into robocode. Unfortunately, my "core" dumped robocode after a term on "non-use". So it's going to take me a while to reload robocode and familiarize myself with it. Anyway... > > > > > > We got into this normalRelativeAngle compile error again. > > > > > > The robot is Tracker and the error is "No accessible method" > > > > > > I tried combinations of the following: > > > > > > 1. Util.normalRelativeAngleDegrees() > > > 2. Util.normalRelativeAngle() > > > 3. import static robocode.util.Util.normalRelativeAngle > > > 4. import static robocode.util.Util > > > 5. import without the static > > > > > > Then I ran out of time. > > > > > > The kids were also getting errors relating to BulletHitBullet in MyFirstRobot, which does not use BulletHitBullet. I'll have to look that up later. > > > > > > Anyway, if someone more knowledgeable can please help a harried teacher to fix the bugs, please accept my sincerest gratitude. > > > > > > Best, > > > Edwin > > > > > > --- In Robocode@..., "flemmingnlarsen" <flemming.n.larsen@> wrote: > > > > > > > > Hi, > > > > > > > > Originally the normalRelativeAngle() method (and similar methods) was > > > > available in the internal Robocode class robocode.util.Utils. The > > > > robots were not supposed to use these internal methods. But since a > > > > lot of old robots count of the Utils class, it has been preserved for > > > > backwards compability with old robots. > > > > > > > > So, the normalRelativeAngle() is not available on the Robot and > > > > AdvancedRobot class etc. you have to 'import robocode.util.Utils', and > > > > write Utils.normalRelativeAngle() in order to access it. > > > > > > > > With Java 5 you can do this "smarter" by performing a static import > > > > like 'import static robocode.util.Utils.*'. This way you can call > > > > 'normalRelativeAngle()' instead of writing 'Utils.' as "prefix". > > > > > > > > Regards, > > > > - Flemming > > > > > > > > --- In Robocode@..., "Edwin Pilobello" <e_pilobello@> > > > > wrote: > > > > > > > > > > One of my students downloaded robocode and compiled TrackFire. It > > > > > seems normalRelativeAngle is now a separate util. Seems the utils were > > > > > not included in the dow2bnload. > > > > > > > > > > > > > > > |
|
|
Re: update the download jar?The jdk is installed. I'm still trying to figure out how to re-direct the compiler from jikes to javac. I editted the classpath under Robot/Editor/Compiler/Options/Preferences then run Compiler Reset. It reverted back to jikes and reloaded the fields I editted.
So, I need to figure out how to change the compiler binary and classpath fields. Does the info/links/path in the Compiler Preferences window come from the system path? --- In Robocode@..., "flemmingnlarsen" <flemming.n.larsen@...> wrote: > > Yes, you are on the right track. > > But you need to install a JDK (Java Development Kit) as the JRE (Java Runtime Environment is not enough). Jikes could be used instead of javac, but I do not recommend this anymore as it cause people lots of trouble when compiling. > > Best, > - Flemming > > --- In Robocode@..., "Edwin Pilobello" <e_pilobello@> wrote: > > > > I'm trying this at home. I've downloaded the latest version of robocode. > > > > I reset the compiler. It found java home correctly at C:\Program Files\Java\jre1.6.0_06 but reported that there was no javac and continued with testing jikes. It settled on jikes. I looked for javac and could not find it. > > > > Of course, compiling Tracker with jikes failed. So, I'm off to looking for javac. Looks like I'll have to install the JDK. > > > > Am I on the right track? > > > > Best, > > Edwin > > > > > > --- In Robocode@..., "flemmingnlarsen" <flemming.n.larsen@> wrote: > > > > > > Hi Edwin, > > > > > > You should use robocode.util.Utils.normalRelativeAngle(). All the methods you mention are located in the robocode.util.Utils class. > > > > > > You can see the methods and documentation here (the newest version - 1.7.1.1): > > > > > > http://robocode.sourceforge.net/docs/robocode/ > > > > > > NOTE: You should not download the MyFirstRobot. Instead you should use the sources that comes with Robocode in the folder: \robocode\robots\sample > > > > > > Regarding the compiler problems. If you are using Jikes, then please use the JDK 5.0 or 6 from Sun instead. Lots of people are getting compiler errors with Jikes, which is deprecated now, but still used by many Robocoders. You can read about the problems (and solutions) at the Help forum here: > > > > > > https://sourceforge.net/forum/forum.php?forum_id=116459 > > > > > > If you still run into problems with Robocode, then please tell me which version of Robocode you use, the OS, and the compiler name and version you are using. > > > > > > Best regards, > > > - Flemming N. Larsen > > > > > > --- In Robocode@..., "Edwin Pilobello" <e_pilobello@> wrote: > > > > > > > > The labs have a new image here are Portland State University. It presents all the programs I use in class in one folder. Bottom line is that students in my Lego Robotics class got into robocode. Unfortunately, my "core" dumped robocode after a term on "non-use". So it's going to take me a while to reload robocode and familiarize myself with it. Anyway... > > > > > > > > We got into this normalRelativeAngle compile error again. > > > > > > > > The robot is Tracker and the error is "No accessible method" > > > > > > > > I tried combinations of the following: > > > > > > > > 1. Util.normalRelativeAngleDegrees() > > > > 2. Util.normalRelativeAngle() > > > > 3. import static robocode.util.Util.normalRelativeAngle > > > > 4. import static robocode.util.Util > > > > 5. import without the static > > > > > > > > Then I ran out of time. > > > > > > > > The kids were also getting errors relating to BulletHitBullet in MyFirstRobot, which does not use BulletHitBullet. I'll have to look that up later. > > > > > > > > Anyway, if someone more knowledgeable can please help a harried teacher to fix the bugs, please accept my sincerest gratitude. > > > > > > > > Best, > > > > Edwin > > > > > > > > --- In Robocode@..., "flemmingnlarsen" <flemming.n.larsen@> wrote: > > > > > > > > > > Hi, > > > > > > > > > > Originally the normalRelativeAngle() method (and similar methods) was > > > > > available in the internal Robocode class robocode.util.Utils. The > > > > > robots were not supposed to use these internal methods. But since a > > > > > lot of old robots count of the Utils class, it has been preserved for > > > > > backwards compability with old robots. > > > > > > > > > > So, the normalRelativeAngle() is not available on the Robot and > > > > > AdvancedRobot class etc. you have to 'import robocode.util.Utils', and > > > > > write Utils.normalRelativeAngle() in order to access it. > > > > > > > > > > With Java 5 you can do this "smarter" by performing a static import > > > > > like 'import static robocode.util.Utils.*'. This way you can call > > > > > 'normalRelativeAngle()' instead of writing 'Utils.' as "prefix". > > > > > > > > > > Regards, > > > > > - Flemming > > > > > > > > > > --- In Robocode@..., "Edwin Pilobello" <e_pilobello@> > > > > > wrote: > > > > > > > > > > > > One of my students downloaded robocode and compiled TrackFire. It > > > > > > seems normalRelativeAngle is now a separate util. Seems the utils were > > > > > > not included in the dow2bnload. > > > > > > > > > > > > > > > > > > > > > |
|
|
Re: update the download jar?You need to set up a JAVA_HOME environment variable to point at C:\Program Files\Java\jre1.6.0_06
You also need to extend your PATH environment variable to: %JAVA_HOME%\bin;[... the rest of the path like before ...] From a command line (cmd.exe) you should be able to run the javac comiler by typing javac and enter. When this works, it will work in Robocode too. When the environment variables have been set system wide, then you must reset the compiler in Robocode, and you should be able to choose between javac and Jikes. Hope this helps. :-) Best, - Flemming --- In Robocode@..., "Edwin Pilobello" <e_pilobello@...> wrote: > > The jdk is installed. I'm still trying to figure out how to re-direct the compiler from jikes to javac. I editted the classpath under Robot/Editor/Compiler/Options/Preferences then run Compiler Reset. It reverted back to jikes and reloaded the fields I editted. > > So, I need to figure out how to change the compiler binary and classpath fields. Does the info/links/path in the Compiler Preferences window come from the system path? > > > --- In Robocode@..., "flemmingnlarsen" <flemming.n.larsen@> wrote: > > > > Yes, you are on the right track. > > > > But you need to install a JDK (Java Development Kit) as the JRE (Java Runtime Environment is not enough). Jikes could be used instead of javac, but I do not recommend this anymore as it cause people lots of trouble when compiling. > > > > Best, > > - Flemming > > > > --- In Robocode@..., "Edwin Pilobello" <e_pilobello@> wrote: > > > > > > I'm trying this at home. I've downloaded the latest version of robocode. > > > > > > I reset the compiler. It found java home correctly at C:\Program Files\Java\jre1.6.0_06 but reported that there was no javac and continued with testing jikes. It settled on jikes. I looked for javac and could not find it. > > > > > > Of course, compiling Tracker with jikes failed. So, I'm off to looking for javac. Looks like I'll have to install the JDK. > > > > > > Am I on the right track? > > > > > > Best, > > > Edwin > > > > > > > > > --- In Robocode@..., "flemmingnlarsen" <flemming.n.larsen@> wrote: > > > > > > > > Hi Edwin, > > > > > > > > You should use robocode.util.Utils.normalRelativeAngle(). All the methods you mention are located in the robocode.util.Utils class. > > > > > > > > You can see the methods and documentation here (the newest version - 1.7.1.1): > > > > > > > > http://robocode.sourceforge.net/docs/robocode/ > > > > > > > > NOTE: You should not download the MyFirstRobot. Instead you should use the sources that comes with Robocode in the folder: \robocode\robots\sample > > > > > > > > Regarding the compiler problems. If you are using Jikes, then please use the JDK 5.0 or 6 from Sun instead. Lots of people are getting compiler errors with Jikes, which is deprecated now, but still used by many Robocoders. You can read about the problems (and solutions) at the Help forum here: > > > > > > > > https://sourceforge.net/forum/forum.php?forum_id=116459 > > > > > > > > If you still run into problems with Robocode, then please tell me which version of Robocode you use, the OS, and the compiler name and version you are using. > > > > > > > > Best regards, > > > > - Flemming N. Larsen > > > > > > > > --- In Robocode@..., "Edwin Pilobello" <e_pilobello@> wrote: > > > > > > > > > > The labs have a new image here are Portland State University. It presents all the programs I use in class in one folder. Bottom line is that students in my Lego Robotics class got into robocode. Unfortunately, my "core" dumped robocode after a term on "non-use". So it's going to take me a while to reload robocode and familiarize myself with it. Anyway... > > > > > > > > > > We got into this normalRelativeAngle compile error again. > > > > > > > > > > The robot is Tracker and the error is "No accessible method" > > > > > > > > > > I tried combinations of the following: > > > > > > > > > > 1. Util.normalRelativeAngleDegrees() > > > > > 2. Util.normalRelativeAngle() > > > > > 3. import static robocode.util.Util.normalRelativeAngle > > > > > 4. import static robocode.util.Util > > > > > 5. import without the static > > > > > > > > > > Then I ran out of time. > > > > > > > > > > The kids were also getting errors relating to BulletHitBullet in MyFirstRobot, which does not use BulletHitBullet. I'll have to look that up later. > > > > > > > > > > Anyway, if someone more knowledgeable can please help a harried teacher to fix the bugs, please accept my sincerest gratitude. > > > > > > > > > > Best, > > > > > Edwin > > > > > > > > > > --- In Robocode@..., "flemmingnlarsen" <flemming.n.larsen@> wrote: > > > > > > > > > > > > Hi, > > > > > > > > > > > > Originally the normalRelativeAngle() method (and similar methods) was > > > > > > available in the internal Robocode class robocode.util.Utils. The > > > > > > robots were not supposed to use these internal methods. But since a > > > > > > lot of old robots count of the Utils class, it has been preserved for > > > > > > backwards compability with old robots. > > > > > > > > > > > > So, the normalRelativeAngle() is not available on the Robot and > > > > > > AdvancedRobot class etc. you have to 'import robocode.util.Utils', and > > > > > > write Utils.normalRelativeAngle() in order to access it. > > > > > > > > > > > > With Java 5 you can do this "smarter" by performing a static import > > > > > > like 'import static robocode.util.Utils.*'. This way you can call > > > > > > 'normalRelativeAngle()' instead of writing 'Utils.' as "prefix". > > > > > > > > > > > > Regards, > > > > > > - Flemming > > > > > > > > > > > > --- In Robocode@..., "Edwin Pilobello" <e_pilobello@> > > > > > > wrote: > > > > > > > > > > > > > > One of my students downloaded robocode and compiled TrackFire. It > > > > > > > seems normalRelativeAngle is now a separate util. Seems the utils were > > > > > > > not included in the dow2bnload. > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
|
|
Re: update the download jar?Thanks!
I need to do some figuring out. I got this: Compiling... javac: invalid flag: -classpath C:\Program Usage: javac <options> <source files> use -help for a list of possible options Compile Failed (2) It may be that I've had so many versions of java installed in the last few years that my registry is all messed up. Who knows? --- In Robocode@..., "flemmingnlarsen" <flemming.n.larsen@...> wrote: > > You need to set up a JAVA_HOME environment variable to point at C:\Program Files\Java\jre1.6.0_06 > > You also need to extend your PATH environment variable to: > > %JAVA_HOME%\bin;[... the rest of the path like before ...] > > From a command line (cmd.exe) you should be able to run the javac comiler by typing javac and enter. When this works, it will work in Robocode too. > > When the environment variables have been set system wide, then you must reset the compiler in Robocode, and you should be able to choose between javac and Jikes. > > Hope this helps. :-) > > Best, > - Flemming > > > --- In Robocode@..., "Edwin Pilobello" <e_pilobello@> wrote: > > > > The jdk is installed. I'm still trying to figure out how to re-direct the compiler from jikes to javac. I editted the classpath under Robot/Editor/Compiler/Options/Preferences then run Compiler Reset. It reverted back to jikes and reloaded the fields I editted. > > > > So, I need to figure out how to change the compiler binary and classpath fields. Does the info/links/path in the Compiler Preferences window come from the system path? > > > > > > --- In Robocode@..., "flemmingnlarsen" <flemming.n.larsen@> wrote: > > > > > > Yes, you are on the right track. > > > > > > But you need to install a JDK (Java Development Kit) as the JRE (Java Runtime Environment is not enough). Jikes could be used instead of javac, but I do not recommend this anymore as it cause people lots of trouble when compiling. > > > > > > Best, > > > - Flemming > > > > > > --- In Robocode@..., "Edwin Pilobello" <e_pilobello@> wrote: > > > > > > > > I'm trying this at home. I've downloaded the latest version of robocode. > > > > > > > > I reset the compiler. It found java home correctly at C:\Program Files\Java\jre1.6.0_06 but reported that there was no javac and continued with testing jikes. It settled on jikes. I looked for javac and could not find it. > > > > > > > > Of course, compiling Tracker with jikes failed. So, I'm off to looking for javac. Looks like I'll have to install the JDK. > > > > > > > > Am I on the right track? > > > > > > > > Best, > > > > Edwin > > > > > > > > > > > > --- In Robocode@..., "flemmingnlarsen" <flemming.n.larsen@> wrote: > > > > > > > > > > Hi Edwin, > > > > > > > > > > You should use robocode.util.Utils.normalRelativeAngle(). All the methods you mention are located in the robocode.util.Utils class. > > > > > > > > > > You can see the methods and documentation here (the newest version - 1.7.1.1): > > > > > > > > > > http://robocode.sourceforge.net/docs/robocode/ > > > > > > > > > > NOTE: You should not download the MyFirstRobot. Instead you should use the sources that comes with Robocode in the folder: \robocode\robots\sample > > > > > > > > > > Regarding the compiler problems. If you are using Jikes, then please use the JDK 5.0 or 6 from Sun instead. Lots of people are getting compiler errors with Jikes, which is deprecated now, but still used by many Robocoders. You can read about the problems (and solutions) at the Help forum here: > > > > > > > > > > https://sourceforge.net/forum/forum.php?forum_id=116459 > > > > > > > > > > If you still run into problems with Robocode, then please tell me which version of Robocode you use, the OS, and the compiler name and version you are using. > > > > > > > > > > Best regards, > > > > > - Flemming N. Larsen > > > > > > > > > > --- In Robocode@..., "Edwin Pilobello" <e_pilobello@> wrote: > > > > > > > > > > > > The labs have a new image here are Portland State University. It presents all the programs I use in class in one folder. Bottom line is that students in my Lego Robotics class got into robocode. Unfortunately, my "core" dumped robocode after a term on "non-use". So it's going to take me a while to reload robocode and familiarize myself with it. Anyway... > > > > > > > > > > > > We got into this normalRelativeAngle compile error again. > > > > > > > > > > > > The robot is Tracker and the error is "No accessible method" > > > > > > > > > > > > I tried combinations of the following: > > > > > > > > > > > > 1. Util.normalRelativeAngleDegrees() > > > > > > 2. Util.normalRelativeAngle() > > > > > > 3. import static robocode.util.Util.normalRelativeAngle > > > > > > 4. import static robocode.util.Util > > > > > > 5. import without the static > > > > > > > > > > > > Then I ran out of time. > > > > > > > > > > > > The kids were also getting errors relating to BulletHitBullet in MyFirstRobot, which does not use BulletHitBullet. I'll have to look that up later. > > > > > > > > > > > > Anyway, if someone more knowledgeable can please help a harried teacher to fix the bugs, please accept my sincerest gratitude. > > > > > > > > > > > > Best, > > > > > > Edwin > > > > > > > > > > > > --- In Robocode@..., "flemmingnlarsen" <flemming.n.larsen@> wrote: > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > Originally the normalRelativeAngle() method (and similar methods) was > > > > > > > available in the internal Robocode class robocode.util.Utils. The > > > > > > > robots were not supposed to use these internal methods. But since a > > > > > > > lot of old robots count of the Utils class, it has been preserved for > > > > > > > backwards compability with old robots. > > > > > > > > > > > > > > So, the normalRelativeAngle() is not available on the Robot and > > > > > > > AdvancedRobot class etc. you have to 'import robocode.util.Utils', and > > > > > > > write Utils.normalRelativeAngle() in order to access it. > > > > > > > > > > > > > > With Java 5 you can do this "smarter" by performing a static import > > > > > > > like 'import static robocode.util.Utils.*'. This way you can call > > > > > > > 'normalRelativeAngle()' instead of writing 'Utils.' as "prefix". > > > > > > > > > > > > > > Regards, > > > > > > > - Flemming > > > > > > > > > > > > > > --- In Robocode@..., "Edwin Pilobello" <e_pilobello@> > > > > > > > wrote: > > > > > > > > > > > > > > > > One of my students downloaded robocode and compiled TrackFire. It > > > > > > > > seems normalRelativeAngle is now a separate util. Seems the utils were > > > > > > > > not included in the dow2bnload. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
|
|
Re: update the download jar?Hi, I am very sorry. Looking into my previos answer to you, I wrote that you should point the JAVA_HOME at the JRE. You should not, instead you need to point the JAVA_HOME to the home of your JDK.
JAVA_HOME: C:\Program Files\Java\jdk1.6.0_06 And keep the PATH like it is, if you remembered to add the %JAVA_HOME%\bin; to the path. I hope this help. :-) - Flemming --- In Robocode@..., "Edwin Pilobello" <e_pilobello@...> wrote: > > Thanks! > > I need to do some figuring out. I got this: > > Compiling... > javac: invalid flag: -classpath C:\Program > Usage: javac <options> <source files> > use -help for a list of possible options > Compile Failed (2) > > It may be that I've had so many versions of java installed in the last few years that my registry is all messed up. Who knows? > > > --- In Robocode@..., "flemmingnlarsen" <flemming.n.larsen@> wrote: > > > > You need to set up a JAVA_HOME environment variable to point at C:\Program Files\Java\jre1.6.0_06 > > > > You also need to extend your PATH environment variable to: > > > > %JAVA_HOME%\bin;[... the rest of the path like before ...] > > > > From a command line (cmd.exe) you should be able to run the javac comiler by typing javac and enter. When this works, it will work in Robocode too. > > > > When the environment variables have been set system wide, then you must reset the compiler in Robocode, and you should be able to choose between javac and Jikes. > > > > Hope this helps. :-) > > > > Best, > > - Flemming > > > > > > --- In Robocode@..., "Edwin Pilobello" <e_pilobello@> wrote: > > > > > > The jdk is installed. I'm still trying to figure out how to re-direct the compiler from jikes to javac. I editted the classpath under Robot/Editor/Compiler/Options/Preferences then run Compiler Reset. It reverted back to jikes and reloaded the fields I editted. > > > > > > So, I need to figure out how to change the compiler binary and classpath fields. Does the info/links/path in the Compiler Preferences window come from the system path? > > > > > > > > > --- In Robocode@..., "flemmingnlarsen" <flemming.n.larsen@> wrote: > > > > > > > > Yes, you are on the right track. > > > > > > > > But you need to install a JDK (Java Development Kit) as the JRE (Java Runtime Environment is not enough). Jikes could be used instead of javac, but I do not recommend this anymore as it cause people lots of trouble when compiling. > > > > > > > > Best, > > > > - Flemming > > > > > > > > --- In Robocode@..., "Edwin Pilobello" <e_pilobello@> wrote: > > > > > > > > > > I'm trying this at home. I've downloaded the latest version of robocode. > > > > > > > > > > I reset the compiler. It found java home correctly at C:\Program Files\Java\jre1.6.0_06 but reported that there was no javac and continued with testing jikes. It settled on jikes. I looked for javac and could not find it. > > > > > > > > > > Of course, compiling Tracker with jikes failed. So, I'm off to looking for javac. Looks like I'll have to install the JDK. > > > > > > > > > > Am I on the right track? > > > > > > > > > > Best, > > > > > Edwin > > > > > > > > > > > > > > > --- In Robocode@..., "flemmingnlarsen" <flemming.n.larsen@> wrote: > > > > > > > > > > > > Hi Edwin, > > > > > > > > > > > > You should use robocode.util.Utils.normalRelativeAngle(). All the methods you mention are located in the robocode.util.Utils class. > > > > > > > > > > > > You can see the methods and documentation here (the newest version - 1.7.1.1): > > > > > > > > > > > > http://robocode.sourceforge.net/docs/robocode/ > > > > > > > > > > > > NOTE: You should not download the MyFirstRobot. Instead you should use the sources that comes with Robocode in the folder: \robocode\robots\sample > > > > > > > > > > > > Regarding the compiler problems. If you are using Jikes, then please use the JDK 5.0 or 6 from Sun instead. Lots of people are getting compiler errors with Jikes, which is deprecated now, but still used by many Robocoders. You can read about the problems (and solutions) at the Help forum here: > > > > > > > > > > > > https://sourceforge.net/forum/forum.php?forum_id=116459 > > > > > > > > > > > > If you still run into problems with Robocode, then please tell me which version of Robocode you use, the OS, and the compiler name and version you are using. > > > > > > > > > > > > Best regards, > > > > > > - Flemming N. Larsen > > > > > > > > > > > > --- In Robocode@..., "Edwin Pilobello" <e_pilobello@> wrote: > > > > > > > > > > > > > > The labs have a new image here are Portland State University. It presents all the programs I use in class in one folder. Bottom line is that students in my Lego Robotics class got into robocode. Unfortunately, my "core" dumped robocode after a term on "non-use". So it's going to take me a while to reload robocode and familiarize myself with it. Anyway... > > > > > > > > > > > > > > We got into this normalRelativeAngle compile error again. > > > > > > > > > > > > > > The robot is Tracker and the error is "No accessible method" > > > > > > > > > > > > > > I tried combinations of the following: > > > > > > > > > > > > > > 1. Util.normalRelativeAngleDegrees() > > > > > > > 2. Util.normalRelativeAngle() > > > > > > > 3. import static robocode.util.Util.normalRelativeAngle > > > > > > > 4. import static robocode.util.Util > > > > > > > 5. import without the static > > > > > > > > > > > > > > Then I ran out of time. > > > > > > > > > > > > > > The kids were also getting errors relating to BulletHitBullet in MyFirstRobot, which does not use BulletHitBullet. I'll have to look that up later. > > > > > > > > > > > > > > Anyway, if someone more knowledgeable can please help a harried teacher to fix the bugs, please accept my sincerest gratitude. > > > > > > > > > > > > > > Best, > > > > > > > Edwin > > > > > > > > > > > > > > --- In Robocode@..., "flemmingnlarsen" <flemming.n.larsen@> wrote: > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > > > Originally the normalRelativeAngle() method (and similar methods) was > > > > > > > > available in the internal Robocode class robocode.util.Utils. The > > > > > > > > robots were not supposed to use these internal methods. But since a > > > > > > > > lot of old robots count of the Utils class, it has been preserved for > > > > > > > > backwards compability with old robots. > > > > > > > > > > > > > > > > So, the normalRelativeAngle() is not available on the Robot and > > > > > > > > AdvancedRobot class etc. you have to 'import robocode.util.Utils', and > > > > > > > > write Utils.normalRelativeAngle() in order to access it. > > > > > > > > > > > > > > > > With Java 5 you can do this "smarter" by performing a static import > > > > > > > > like 'import static robocode.util.Utils.*'. This way you can call > > > > > > > > 'normalRelativeAngle()' instead of writing 'Utils.' as "prefix". > > > > > > > > > > > > > > > > Regards, > > > > > > > > - Flemming > > > > > > > > > > > > > > > > --- In Robocode@..., "Edwin Pilobello" <e_pilobello@> > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > One of my students downloaded robocode and compiled TrackFire. It > > > > > > > > > seems normalRelativeAngle is now a separate util. Seems the utils were > > > > > > > > > not included in the dow2bnload. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
|
|
Re: update the download jar?No problem. I recognized it needed to be the jdk.
--- In Robocode@..., "flemmingnlarsen" <flemming.n.larsen@...> wrote: > > Hi, I am very sorry. Looking into my previos answer to you, I wrote that you should point the JAVA_HOME at the JRE. You should not, instead you need to point the JAVA_HOME to the home of your JDK. > > JAVA_HOME: > C:\Program Files\Java\jdk1.6.0_06 > > And keep the PATH like it is, if you remembered to add the %JAVA_HOME%\bin; to the path. > > I hope this help. :-) > > - Flemming > > > --- In Robocode@..., "Edwin Pilobello" <e_pilobello@> wrote: > > > > Thanks! > > > > I need to do some figuring out. I got this: > > > > Compiling... > > javac: invalid flag: -classpath C:\Program > > Usage: javac <options> <source files> > > use -help for a list of possible options > > Compile Failed (2) > > > > It may be that I've had so many versions of java installed in the last few years that my registry is all messed up. Who knows? > > > > > > --- In Robocode@..., "flemmingnlarsen" <flemming.n.larsen@> wrote: > > > > > > You need to set up a JAVA_HOME environment variable to point at C:\Program Files\Java\jre1.6.0_06 > > > > > > You also need to extend your PATH environment variable to: > > > > > > %JAVA_HOME%\bin;[... the rest of the path like before ...] > > > > > > From a command line (cmd.exe) you should be able to run the javac comiler by typing javac and enter. When this works, it will work in Robocode too. > > > > > > When the environment variables have been set system wide, then you must reset the compiler in Robocode, and you should be able to choose between javac and Jikes. > > > > > > Hope this helps. :-) > > > > > > Best, > > > - Flemming > > > > > > > > > --- In Robocode@..., "Edwin Pilobello" <e_pilobello@> wrote: > > > > > > > > The jdk is installed. I'm still trying to figure out how to re-direct the compiler from jikes to javac. I editted the classpath under Robot/Editor/Compiler/Options/Preferences then run Compiler Reset. It reverted back to jikes and reloaded the fields I editted. > > > > > > > > So, I need to figure out how to change the compiler binary and classpath fields. Does the info/links/path in the Compiler Preferences window come from the system path? > > > > > > > > > > > > --- In Robocode@..., "flemmingnlarsen" <flemming.n.larsen@> wrote: > > > > > > > > > > Yes, you are on the right track. > > > > > > > > > > But you need to install a JDK (Java Development Kit) as the JRE (Java Runtime Environment is not enough). Jikes could be used instead of javac, but I do not recommend this anymore as it cause people lots of trouble when compiling. > > > > > > > > > > Best, > > > > > - Flemming > > > > > > > > > > --- In Robocode@..., "Edwin Pilobello" <e_pilobello@> wrote: > > > > > > > > > > > > I'm trying this at home. I've downloaded the latest version of robocode. > > > > > > > > > > > > I reset the compiler. It found java home correctly at C:\Program Files\Java\jre1.6.0_06 but reported that there was no javac and continued with testing jikes. It settled on jikes. I looked for javac and could not find it. > > > > > > > > > > > > Of course, compiling Tracker with jikes failed. So, I'm off to looking for javac. Looks like I'll have to install the JDK. > > > > > > > > > > > > Am I on the right track? > > > > > > > > > > > > Best, > > > > > > Edwin > > > > > > > > > > > > > > > > > > --- In Robocode@..., "flemmingnlarsen" <flemming.n.larsen@> wrote: > > > > > > > > > > > > > > Hi Edwin, > > > > > > > > > > > > > > You should use robocode.util.Utils.normalRelativeAngle(). All the methods you mention are located in the robocode.util.Utils class. > > > > > > > > > > > > > > You can see the methods and documentation here (the newest version - 1.7.1.1): > > > > > > > > > > > > > > http://robocode.sourceforge.net/docs/robocode/ > > > > > > > > > > > > > > NOTE: You should not download the MyFirstRobot. Instead you should use the sources that comes with Robocode in the folder: \robocode\robots\sample > > > > > > > > > > > > > > Regarding the compiler problems. If you are using Jikes, then please use the JDK 5.0 or 6 from Sun instead. Lots of people are getting compiler errors with Jikes, which is deprecated now, but still used by many Robocoders. You can read about the problems (and solutions) at the Help forum here: > > > > > > > > > > > > > > https://sourceforge.net/forum/forum.php?forum_id=116459 > > > > > > > > > > > > > > If you still run into problems with Robocode, then please tell me which version of Robocode you use, the OS, and the compiler name and version you are using. > > > > > > > > > > > > > > Best regards, > > > > > > > - Flemming N. Larsen > > > > > > > > > > > > > > --- In Robocode@..., "Edwin Pilobello" <e_pilobello@> wrote: > > > > > > > > > > > > > > > > The labs have a new image here are Portland State University. It presents all the programs I use in class in one folder. Bottom line is that students in my Lego Robotics class got into robocode. Unfortunately, my "core" dumped robocode after a term on "non-use". So it's going to take me a while to reload robocode and familiarize myself with it. Anyway... > > > > > > > > > > > > > > > > We got into this normalRelativeAngle compile error again. > > > > > > > > > > > > > > > > The robot is Tracker and the error is "No accessible method" > > > > > > > > > > > > > > > > I tried combinations of the following: > > > > > > > > > > > > > > > > 1. Util.normalRelativeAngleDegrees() > > > > > > > > 2. Util.normalRelativeAngle() > > > > > > > > 3. import static robocode.util.Util.normalRelativeAngle > > > > > > > > 4. import static robocode.util.Util > > > > > > > > 5. import without the static > > > > > > > > > > > > > > > > Then I ran out of time. > > > > > > > > > > > > > > > > The kids were also getting errors relating to BulletHitBullet in MyFirstRobot, which does not use BulletHitBullet. I'll have to look that up later. > > > > > > > > > > > > > > > > Anyway, if someone more knowledgeable can please help a harried teacher to fix the bugs, please accept my sincerest gratitude. > > > > > > > > > > > > > > > > Best, > > > > > > > > Edwin > > > > > > > > > > > > > > > > --- In Robocode@..., "flemmingnlarsen" <flemming.n.larsen@> wrote: > > > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > > > > > Originally the normalRelativeAngle() method (and similar methods) was > > > > > > > > > available in the internal Robocode class robocode.util.Utils. The > > > > > > > > > robots were not supposed to use these internal methods. But since a > > > > > > > > > lot of old robots count of the Utils class, it has been preserved for > > > > > > > > > backwards compability with old robots. > > > > > > > > > > > > > > > > > > So, the normalRelativeAngle() is not available on the Robot and > > > > > > > > > AdvancedRobot class etc. you have to 'import robocode.util.Utils', and > > > > > > > > > write Utils.normalRelativeAngle() in order to access it. > > > > > > > > > > > > > > > > > > With Java 5 you can do this "smarter" by performing a static import > > > > > > > > > like 'import static robocode.util.Utils.*'. This way you can call > > > > > > > > > 'normalRelativeAngle()' instead of writing 'Utils.' as "prefix". > > > > > > > > > > > > > > > > > > Regards, > > > > > > > > > - Flemming > > > > > > > > > > > > > > > > > > --- In Robocode@..., "Edwin Pilobello" <e_pilobello@> > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > One of my students downloaded robocode and compiled TrackFire. It > > > > > > > > > > seems normalRelativeAngle is now a separate util. Seems the utils were > > > > > > > > > > not included in the dow2bnload. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
|
|
Re: update the download jar?Okay. But you still got the problem?
If so, perhaps you should try to encapsulate the path for the JAVA_HOME within quotes (")? For example: JAVA_HOME: "C:\Program Files\Java\jdk1.6.0_06" Best, - Flemming --- In Robocode@..., "Edwin Pilobello" <e_pilobello@...> wrote: > > No problem. I recognized it needed to be the jdk. > > > --- In Robocode@..., "flemmingnlarsen" <flemming.n.larsen@> wrote: > > > > Hi, I am very sorry. Looking into my previos answer to you, I wrote that you should point the JAVA_HOME at the JRE. You should not, instead you need to point the JAVA_HOME to the home of your JDK. > > > > JAVA_HOME: > > C:\Program Files\Java\jdk1.6.0_06 > > > > And keep the PATH like it is, if you remembered to add the %JAVA_HOME%\bin; to the path. > > > > I hope this help. :-) > > > > - Flemming > > > > > > --- In Robocode@..., "Edwin Pilobello" <e_pilobello@> wrote: > > > > > > Thanks! > > > > > > I need to do some figuring out. I got this: > > > > > > Compiling... > > > javac: invalid flag: -classpath C:\Program > > > Usage: javac <options> <source files> > > > use -help for a list of possible options > > > Compile Failed (2) > > > > > > It may be that I've had so many versions of java installed in the last few years that my registry is all messed up. Who knows? > > > > > > > > > --- In Robocode@..., "flemmingnlarsen" <flemming.n.larsen@> wrote: > > > > > > > > You need to set up a JAVA_HOME environment variable to point at C:\Program Files\Java\jre1.6.0_06 > > > > > > > > You also need to extend your PATH environment variable to: > > > > > > > > %JAVA_HOME%\bin;[... the rest of the path like before ...] > > > > > > > > From a command line (cmd.exe) you should be able to run the javac comiler by typing javac and enter. When this works, it will work in Robocode too. > > > > > > > > When the environment variables have been set system wide, then you must reset the compiler in Robocode, and you should be able to choose between javac and Jikes. > > > > > > > > Hope this helps. :-) > > > > > > > > Best, > > > > - Flemming > > > > > > > > > > > > --- In Robocode@..., "Edwin Pilobello" <e_pilobello@> wrote: > > > > > > > > > > The jdk is installed. I'm still trying to figure out how to re-direct the compiler from jikes to javac. I editted the classpath under Robot/Editor/Compiler/Options/Preferences then run Compiler Reset. It reverted back to jikes and reloaded the fields I editted. > > > > > > > > > > So, I need to figure out how to change the compiler binary and classpath fields. Does the info/links/path in the Compiler Preferences window come from the system path? > > > > > > > > > > > > > > > --- In Robocode@..., "flemmingnlarsen" <flemming.n.larsen@> wrote: > > > > > > > > > > > > Yes, you are on the right track. > > > > > > > > > > > > But you need to install a JDK (Java Development Kit) as the JRE (Java Runtime Environment is not enough). Jikes could be used instead of javac, but I do not recommend this anymore as it cause people lots of trouble when compiling. > > > > > > > > > > > > Best, > > > > > > - Flemming > > > > > > > > > > > > --- In Robocode@..., "Edwin Pilobello" <e_pilobello@> wrote: > > > > > > > > > > > > > > I'm trying this at home. I've downloaded the latest version of robocode. > > > > > > > > > > > > > > I reset the compiler. It found java home correctly at C:\Program Files\Java\jre1.6.0_06 but reported that there was no javac and continued with testing jikes. It settled on jikes. I looked for javac and could not find it. > > > > > > > > > > > > > > Of course, compiling Tracker with jikes failed. So, I'm off to looking for javac. Looks like I'll have to install the JDK. > > > > > > > > > > > > > > Am I on the right track? > > > > > > > > > > > > > > Best, > > > > > > > Edwin > > > > > > > > > > > > > > > > > > > > > --- In Robocode@..., "flemmingnlarsen" <flemming.n.larsen@> wrote: > > > > > > > > > > > > > > > > Hi Edwin, > > > > > > > > > > > > > > > > You should use robocode.util.Utils.normalRelativeAngle(). All the methods you mention are located in the robocode.util.Utils class. > > > > > > > > > > > > > > > > You can see the methods and documentation here (the newest version - 1.7.1.1): > > > > > > > > > > > > > > > > http://robocode.sourceforge.net/docs/robocode/ > > > > > > > > > > > > > > > > NOTE: You should not download the MyFirstRobot. Instead you should use the sources that comes with Robocode in the folder: \robocode\robots\sample > > > > > > > > > > > > > > > > Regarding the compiler problems. If you are using Jikes, then please use the JDK 5.0 or 6 from Sun instead. Lots of people are getting compiler errors with Jikes, which is deprecated now, but still used by many Robocoders. You can read about the problems (and solutions) at the Help forum here: > > > > > > > > > > > > > > > > https://sourceforge.net/forum/forum.php?forum_id=116459 > > > > > > > > > > > > > > > > If you still run into problems with Robocode, then please tell me which version of Robocode you use, the OS, and the compiler name and version you are using. > > > > > > > > > > > > > > > > Best regards, > > > > > > > > - Flemming N. Larsen > > > > > > > > > > > > > > > > --- In Robocode@..., "Edwin Pilobello" <e_pilobello@> wrote: > > > > > > > > > > > > > > > > > > The labs have a new image here are Portland State University. It presents all the programs I use in class in one folder. Bottom line is that students in my Lego Robotics class got into robocode. Unfortunately, my "core" dumped robocode after a term on "non-use". So it's going to take me a while to reload robocode and familiarize myself with it. Anyway... > > > > > > > > > > > > > > > > > > We got into this normalRelativeAngle compile error again. > > > > > > > > > > > > > > > > > > The robot is Tracker and the error is "No accessible method" > > > > > > > > > > > > > > > > > > I tried combinations of the following: > > > > > > > > > > > > > > > > > > 1. Util.normalRelativeAngleDegrees() > > > > > > > > > 2. Util.normalRelativeAngle() > > > > > > > > > 3. import static robocode.util.Util.normalRelativeAngle > > > > > > > > > 4. import static robocode.util.Util > > > > > > > > > 5. import without the static > > > > > > > > > > > > > > > > > > Then I ran out of time. > > > > > > > > > > > > > > > > > > The kids were also getting errors relating to BulletHitBullet in MyFirstRobot, which does not use BulletHitBullet. I'll have to look that up later. > > > > > > > > > > > > > > > > > > Anyway, if someone more knowledgeable can please help a harried teacher to fix the bugs, please accept my sincerest gratitude. > > > > > > > > > > > > > > > > > > Best, > > > > > > > > > Edwin > > > > > > > > > > > > > > > > > > --- In Robocode@..., "flemmingnlarsen" <flemming.n.larsen@> wrote: > > > > > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > > > > > > > Originally the normalRelativeAngle() method (and similar methods) was > > > > > > > > > > available in the internal Robocode class robocode.util.Utils. The > > > > > > > > > > robots were not supposed to use these internal methods. But since a > > > > > > > > > > lot of old robots count of the Utils class, it has been preserved for > > > > > > > > > > backwards compability with old robots. > > > > > > > > > > > > > > > > > > > > So, the normalRelativeAngle() is not available on the Robot and > > > > > > > > > > AdvancedRobot class etc. you have to 'import robocode.util.Utils', and > > > > > > > > > > write Utils.normalRelativeAngle() in order to access it. > > > > > > > > > > > > > > > > > > > > With Java 5 you can do this "smarter" by performing a static import > > > > > > > > > > like 'import static robocode.util.Utils.*'. This way you can call > > > > > > > > > > 'normalRelativeAngle()' instead of writing 'Utils.' as "prefix". > > > > > > > > > > > > > > > > > > > > Regards, > > > > > > > > > > - Flemming > > > > > > > > > > > > > > > > > > > > --- In Robocode@..., "Edwin Pilobello" <e_pilobello@> > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > One of my students downloaded robocode and compiled TrackFire. It > > > > > > > > > > > seems normalRelativeAngle is now a separate util. Seems the utils were > > > > > > > > > > > not included in the dow2bnload. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
| Free embeddable forum powered by Nabble | Forum Help |