compilation - Java NoClassDefFoundError can't compile -


i have problem java. after compile main class main.java, command javac main.java use command

java main 

in same directory main.class located, , see error message:

exception in thread "main" java.lang.noclassdeffounderror: main (wrong name: main/main) @ java.lang.classloader.defineclass1(native method) @ java.lang.classloader.defineclass(classloader.java:788) @ java.security.secureclassloader.defineclass(secureclassloader.java:142) @ java.net.urlclassloader.defineclass(urlclassloader.java:447) @ java.net.urlclassloader.access$100(urlclassloader.java:71) @ java.net.urlclassloader$1.run(urlclassloader.java:361) @ java.net.urlclassloader$1.run(urlclassloader.java:355) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(urlclassloader.java:354) @ java.lang.classloader.loadclass(classloader.java:424) @ sun.misc.launcher$appclassloader.loadclass(launcher.java:308) @ java.lang.classloader.loadclass(classloader.java:357) @ sun.launcher.launcherhelper.checkandloadmain(launcherhelper.java:482) 

can me?

it looks have created class in package main. need use following command run program:

java main.main 

Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -