I believe this is common problem that has been answered, but I was unable to find anything real clear in the forums. I have been using TextPad to do all my coding and thought I would try eclipse. However, when I run the exact same app that works just fine through the command line with Eclipse I get the following error:
Being new to eclipse, I am assuming I have to add the JDBC connection information to the project, but have no idea what I am doing wrong. I did the project->properties->libraries->add class folder, which i select the said oracle folder for DriverManager.registerDriver(new oracle.rdb.jdbc.rdbThin.Driver());
folder stucture is like so:
oracle\rdb\jdbc - rdbThin (Driver() is in here) - common - util
Joe [ December 19, 2005: Message edited by: Joe Schider ]
SCJP, SCJD(In Progress)<br /> <br />"They whom make no mistakes usually make nothing at all."
Do you have to use a jar or can you add folders also? After playing with it a bit, I was able to get it to work with a jar, but the jar is just the folder structure compressed. If there is a way to add folders containing the needed classes I would like to know.
You add directories using the "Add Class Folder" button on the project build libraries page.
However, it looks like you're attempting to work with an exploded copy of the oracle driver jar. Why not just include ojdb14.jar or classes12.jar as library jars for the project?
An IDE is no substitute for an Intelligent Developer.
Joined: Dec 09, 2005
Well I don't have to add the folders, and I know the benefits of jar, but I was just trying to see if the situation required that I could just add the class folders and jar the whole project and then just update the main-class in the manifest. This would give me a self contained executable that I could send to my non-tech internal customers. If you have a better way, possibly a a jar of jars, I would like to hear about it.
But be careful - as far as I know, redistributing the oracle jar file actually is illegal - and repackaging it probably doubly so.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Joined: Dec 09, 2005
Thanks for the link. Very interesting. As far as illegal activity, when I say
send to my non-tech internal customers
, I was just 'trying' to say co-workers (all of whom have oracle on their PC's) in a fancy way. So, I hope that doesn't call for more Sheriff activity.
Joe [ December 22, 2005: Message edited by: Joe Schider ]