Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

run application with MySql - driver problem

 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the message i get is:

com.mysql.jdbc.Driver

Do I need to specify somthing at the Enviroment Veriable???
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic