This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes How to add ojdbc.jar to my classpath? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to add ojdbc.jar to my classpath?" Watch "How to add ojdbc.jar to my classpath?" New topic
Author

How to add ojdbc.jar to my classpath?

Kunal Lakhani
Ranch Hand

Joined: Jun 05, 2010
Posts: 622
I have written a simple jdbc application to insert a record in database.

Before compiling, i need to add ojdbc.jar to my classpath.

How to do that?


On doing this, C:\oracle\product\10.2.0\db_1\jdbc\lib\ojdbc14.jar, it shows an error dialgue box stating,
Failed to load Main-Class manifest attribute from C:\oracle\product\10.2.0\db_1\jdbc\lib\ojdbc14.jar


kunal
mallikarjun dontamsetti
Ranch Hand

Joined: Mar 18, 2011
Posts: 243

Place it under "lib" folder in WEB-INF folder (ojdbc14) if there is any other jar files also recompile it
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3817

Kunal Lakhani wrote:Before compiling...

Few things you should mention here.
1. How do you compile, using a build script or just from the direct "javac" command?
2. What kind of application is this, web/desktop etc...?


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to add ojdbc.jar to my classpath?
 
Similar Threads
Installed Oracle 10g in my Local system and now I am having problem connecting to it
Connecting to an Oracle DB
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
java.sql.SQLException: No suitable driver
Java to Display Data from Database