Results 1 to 2 of 2
  1. #1
    tsantana is offline Member
    Join Date
    Mar 2008
    Posts
    4
    Rep Power
    0

    Talking 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.

  2. #2
    tsantana is offline Member
    Join Date
    Mar 2008
    Posts
    4
    Rep Power
    0

    Default

    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:

    <?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>
    And now it works. I have no read this in any other forum nor book, tutorial. I simply tried.

    Thank you.

Similar Threads

  1. trying to get class name & path
    By sandor in forum New To Java
    Replies: 4
    Last Post: 08-12-2008, 01:38 PM
  2. .class fille needed from eclipse
    By perplexingtrax in forum New To Java
    Replies: 4
    Last Post: 03-27-2008, 05:36 PM
  3. Log4J.jar in class path
    By eva in forum New To Java
    Replies: 0
    Last Post: 01-02-2008, 06:39 PM
  4. Renaming a class in Eclipse
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-04-2007, 10:54 AM
  5. Setting Java Path
    By bugger in forum New To Java
    Replies: 2
    Last Post: 11-22-2007, 09:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •