I am working on my GUI application in Eclipse IDE. When I am trying to run it, the following error message is thrown:
Java Virtual Machine Launcher - Could not find the main class:org.cnstar.wiki.app.GreatPlaces.Program will exit.
Update: here is how my main method looks like:
public static void main(String[] args) {
NativeInterface.open();
SwingUtilities.invokeLater(new Runnable() {
public void run() {
try {
// loading the Splash Panel
SplashPanel panel = new SplashPanel();
SplashManager manager = new SplashManager(panel);
panel.setMessage("Initializing...");
manager.repaint();
for (int i = 0; i < 100; i++) {
panel.setProgress(i);
manager.repaint();
try {
Thread.sleep(100);
}
catch (Exception e) {
}
}
manager.closeSplash();
start_application();
} catch (Exception e) {
e.printStackTrace();
}
}
});
NativeInterface.runEventPump();
}
And the methods connected to main method:
private static void start_application() {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
try {
//UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
GreatPlaces window = new GreatPlaces(true, true);
window.frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
public GreatPlaces(final boolean fullscreen, boolean showSplashScreen) {
LocaleHandler.setLocale(); // will set the application language based to the local language of the machine
initialize(fullscreen, showSplashScreen);
setViewLayout();
installAction();
}
PROBLEM FOUND: I have just reinstalled my JRE, make clean to my project and it suddenly started to work! Thanks all for help!