Re: Can not find driver

metastable <[email protected]> Tue, 19 May 2009 15:36:59 +0200
Newsgroups gmane.comp.db.mysql.java
Message-ID <[email protected]>
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

-- 
MySQL Java Mailing List
For list archives: http://lists.mysql.com/java
To unsubscribe:    http://lists.mysql.com/[email protected]