Possible Duplicate:
Error: Could not find or load main class
ive been working on some game code for a few hours now and it worked perfectly fine before, but then my eclipse decided to corrupt some stuff, I recovered it fully and it works perfectly in eclipse but when I try to run it via CMD or just as an Executable JAR I get Cannot find or load main class ERROR. Here is the current main method I have.
public Game() {
setMinimumSize(new Dimension(WIDTH * 2, HEIGHT * 2));
setMaximumSize(new Dimension(WIDTH * 2, HEIGHT * 2));
setPreferredSize(new Dimension(WIDTH * 2, HEIGHT * 2));
frame = new JFrame(NAME);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setLayout(new BorderLayout());
frame.add(this, BorderLayout.CENTER);
frame.pack();
frame.setResizable(false);
frame.setLocationRelativeTo(null);
frame.setVisible(true);
frame.setIconImage(Icon);
}
private boolean running = false;
public InputHandler Inputs = new InputHandler(this);
public static void main(String[] args) {
System.out.println("Starting");
Game g = new Game();
g.Start();
}
public void Start() {
running = true;
new Thread(this).start();
}
private static final int MapHeight = 40;
public void Stop() {
running = false;
}
Im using windows 7 and JAVA 7. Hope I can get some help.