Hi I need to do a console application with netbeans. Is there a way how I can run it from cmd, then, in order to get that black window (sort of like an exe of c#)?
10x
Printable View
Hi I need to do a console application with netbeans. Is there a way how I can run it from cmd, then, in order to get that black window (sort of like an exe of c#)?
10x
I am trying to run just a simple helloworld from cmd and I am getting this error:
C:\Program Files\Java\jdk1.6.0_11\bin>java Main
Exception in thread "main" java.lang.NoClassDefFoundError: Main
Caused by: java.lang.ClassNotFoundException: Main
at java.net.URLClassLoader$1.run(URLClassLoader.java: 200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 07)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 52)
at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:320)
Could not find the main class: Main. Program will exit.
Can someone help me out pls?
try java -jar "your jar filename"! it works for me in bash shell on linux!