Home » Newcomers » Newcomers » compiling on command-line
compiling on command-line [message #979206] |
Sat, 10 November 2012 13:28  |
Eclipse User |
|
|
|
I copied code from the internet, source attached, in to Eclipse
Compiling, and running went OK
But from command-prompt it failed:
O:\temp>echo %CLASSPATH%
o:\temp\mysql-connector-java-5.1.20-bin.jar;c:\Program Files\Java\jre6\lib
O:\temp>javac AllTableName.java
O:\temp>java AllTableName
Exception in thread "main" java.lang.NoClassDefFoundError: AllTableName
Caused by: java.lang.ClassNotFoundException: AllTableName
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: AllTableName. Program will exit.
O:\temp>java -version
java version "1.6.0_30"
Java(TM) SE Runtime Environment (build 1.6.0_30-b12)
Java HotSpot(TM) 64-Bit Server VM (build 20.5-b03, mixed mode)
O:\temp>
What am i doing wrong here?
|
|
| | | | | | | | | | | | | | | | | | | | | | | |
Goto Forum:
Current Time: Sun May 11 05:23:20 EDT 2025
Powered by FUDForum. Page generated in 0.13719 seconds
|