Results 1 to 2 of 2
- 04-05-2008, 08:28 PM #1
Member
- Join Date
- Mar 2008
- Posts
- 4
- Rep Power
- 0
Setting up class path for Eclipse
Hello,
I am a newbie at Java programing and am not able to use JDBC to connect to an Oracle database.
I've read some threads for people who had this same issue (import oracle.jdbc.driver.OracleDriver; --ClassNotFound) and copied the file $ORACLE_HOME/jdbc/lib/classes12.zip to /usr/local/jdk1.5/jre/lib, but no success. So I wonder how should I get this to work. Programming on Java with Oracle database access is my major goal, so I'd appreciate every help.
I use Eclipse IDE running on Kubuntu 7.10 - Oracle 10G R2.
- 04-07-2008, 07:05 PM #2
Member
- Join Date
- Mar 2008
- Posts
- 4
- Rep Power
- 0
I found this out....
Under the projects Dir there is a hidden XML file called .classpath, so I added the ones in bold to the file:
And now it works. I have no read this in any other forum nor book, tutorial. I simply tried.<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="/opt/oracle/product/10gR2/jdbc/lib/classes12.jar"/>
<classpathentry kind="lib" path="/opt/oracle/product/10gR2/jdbc/lib/classes12_g.jar"/>
<classpathentry kind="lib" path="/opt/oracle/product/10gR2/jdbc/lib/ojdbc14.jar"/>
<classpathentry kind="lib" path="/opt/oracle/product/10gR2/jdbc/lib/ojdbc14_g.jar"/>
<classpathentry kind="lib" path="/opt/oracle/product/10gR2/jdbc/lib/classes12dms.jar"/>
<classpathentry kind="lib" path="/opt/oracle/product/10gR2/jdbc/lib/classes12dms_g.jar"/>
<classpathentry kind="lib" path="/opt/oracle/product/10gR2/jdbc/lib/classes111.jar"/>
<classpathentry kind="lib" path="/opt/oracle/product/10gR2/jdbc/lib/classes111_g.jar"/>
<classpathentry kind="lib" path="/opt/oracle/product/10gR2/jdbc/lib/nls_charset11.jar"/>
<classpathentry kind="lib" path="/opt/oracle/product/10gR2/jdbc/lib/nls_charset12.jar"/>
<classpathentry kind="lib" path="/opt/oracle/product/10gR2/jdbc/lib/ocrs12.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Thank you.
Similar Threads
-
trying to get class name & path
By sandor in forum New To JavaReplies: 4Last Post: 08-12-2008, 01:38 PM -
.class fille needed from eclipse
By perplexingtrax in forum New To JavaReplies: 4Last Post: 03-27-2008, 05:36 PM -
Log4J.jar in class path
By eva in forum New To JavaReplies: 0Last Post: 01-02-2008, 06:39 PM -
Renaming a class in Eclipse
By Java Tip in forum Java TipReplies: 0Last Post: 12-04-2007, 10:54 AM -
Setting Java Path
By bugger in forum New To JavaReplies: 2Last Post: 11-22-2007, 09:48 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks