This week's book giveaways are in the AI and JavaScript forums.
We're giving away four copies each of GANs in Action and WebAssembly in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

run application with MySql - driver problem

 
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 ]
 
Bartender
Posts: 10336
Hibernate Eclipse IDE 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???
 
If you open the box, you will find Heisenberg strangling Shrodenger's cat. And waving this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!