Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding Oracle's classes12.zip (JDBC driver)

Status
Not open for further replies.

SandraStone

Technical User
Feb 9, 2005
2
NO
Hi, I've got some newbie questions:

I've made a new project, and copied all of my java source files into the project catalog. This makes them visible under the node "Project Source" (or else i'm not able to compile my java files)

Question 1 - not a very important one, but still: Shouldn't i be able to compile them without copying them into this catalog?

Question 2 - This next question is an important one: My java program imports the Oracle JDBC driver (oracle.jdbc.*)
which can be found in the classes12.zip file. I have right-clicked the node, chosen "Add packages/classes..." and the classes12.zip is now visible as a node below the project node. However, this doesn't help: Whenever i try to compile my project, i get the error messages that the package oracle.jdbc does not exist. Why, when I've added the zip file as a node to the project?

- Sandra
 
For Question 2:-
You need to add the jdbc driver as a library to your project.

Go into the Project menu and click Project Properties.
On the 'Paths' option select the 'Required Libraries' tab on the right-hand-side panel.
Click the Add button and in the smaller dialog that pops-up, choose New and setup a library reference for you JDBC zip file.
Click OK buttons to get back to the Project Properties and you should see a new entry for your library.
JBuilder should now be able to find the driver classes.

As for Question 1, your supposed to put your source files under the 'src' folder in your project directory.

Tim
 
Thanks a lot, Tim.

I found that I could setup the library reference by choosing Tools>Configure Libraries and then New. And then i did as you say. It works now, perfect! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top