Ok, i have read alot about this bugs now, and nothing seems to help. Hope someone have a step by step solution for me, or atleast can give me some more insight hehe ;)
Here is a few intel on my work.
Im working in netbeans on my labtop, uploading the .java files to an linux server, compiling, and running there.
.java and .class files are in same directory.
i have tried writing :
java -classpath . home/.../../../Main/Main
java -classpath . home/.../../../Main/Main.class
Here is my Error messages:
dana@scylla:~/public_html/andersApplet/Main$ java Main.class
Exception in thread "main" java.lang.NoClassDefFoundError: Main/class
Caused by: java.lang.ClassNotFoundException: Main.class
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Could not find the main class: Main.class. Program will exit.
Here is my Code:
/**
*
* @author AndersM
*/
public class Main {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Board board = new Board();
board.testthis();
}
}