Skip to content

Instantly share code, notes, and snippets.

@ottomata
Created June 12, 2012 19:53
Show Gist options
  • Save ottomata/2919754 to your computer and use it in GitHub Desktop.
Save ottomata/2919754 to your computer and use it in GitHub Desktop.
public class TestMain {
public static void main(String[] args) {
System.out.println("ohboy!");
}
}
root@wmvm:~/# javac TestMain.java root@wmvm:~/analyzer# java TestMain.class
Exception in thread "main" java.lang.NoClassDefFoundError: TestMain/class
Caused by: java.lang.ClassNotFoundException: TestMain.class
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: TestMain.class. Program will exit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment