wood burning stoves 2.0*
The moose likes JDBC and the fly likes Configuring an IDE w/2 JDBC Drivers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Configuring an IDE w/2 JDBC Drivers" Watch "Configuring an IDE w/2 JDBC Drivers" New topic
Author

Configuring an IDE w/2 JDBC Drivers

Dale DeMott
Ranch Hand

Joined: Nov 02, 2000
Posts: 515
I'm working w/Eclipse and currently have in my "RUN" config [under the argument tab] the following line.

-Djdbc.drivers=oracle.jdbc.OracleDriver

This is great if I want to only run 1 database. I have 2 that I need to use. Does anyone know how I can cofigure my eclipse to accept 2 jdbc drivers for 2 databases?

TIA


By failing to prepare, you are preparing to fail.<br />Benjamin Franklin (1706 - 1790)
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3697
    
    5

I believe the command line option you list is more of a convenience option than a requirement. You can leave it off altogether, add both jars to the classpath, and then in the code registrar which jdbc driver you want to use during runtime.


My Blog: Down Home Country Coding with Scott Selikoff
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

That will work, assuming there is a driver for that url in your classpath.
[ January 18, 2007: Message edited by: Paul Sturrock ]

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Dale DeMott
Ranch Hand

Joined: Nov 02, 2000
Posts: 515
Here's what I'm trying...


Here's the method...



The problem is that the class that I'm registering does NOT extend the Driver class that the driver manager wants it cast to.

Any suggestions?...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Configuring an IDE w/2 JDBC Drivers
 
Similar Threads
what are the steps to run the andriod appl on my mobile phone
Alternative ways of installing Struts
Example drivers for all the 4 types of JDBC Drivers
java db on a mac-getting started
AS400 Class not found exception