Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-05-2008, 09:28 PM
Member
 
Join Date: Mar 2008
Posts: 4
tsantana is on a distinguished road
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.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-07-2008, 08:05 PM
Member
 
Join Date: Mar 2008
Posts: 4
tsantana is on a distinguished road
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:

Quote:
<?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.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
trying to get class name & path sandor New To Java 4 08-12-2008 02:38 PM
.class fille needed from eclipse perplexingtrax New To Java 4 03-27-2008 06:36 PM
Log4J.jar in class path eva New To Java 0 01-02-2008 07:39 PM
Renaming a class in Eclipse Java Tip Java Tips 0 12-04-2007 11:54 AM
Setting Java Path bugger New To Java 2 11-22-2007 10:48 AM


All times are GMT +3. The time now is 02:23 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org