I started to code robocode with eclipse. But whenever i run the program from eclipse it gives error,
Error: Main method not found in class robo_first.robo_new, please define the main method as: public static void main(String[] args) or a JavaFX application class must extend javafx.application.Application
Things i have done:
- I added robocode.jar as a reference library
In run configuration
- VM arguments -Xmx512M -Dsun.io.useCanonCaches=false
- Working directory other - /home/sameera/robocode
- project - robo_first
- Main class - robo_first.robo_new
What's wrong with this? Are there anything else that I should do?
package robo_first;
import robocode.Robot;
public class robo_new extends Robot{
@Override
public void run() {
while(true){
turnGunRight(360);
ahead(100);
}
}
}
I ran above code in Robocode directly, by setting preference/development options and adding eclipse workspace/project/bin.. and it works..!!!
I'm using eclipse luna, ubuntu 14.04 and robocode 1.9.2.4