This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JDBC and the fly likes How to load the db driver from jar file? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "How to load the db driver from jar file?" Watch "How to load the db driver from jar file?" New topic
Author

How to load the db driver from jar file?

Kay Tracid
Ranch Hand

Joined: Mar 06, 2002
Posts: 148
Hi,
I have to connect to a mysql database. I want to load the driver from a jar file, because I want to use java web start.
Is that possible?
Thanks!
L Goundalkar
Ranch Hand

Joined: Jul 05, 2001
Posts: 395
Hi,
If I am right, then put the path of the jar in file in your classpath and try loading the driver class from your application.


<b>L G Goundalkar</b><br /> <a href="mailto:lggoundalkar@yahoo.com" rel="nofollow">lggoundalkar@yahoo.com</a> <br />Sun Certified Programmer for Java 2 Platform.<br />Sun Certified Web Component Developer for J2EE.
Kay Tracid
Ranch Hand

Joined: Mar 06, 2002
Posts: 148
Thanks, but...
That will not work, because I cant change the classpath on the client and at runtime.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to load the db driver from jar file?
 
Similar Threads
loading JDBC driver from a Jar (not in classpath)
I can't start Tomcat properly
jpa problems
example of struts + hibernate : jdbc example
Tomcat and MySQL JDBC Pooling