wood burning stoves 2.0*
The moose likes JDBC and the fly likes Setting up a JDBC connection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Setting up a JDBC connection" Watch "Setting up a JDBC connection" New topic
Author

Setting up a JDBC connection

Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 421
Hello toda I received these instructions:

See attached zip file. Expand, connect to VPN and test as follows:

>javac -cp .;lib\ojdbc14 ATTTestDB.java
>java -cp .;lib\ojdbc14 ATTTestDB


I did execute:


and received these errors:




what am I doing wrong?

I did put the contents of the zip file containing the lib folder and the classes in the Java directory. Did I do the right thing?

Thanks,
Midani

Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3838

Seems couple of things are wrong here. First error tells you that the ATTTestDB class is not in your classpath. Where is this class located?
The last two tell you that "javac" is not recognized which might be that you have not set the PATH environment variable for the bin directory of the JDK installation? Do you have the source of this file to try compiling?
And don't put your/third party class files (or anything for that matter) inside JDK installation; use another directory inside your home directory.

SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 421
thanks for your response, but I have a question. What is meant by the home directory?

thank you so much!!
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3838

What is meant by the home directory?

It's the user's home directory where he has all his work. In Linux this is at /home/<username>/.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Setting up a JDBC connection