Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » how do i compile on the command prompt?
how do i compile on the command prompt? [message #979150] Sat, 10 November 2012 17:24 Go to next message
Luuk 34 is currently offline Luuk 34
Messages: 12
Registered: November 2012
Junior Member
I copied some source from an example on the internet. Embarrassed
It's some code to list all tablenames in a database.
(source attached to this message)

When i copy and paste the code in Eclipse, the code runs OK (after directing the CLASSPATH, so its able to find the jdbc connector )

But when i go to the command-prompt on my Windows7 machine, and type:
Quote:
C:\Users\Luuk\workspace\AllTableName\src>echo %CLASSPATH%
o:\temp\mysql-connector-java-5.1.20-bin.jar

C:\Users\Luuk\workspace\AllTableName\src>javac AllTableName.java

C:\Users\Luuk\workspace\AllTableName\src>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.

C:\Users\Luuk\workspace\AllTableName\src>dir o:\temp\mysql-connector-java-5.1.20-bin.jar
Volume in drive O is luuk
Volume Serial Number is 8557-B2CB

Directory of o:\temp

01-05-2012 19:53 802.721 mysql-connector-java-5.1.20-bin.jar
1 File(s) 802.721 bytes


What am i doing wrong here?
Re: how do i compile on the command prompt? [message #979734 is a reply to message #979150] Sun, 11 November 2012 05:05 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1341
Registered: July 2009
Senior Member
On 11/10/2012 07:09 PM, Luuk 34 wrote:
> I copied some source from an example on the internet. :blush:
> It's some code to list all tablenames in a database.
> (source attached to this message)
>
> When i copy and paste the code in Eclipse, the code runs OK (after directing the CLASSPATH, so its able to find the jdbc connector )
>
> But when i go to the command-prompt on my Windows7 machine, and type:
> Quote:
>> C:\Users\Luuk\workspace\AllTableName\src>echo %CLASSPATH%
>> o:\temp\mysql-connector-java-5.1.20-bin.jar
>>
>> C:\Users\Luuk\workspace\AllTableName\src>javac AllTableName.java
>>
>> C:\Users\Luuk\workspace\AllTableName\src>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.
>>
>> C:\Users\Luuk\workspace\AllTableName\src>dir o:\temp\mysql-connector-java-5.1.20-bin.jar
>> Volume in drive O is luuk
>> Volume Serial Number is 8557-B2CB
>>
>> Directory of o:\temp
>>
>> 01-05-2012 19:53 802.721 mysql-connector-java-5.1.20-bin.jar
>> 1 File(s) 802.721 bytes
>
>
> What am i doing wrong here?
>
Please don't double post to different news groups. Your question has
been answered in the Newcomer forum.
Re: how do i compile on the command prompt? [message #979741 is a reply to message #979150] Sun, 11 November 2012 05:05 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1341
Registered: July 2009
Senior Member
On 11/10/2012 07:09 PM, Luuk 34 wrote:
> I copied some source from an example on the internet. :blush:
> It's some code to list all tablenames in a database.
> (source attached to this message)
>
> When i copy and paste the code in Eclipse, the code runs OK (after directing the CLASSPATH, so its able to find the jdbc connector )
>
> But when i go to the command-prompt on my Windows7 machine, and type:
> Quote:
>> C:\Users\Luuk\workspace\AllTableName\src>echo %CLASSPATH%
>> o:\temp\mysql-connector-java-5.1.20-bin.jar
>>
>> C:\Users\Luuk\workspace\AllTableName\src>javac AllTableName.java
>>
>> C:\Users\Luuk\workspace\AllTableName\src>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.
>>
>> C:\Users\Luuk\workspace\AllTableName\src>dir o:\temp\mysql-connector-java-5.1.20-bin.jar
>> Volume in drive O is luuk
>> Volume Serial Number is 8557-B2CB
>>
>> Directory of o:\temp
>>
>> 01-05-2012 19:53 802.721 mysql-connector-java-5.1.20-bin.jar
>> 1 File(s) 802.721 bytes
>
>
> What am i doing wrong here?
>
Please don't double post to different news groups. Your question has
been answered in the Newcomer forum.
Re: how do i compile on the command prompt? [message #979748 is a reply to message #979150] Sun, 11 November 2012 05:05 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1341
Registered: July 2009
Senior Member
On 11/10/2012 07:09 PM, Luuk 34 wrote:
> I copied some source from an example on the internet. :blush:
> It's some code to list all tablenames in a database.
> (source attached to this message)
>
> When i copy and paste the code in Eclipse, the code runs OK (after directing the CLASSPATH, so its able to find the jdbc connector )
>
> But when i go to the command-prompt on my Windows7 machine, and type:
> Quote:
>> C:\Users\Luuk\workspace\AllTableName\src>echo %CLASSPATH%
>> o:\temp\mysql-connector-java-5.1.20-bin.jar
>>
>> C:\Users\Luuk\workspace\AllTableName\src>javac AllTableName.java
>>
>> C:\Users\Luuk\workspace\AllTableName\src>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.
>>
>> C:\Users\Luuk\workspace\AllTableName\src>dir o:\temp\mysql-connector-java-5.1.20-bin.jar
>> Volume in drive O is luuk
>> Volume Serial Number is 8557-B2CB
>>
>> Directory of o:\temp
>>
>> 01-05-2012 19:53 802.721 mysql-connector-java-5.1.20-bin.jar
>> 1 File(s) 802.721 bytes
>
>
> What am i doing wrong here?
>
Please don't double post to different news groups. Your question has
been answered in the Newcomer forum.
Re: how do i compile on the command prompt? [message #979756 is a reply to message #979150] Sun, 11 November 2012 05:05 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1341
Registered: July 2009
Senior Member
On 11/10/2012 07:09 PM, Luuk 34 wrote:
> I copied some source from an example on the internet. :blush:
> It's some code to list all tablenames in a database.
> (source attached to this message)
>
> When i copy and paste the code in Eclipse, the code runs OK (after directing the CLASSPATH, so its able to find the jdbc connector )
>
> But when i go to the command-prompt on my Windows7 machine, and type:
> Quote:
>> C:\Users\Luuk\workspace\AllTableName\src>echo %CLASSPATH%
>> o:\temp\mysql-connector-java-5.1.20-bin.jar
>>
>> C:\Users\Luuk\workspace\AllTableName\src>javac AllTableName.java
>>
>> C:\Users\Luuk\workspace\AllTableName\src>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.
>>
>> C:\Users\Luuk\workspace\AllTableName\src>dir o:\temp\mysql-connector-java-5.1.20-bin.jar
>> Volume in drive O is luuk
>> Volume Serial Number is 8557-B2CB
>>
>> Directory of o:\temp
>>
>> 01-05-2012 19:53 802.721 mysql-connector-java-5.1.20-bin.jar
>> 1 File(s) 802.721 bytes
>
>
> What am i doing wrong here?
>
Please don't double post to different news groups. Your question has
been answered in the Newcomer forum.
Re: how do i compile on the command prompt? [message #979764 is a reply to message #979150] Sun, 11 November 2012 05:05 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1341
Registered: July 2009
Senior Member
On 11/10/2012 07:09 PM, Luuk 34 wrote:
> I copied some source from an example on the internet. :blush:
> It's some code to list all tablenames in a database.
> (source attached to this message)
>
> When i copy and paste the code in Eclipse, the code runs OK (after directing the CLASSPATH, so its able to find the jdbc connector )
>
> But when i go to the command-prompt on my Windows7 machine, and type:
> Quote:
>> C:\Users\Luuk\workspace\AllTableName\src>echo %CLASSPATH%
>> o:\temp\mysql-connector-java-5.1.20-bin.jar
>>
>> C:\Users\Luuk\workspace\AllTableName\src>javac AllTableName.java
>>
>> C:\Users\Luuk\workspace\AllTableName\src>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.
>>
>> C:\Users\Luuk\workspace\AllTableName\src>dir o:\temp\mysql-connector-java-5.1.20-bin.jar
>> Volume in drive O is luuk
>> Volume Serial Number is 8557-B2CB
>>
>> Directory of o:\temp
>>
>> 01-05-2012 19:53 802.721 mysql-connector-java-5.1.20-bin.jar
>> 1 File(s) 802.721 bytes
>
>
> What am i doing wrong here?
>
Please don't double post to different news groups. Your question has
been answered in the Newcomer forum.
Re: how do i compile on the command prompt? [message #979772 is a reply to message #979150] Sun, 11 November 2012 05:05 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1341
Registered: July 2009
Senior Member
On 11/10/2012 07:09 PM, Luuk 34 wrote:
> I copied some source from an example on the internet. :blush:
> It's some code to list all tablenames in a database.
> (source attached to this message)
>
> When i copy and paste the code in Eclipse, the code runs OK (after directing the CLASSPATH, so its able to find the jdbc connector )
>
> But when i go to the command-prompt on my Windows7 machine, and type:
> Quote:
>> C:\Users\Luuk\workspace\AllTableName\src>echo %CLASSPATH%
>> o:\temp\mysql-connector-java-5.1.20-bin.jar
>>
>> C:\Users\Luuk\workspace\AllTableName\src>javac AllTableName.java
>>
>> C:\Users\Luuk\workspace\AllTableName\src>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.
>>
>> C:\Users\Luuk\workspace\AllTableName\src>dir o:\temp\mysql-connector-java-5.1.20-bin.jar
>> Volume in drive O is luuk
>> Volume Serial Number is 8557-B2CB
>>
>> Directory of o:\temp
>>
>> 01-05-2012 19:53 802.721 mysql-connector-java-5.1.20-bin.jar
>> 1 File(s) 802.721 bytes
>
>
> What am i doing wrong here?
>
Please don't double post to different news groups. Your question has
been answered in the Newcomer forum.
Re: how do i compile on the command prompt? [message #979780 is a reply to message #979150] Sun, 11 November 2012 05:05 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1341
Registered: July 2009
Senior Member
On 11/10/2012 07:09 PM, Luuk 34 wrote:
> I copied some source from an example on the internet. :blush:
> It's some code to list all tablenames in a database.
> (source attached to this message)
>
> When i copy and paste the code in Eclipse, the code runs OK (after directing the CLASSPATH, so its able to find the jdbc connector )
>
> But when i go to the command-prompt on my Windows7 machine, and type:
> Quote:
>> C:\Users\Luuk\workspace\AllTableName\src>echo %CLASSPATH%
>> o:\temp\mysql-connector-java-5.1.20-bin.jar
>>
>> C:\Users\Luuk\workspace\AllTableName\src>javac AllTableName.java
>>
>> C:\Users\Luuk\workspace\AllTableName\src>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.
>>
>> C:\Users\Luuk\workspace\AllTableName\src>dir o:\temp\mysql-connector-java-5.1.20-bin.jar
>> Volume in drive O is luuk
>> Volume Serial Number is 8557-B2CB
>>
>> Directory of o:\temp
>>
>> 01-05-2012 19:53 802.721 mysql-connector-java-5.1.20-bin.jar
>> 1 File(s) 802.721 bytes
>
>
> What am i doing wrong here?
>
Please don't double post to different news groups. Your question has
been answered in the Newcomer forum.
Re: how do i compile on the command prompt? [message #979788 is a reply to message #979150] Sun, 11 November 2012 05:05 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1341
Registered: July 2009
Senior Member
On 11/10/2012 07:09 PM, Luuk 34 wrote:
> I copied some source from an example on the internet. :blush:
> It's some code to list all tablenames in a database.
> (source attached to this message)
>
> When i copy and paste the code in Eclipse, the code runs OK (after directing the CLASSPATH, so its able to find the jdbc connector )
>
> But when i go to the command-prompt on my Windows7 machine, and type:
> Quote:
>> C:\Users\Luuk\workspace\AllTableName\src>echo %CLASSPATH%
>> o:\temp\mysql-connector-java-5.1.20-bin.jar
>>
>> C:\Users\Luuk\workspace\AllTableName\src>javac AllTableName.java
>>
>> C:\Users\Luuk\workspace\AllTableName\src>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.
>>
>> C:\Users\Luuk\workspace\AllTableName\src>dir o:\temp\mysql-connector-java-5.1.20-bin.jar
>> Volume in drive O is luuk
>> Volume Serial Number is 8557-B2CB
>>
>> Directory of o:\temp
>>
>> 01-05-2012 19:53 802.721 mysql-connector-java-5.1.20-bin.jar
>> 1 File(s) 802.721 bytes
>
>
> What am i doing wrong here?
>
Please don't double post to different news groups. Your question has
been answered in the Newcomer forum.
Re: how do i compile on the command prompt? [message #979796 is a reply to message #979150] Sun, 11 November 2012 05:05 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1341
Registered: July 2009
Senior Member
On 11/10/2012 07:09 PM, Luuk 34 wrote:
> I copied some source from an example on the internet. :blush:
> It's some code to list all tablenames in a database.
> (source attached to this message)
>
> When i copy and paste the code in Eclipse, the code runs OK (after directing the CLASSPATH, so its able to find the jdbc connector )
>
> But when i go to the command-prompt on my Windows7 machine, and type:
> Quote:
>> C:\Users\Luuk\workspace\AllTableName\src>echo %CLASSPATH%
>> o:\temp\mysql-connector-java-5.1.20-bin.jar
>>
>> C:\Users\Luuk\workspace\AllTableName\src>javac AllTableName.java
>>
>> C:\Users\Luuk\workspace\AllTableName\src>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.
>>
>> C:\Users\Luuk\workspace\AllTableName\src>dir o:\temp\mysql-connector-java-5.1.20-bin.jar
>> Volume in drive O is luuk
>> Volume Serial Number is 8557-B2CB
>>
>> Directory of o:\temp
>>
>> 01-05-2012 19:53 802.721 mysql-connector-java-5.1.20-bin.jar
>> 1 File(s) 802.721 bytes
>
>
> What am i doing wrong here?
>
Please don't double post to different news groups. Your question has
been answered in the Newcomer forum.
Re: how do i compile on the command prompt? [message #979804 is a reply to message #979150] Sun, 11 November 2012 05:05 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1341
Registered: July 2009
Senior Member
On 11/10/2012 07:09 PM, Luuk 34 wrote:
> I copied some source from an example on the internet. :blush:
> It's some code to list all tablenames in a database.
> (source attached to this message)
>
> When i copy and paste the code in Eclipse, the code runs OK (after directing the CLASSPATH, so its able to find the jdbc connector )
>
> But when i go to the command-prompt on my Windows7 machine, and type:
> Quote:
>> C:\Users\Luuk\workspace\AllTableName\src>echo %CLASSPATH%
>> o:\temp\mysql-connector-java-5.1.20-bin.jar
>>
>> C:\Users\Luuk\workspace\AllTableName\src>javac AllTableName.java
>>
>> C:\Users\Luuk\workspace\AllTableName\src>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.
>>
>> C:\Users\Luuk\workspace\AllTableName\src>dir o:\temp\mysql-connector-java-5.1.20-bin.jar
>> Volume in drive O is luuk
>> Volume Serial Number is 8557-B2CB
>>
>> Directory of o:\temp
>>
>> 01-05-2012 19:53 802.721 mysql-connector-java-5.1.20-bin.jar
>> 1 File(s) 802.721 bytes
>
>
> What am i doing wrong here?
>
Please don't double post to different news groups. Your question has
been answered in the Newcomer forum.
Re: how do i compile on the command prompt? [message #979812 is a reply to message #979150] Sun, 11 November 2012 05:05 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1341
Registered: July 2009
Senior Member
On 11/10/2012 07:09 PM, Luuk 34 wrote:
> I copied some source from an example on the internet. :blush:
> It's some code to list all tablenames in a database.
> (source attached to this message)
>
> When i copy and paste the code in Eclipse, the code runs OK (after directing the CLASSPATH, so its able to find the jdbc connector )
>
> But when i go to the command-prompt on my Windows7 machine, and type:
> Quote:
>> C:\Users\Luuk\workspace\AllTableName\src>echo %CLASSPATH%
>> o:\temp\mysql-connector-java-5.1.20-bin.jar
>>
>> C:\Users\Luuk\workspace\AllTableName\src>javac AllTableName.java
>>
>> C:\Users\Luuk\workspace\AllTableName\src>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.
>>
>> C:\Users\Luuk\workspace\AllTableName\src>dir o:\temp\mysql-connector-java-5.1.20-bin.jar
>> Volume in drive O is luuk
>> Volume Serial Number is 8557-B2CB
>>
>> Directory of o:\temp
>>
>> 01-05-2012 19:53 802.721 mysql-connector-java-5.1.20-bin.jar
>> 1 File(s) 802.721 bytes
>
>
> What am i doing wrong here?
>
Please don't double post to different news groups. Your question has
been answered in the Newcomer forum.
Re: how do i compile on the command prompt? [message #979820 is a reply to message #979150] Sun, 11 November 2012 05:05 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1341
Registered: July 2009
Senior Member
On 11/10/2012 07:09 PM, Luuk 34 wrote:
> I copied some source from an example on the internet. :blush:
> It's some code to list all tablenames in a database.
> (source attached to this message)
>
> When i copy and paste the code in Eclipse, the code runs OK (after directing the CLASSPATH, so its able to find the jdbc connector )
>
> But when i go to the command-prompt on my Windows7 machine, and type:
> Quote:
>> C:\Users\Luuk\workspace\AllTableName\src>echo %CLASSPATH%
>> o:\temp\mysql-connector-java-5.1.20-bin.jar
>>
>> C:\Users\Luuk\workspace\AllTableName\src>javac AllTableName.java
>>
>> C:\Users\Luuk\workspace\AllTableName\src>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.
>>
>> C:\Users\Luuk\workspace\AllTableName\src>dir o:\temp\mysql-connector-java-5.1.20-bin.jar
>> Volume in drive O is luuk
>> Volume Serial Number is 8557-B2CB
>>
>> Directory of o:\temp
>>
>> 01-05-2012 19:53 802.721 mysql-connector-java-5.1.20-bin.jar
>> 1 File(s) 802.721 bytes
>
>
> What am i doing wrong here?
>
Please don't double post to different news groups. Your question has
been answered in the Newcomer forum.
Re: how do i compile on the command prompt? [message #979828 is a reply to message #979150] Sun, 11 November 2012 05:05 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1341
Registered: July 2009
Senior Member
On 11/10/2012 07:09 PM, Luuk 34 wrote:
> I copied some source from an example on the internet. :blush:
> It's some code to list all tablenames in a database.
> (source attached to this message)
>
> When i copy and paste the code in Eclipse, the code runs OK (after directing the CLASSPATH, so its able to find the jdbc connector )
>
> But when i go to the command-prompt on my Windows7 machine, and type:
> Quote:
>> C:\Users\Luuk\workspace\AllTableName\src>echo %CLASSPATH%
>> o:\temp\mysql-connector-java-5.1.20-bin.jar
>>
>> C:\Users\Luuk\workspace\AllTableName\src>javac AllTableName.java
>>
>> C:\Users\Luuk\workspace\AllTableName\src>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.
>>
>> C:\Users\Luuk\workspace\AllTableName\src>dir o:\temp\mysql-connector-java-5.1.20-bin.jar
>> Volume in drive O is luuk
>> Volume Serial Number is 8557-B2CB
>>
>> Directory of o:\temp
>>
>> 01-05-2012 19:53 802.721 mysql-connector-java-5.1.20-bin.jar
>> 1 File(s) 802.721 bytes
>
>
> What am i doing wrong here?
>
Please don't double post to different news groups. Your question has
been answered in the Newcomer forum.
Re: how do i compile on the command prompt? [message #979836 is a reply to message #979150] Sun, 11 November 2012 05:05 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1341
Registered: July 2009
Senior Member
On 11/10/2012 07:09 PM, Luuk 34 wrote:
> I copied some source from an example on the internet. :blush:
> It's some code to list all tablenames in a database.
> (source attached to this message)
>
> When i copy and paste the code in Eclipse, the code runs OK (after directing the CLASSPATH, so its able to find the jdbc connector )
>
> But when i go to the command-prompt on my Windows7 machine, and type:
> Quote:
>> C:\Users\Luuk\workspace\AllTableName\src>echo %CLASSPATH%
>> o:\temp\mysql-connector-java-5.1.20-bin.jar
>>
>> C:\Users\Luuk\workspace\AllTableName\src>javac AllTableName.java
>>
>> C:\Users\Luuk\workspace\AllTableName\src>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.
>>
>> C:\Users\Luuk\workspace\AllTableName\src>dir o:\temp\mysql-connector-java-5.1.20-bin.jar
>> Volume in drive O is luuk
>> Volume Serial Number is 8557-B2CB
>>
>> Directory of o:\temp
>>
>> 01-05-2012 19:53 802.721 mysql-connector-java-5.1.20-bin.jar
>> 1 File(s) 802.721 bytes
>
>
> What am i doing wrong here?
>
Please don't double post to different news groups. Your question has
been answered in the Newcomer forum.
Re: how do i compile on the command prompt? [message #979844 is a reply to message #979150] Sun, 11 November 2012 05:05 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1341
Registered: July 2009
Senior Member
On 11/10/2012 07:09 PM, Luuk 34 wrote:
> I copied some source from an example on the internet. :blush:
> It's some code to list all tablenames in a database.
> (source attached to this message)
>
> When i copy and paste the code in Eclipse, the code runs OK (after directing the CLASSPATH, so its able to find the jdbc connector )
>
> But when i go to the command-prompt on my Windows7 machine, and type:
> Quote:
>> C:\Users\Luuk\workspace\AllTableName\src>echo %CLASSPATH%
>> o:\temp\mysql-connector-java-5.1.20-bin.jar
>>
>> C:\Users\Luuk\workspace\AllTableName\src>javac AllTableName.java
>>
>> C:\Users\Luuk\workspace\AllTableName\src>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.
>>
>> C:\Users\Luuk\workspace\AllTableName\src>dir o:\temp\mysql-connector-java-5.1.20-bin.jar
>> Volume in drive O is luuk
>> Volume Serial Number is 8557-B2CB
>>
>> Directory of o:\temp
>>
>> 01-05-2012 19:53 802.721 mysql-connector-java-5.1.20-bin.jar
>> 1 File(s) 802.721 bytes
>
>
> What am i doing wrong here?
>
Please don't double post to different news groups. Your question has
been answered in the Newcomer forum.
Re: how do i compile on the command prompt? [message #979852 is a reply to message #979150] Sun, 11 November 2012 05:05 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1341
Registered: July 2009
Senior Member
On 11/10/2012 07:09 PM, Luuk 34 wrote:
> I copied some source from an example on the internet. :blush:
> It's some code to list all tablenames in a database.
> (source attached to this message)
>
> When i copy and paste the code in Eclipse, the code runs OK (after directing the CLASSPATH, so its able to find the jdbc connector )
>
> But when i go to the command-prompt on my Windows7 machine, and type:
> Quote:
>> C:\Users\Luuk\workspace\AllTableName\src>echo %CLASSPATH%
>> o:\temp\mysql-connector-java-5.1.20-bin.jar
>>
>> C:\Users\Luuk\workspace\AllTableName\src>javac AllTableName.java
>>
>> C:\Users\Luuk\workspace\AllTableName\src>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.
>>
>> C:\Users\Luuk\workspace\AllTableName\src>dir o:\temp\mysql-connector-java-5.1.20-bin.jar
>> Volume in drive O is luuk
>> Volume Serial Number is 8557-B2CB
>>
>> Directory of o:\temp
>>
>> 01-05-2012 19:53 802.721 mysql-connector-java-5.1.20-bin.jar
>> 1 File(s) 802.721 bytes
>
>
> What am i doing wrong here?
>
Please don't double post to different news groups. Your question has
been answered in the Newcomer forum.
Re: how do i compile on the command prompt? [message #979860 is a reply to message #979150] Sun, 11 November 2012 05:05 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1341
Registered: July 2009
Senior Member
On 11/10/2012 07:09 PM, Luuk 34 wrote:
> I copied some source from an example on the internet. :blush:
> It's some code to list all tablenames in a database.
> (source attached to this message)
>
> When i copy and paste the code in Eclipse, the code runs OK (after directing the CLASSPATH, so its able to find the jdbc connector )
>
> But when i go to the command-prompt on my Windows7 machine, and type:
> Quote:
>> C:\Users\Luuk\workspace\AllTableName\src>echo %CLASSPATH%
>> o:\temp\mysql-connector-java-5.1.20-bin.jar
>>
>> C:\Users\Luuk\workspace\AllTableName\src>javac AllTableName.java
>>
>> C:\Users\Luuk\workspace\AllTableName\src>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.
>>
>> C:\Users\Luuk\workspace\AllTableName\src>dir o:\temp\mysql-connector-java-5.1.20-bin.jar
>> Volume in drive O is luuk
>> Volume Serial Number is 8557-B2CB
>>
>> Directory of o:\temp
>>
>> 01-05-2012 19:53 802.721 mysql-connector-java-5.1.20-bin.jar
>> 1 File(s) 802.721 bytes
>
>
> What am i doing wrong here?
>
Please don't double post to different news groups. Your question has
been answered in the Newcomer forum.
Re: how do i compile on the command prompt? [message #979868 is a reply to message #979150] Sun, 11 November 2012 05:05 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1341
Registered: July 2009
Senior Member
On 11/10/2012 07:09 PM, Luuk 34 wrote:
> I copied some source from an example on the internet. :blush:
> It's some code to list all tablenames in a database.
> (source attached to this message)
>
> When i copy and paste the code in Eclipse, the code runs OK (after directing the CLASSPATH, so its able to find the jdbc connector )
>
> But when i go to the command-prompt on my Windows7 machine, and type:
> Quote:
>> C:\Users\Luuk\workspace\AllTableName\src>echo %CLASSPATH%
>> o:\temp\mysql-connector-java-5.1.20-bin.jar
>>
>> C:\Users\Luuk\workspace\AllTableName\src>javac AllTableName.java
>>
>> C:\Users\Luuk\workspace\AllTableName\src>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.
>>
>> C:\Users\Luuk\workspace\AllTableName\src>dir o:\temp\mysql-connector-java-5.1.20-bin.jar
>> Volume in drive O is luuk
>> Volume Serial Number is 8557-B2CB
>>
>> Directory of o:\temp
>>
>> 01-05-2012 19:53 802.721 mysql-connector-java-5.1.20-bin.jar
>> 1 File(s) 802.721 bytes
>
>
> What am i doing wrong here?
>
Please don't double post to different news groups. Your question has
been answered in the Newcomer forum.
Re: how do i compile on the command prompt? [message #979877 is a reply to message #979150] Sun, 11 November 2012 05:05 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1341
Registered: July 2009
Senior Member
On 11/10/2012 07:09 PM, Luuk 34 wrote:
> I copied some source from an example on the internet. :blush:
> It's some code to list all tablenames in a database.
> (source attached to this message)
>
> When i copy and paste the code in Eclipse, the code runs OK (after directing the CLASSPATH, so its able to find the jdbc connector )
>
> But when i go to the command-prompt on my Windows7 machine, and type:
> Quote:
>> C:\Users\Luuk\workspace\AllTableName\src>echo %CLASSPATH%
>> o:\temp\mysql-connector-java-5.1.20-bin.jar
>>
>> C:\Users\Luuk\workspace\AllTableName\src>javac AllTableName.java
>>
>> C:\Users\Luuk\workspace\AllTableName\src>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.
>>
>> C:\Users\Luuk\workspace\AllTableName\src>dir o:\temp\mysql-connector-java-5.1.20-bin.jar
>> Volume in drive O is luuk
>> Volume Serial Number is 8557-B2CB
>>
>> Directory of o:\temp
>>
>> 01-05-2012 19:53 802.721 mysql-connector-java-5.1.20-bin.jar
>> 1 File(s) 802.721 bytes
>
>
> What am i doing wrong here?
>
Please don't double post to different news groups. Your question has
been answered in the Newcomer forum.
Re: how do i compile on the command prompt? [message #979885 is a reply to message #979150] Sun, 11 November 2012 05:05 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1341
Registered: July 2009
Senior Member
On 11/10/2012 07:09 PM, Luuk 34 wrote:
> I copied some source from an example on the internet. :blush:
> It's some code to list all tablenames in a database.
> (source attached to this message)
>
> When i copy and paste the code in Eclipse, the code runs OK (after directing the CLASSPATH, so its able to find the jdbc connector )
>
> But when i go to the command-prompt on my Windows7 machine, and type:
> Quote:
>> C:\Users\Luuk\workspace\AllTableName\src>echo %CLASSPATH%
>> o:\temp\mysql-connector-java-5.1.20-bin.jar
>>
>> C:\Users\Luuk\workspace\AllTableName\src>javac AllTableName.java
>>
>> C:\Users\Luuk\workspace\AllTableName\src>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.
>>
>> C:\Users\Luuk\workspace\AllTableName\src>dir o:\temp\mysql-connector-java-5.1.20-bin.jar
>> Volume in drive O is luuk
>> Volume Serial Number is 8557-B2CB
>>
>> Directory of o:\temp
>>
>> 01-05-2012 19:53 802.721 mysql-connector-java-5.1.20-bin.jar
>> 1 File(s) 802.721 bytes
>
>
> What am i doing wrong here?
>
Please don't double post to different news groups. Your question has
been answered in the Newcomer forum.
Re: how do i compile on the command prompt? [message #979893 is a reply to message #979150] Sun, 11 November 2012 05:05 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1341
Registered: July 2009
Senior Member
On 11/10/2012 07:09 PM, Luuk 34 wrote:
> I copied some source from an example on the internet. :blush:
> It's some code to list all tablenames in a database.
> (source attached to this message)
>
> When i copy and paste the code in Eclipse, the code runs OK (after directing the CLASSPATH, so its able to find the jdbc connector )
>
> But when i go to the command-prompt on my Windows7 machine, and type:
> Quote:
>> C:\Users\Luuk\workspace\AllTableName\src>echo %CLASSPATH%
>> o:\temp\mysql-connector-java-5.1.20-bin.jar
>>
>> C:\Users\Luuk\workspace\AllTableName\src>javac AllTableName.java
>>
>> C:\Users\Luuk\workspace\AllTableName\src>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.
>>
>> C:\Users\Luuk\workspace\AllTableName\src>dir o:\temp\mysql-connector-java-5.1.20-bin.jar
>> Volume in drive O is luuk
>> Volume Serial Number is 8557-B2CB
>>
>> Directory of o:\temp
>>
>> 01-05-2012 19:53 802.721 mysql-connector-java-5.1.20-bin.jar
>> 1 File(s) 802.721 bytes
>
>
> What am i doing wrong here?
>
Please don't double post to different news groups. Your question has
been answered in the Newcomer forum.
Re: how do i compile on the command prompt? [message #980253 is a reply to message #979734] Sun, 11 November 2012 13:49 Go to previous message
Luuk 34 is currently offline Luuk 34
Messages: 12
Registered: November 2012
Junior Member
ok, sorry for posting in wrong group... Wink
Previous Topic:Adding a launch configuration tab to a CDT launch
Next Topic:Dynamic source code coloring
Goto Forum:
  


Current Time: Sun Sep 21 10:21:07 GMT 2014

Powered by FUDForum. Page generated in 0.06890 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software