eclipse - Java Virtual Machine Launcher - could not find the main class -


this question has answer here:

i working on gui application in eclipse ide. when trying run it, following error message thrown:

java virtual machine launcher - not find main class:org.cnstar.wiki.app.greatplaces.program exit.


update: here how main method looks like:

public static void main(string[] args) {         nativeinterface.open();           swingutilities.invokelater(new runnable() {             public void run() {                 try {                     // loading splash panel                     splashpanel panel = new splashpanel();                     splashmanager manager = new splashmanager(panel);                     panel.setmessage("initializing...");                     manager.repaint();                     (int = 0; < 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 methods connected 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(); // set application language based local language of machine          initialize(fullscreen, showsplashscreen);          setviewlayout();          installaction();     } 

problem found: have reinstalled jre, make clean project , started work! help!

check .project file in eclipse work space has following

<buildspec>     <buildcommand>         <name>org.eclipse.jdt.core.javabuilder</name>         <arguments>         </arguments>     </buildcommand> </buildspec> <natures>     <nature>org.eclipse.jdt.core.javanature</nature> </natures> 

or check ouput folder compiled java class in eclipse correct

java build path --> source -->default output folder


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -