This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes JDBC and the fly likes run application with MySql  - driver problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Bookmark "run application with MySql  - driver problem" Watch "run application with MySql  - driver problem" New topic
Author

run application with MySql - driver problem

Peter Primrose
Ranch Hand

Joined: Sep 10, 2004
Posts: 755
Hi everyone,

I'm using eclipse as my IDE and when compiling and running a program with MySql evreything works perfect.

when I export my project to a jar file and trying to run it from the command line I get error msgs - I take it the MySql driver cannot be found.

I'm doing this:
java -cp mysql-connector-java.jar;GTP.jar com.bonn.main.GTP

can someone tell me what's missing?

thanks
Ppr
[ March 03, 2005: Message edited by: Bear Bibeault ]
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


I get error msgs - I take it the MySql driver cannot be found.

Possibly - a "it works in environment X, but not environment Y" problem is usually the classpath. Read the error message - it should tell you what it can't find. Then check the class is in one of the Jars you have listed in the classpath. If you are still stuck - post the stack trace you see and hopefully someone can point you in the right direction.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Peter Primrose
Ranch Hand

Joined: Sep 10, 2004
Posts: 755
the message i get is:

com.mysql.jdbc.Driver

Do I need to specify somthing at the Enviroment Veriable???
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: run application with MySql - driver problem