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:
In run configuration
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.