Hi everyone,
I tried to execute some java programs ( QShell ). Obviously a highly complicated task o.0.
To keep things simple i started with a hello world program and I am aware that the HelloWorld program needs to be called without .class suffix and that the name is case sensetive.
When I call this program which is stored in a subfolder I get the following error message:
My command to start the HelloWorld is this one:
If I change in to the subdirectory (/avs) i can finally execute the HelloWorld program (what took me some time to figure out....). So I am doing something wrong by telling the java engine where the class file is.... I tried it with backslashes, double backslashes.....no change
How do I have to type in the command to start a java programm in a subfolder or am I forced to "cd ..." everytime I want to execute a java program (not really, or?)
I tried to execute some java programs ( QShell ). Obviously a highly complicated task o.0.
To keep things simple i started with a hello world program and I am aware that the HelloWorld program needs to be called without .class suffix and that the name is case sensetive.
When I call this program which is stored in a subfolder I get the following error message:
Code:
Exception in thread "main" java.lang.NoClassDefFoundError: .avs.HelloWorld (wrong name: HelloWorld) at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:266) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151) at java.net.URLClassLoader.defineClass(URLClassLoader.java:600) at java.net.URLClassLoader.access$400(URLClassLoader.java:124) at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:1055) at java.security.AccessController.doPrivileged(AccessController.java:274) at java.net.URLClassLoader.findClass(URLClassLoader.java:492) at java.lang.ClassLoader.loadClass(ClassLoader.java:639) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) at java.lang.ClassLoader.loadClass(ClassLoader.java:605)
Code:
java /avs/HelloWorld
How do I have to type in the command to start a java programm in a subfolder or am I forced to "cd ..." everytime I want to execute a java program (not really, or?)
Comment