List:MySQL and Java« Previous MessageNext Message »
From:metastable Date:May 19 2009 1:36pm
Subject:Re: Can not find driver
View as plain text  
Sander van Tuijn wrote:
> Hello,
>
> I am working on a program connected to a mysql database. When I test the prgram in
> eclips everything works fine. But when I make a exuctable jar and want to run the program
> uotside elcips I get teh message. "can not load the driver".
> Can anyone tell me what to do?
>
> Kind regards,
>
>
> Sander.
>   
Eclipse loads the jdbc driver from the project classpath. When you run
the jar outside of eclipse, you have to provide java with the classpath
that contains the jdbc driver jar.

java -cp ".:/your/jdbc/jar/location" yourmainclass

HTH,

Stijn Verholen
Thread
Can not find driverSander van Tuijn19 May
  • Re: Can not find drivermetastable19 May