views:

131

answers:

2

Hi All,

I have installed NetBeans 6.5 with JDK1.6. And I want to connect between oracle with java in NetBeans 6.5. The question is:

How do I configure JDBC to java 1.6?

Thanks, Sopolin

+1  A: 

You need to download the Oracle thin JDBC driver and pop it on your classpath.

See this for a code example.

http://w2.syronex.com/jmr/edu/db/oracle-and-java

pjp
Hi, I saw your reference but after I follow the example in this web site, I have the error occurs. Exception in thread "main" java.lang.NoClassDefFoundError: C:\TestJava\DbTestCause by: java.lang.ClassNotFoundException: c:\TestJava\DbTest at java.net.URLClassLoader$1.run(Unknown Source).....Could you guide me to configure JDBC Thin driver in oracle with java?
Sopolin
How are you executing your program it looks like your doing something wrong. It should look something like java -cp ... DbTest what IDE are you using as it's easier to run and configure apps through an IDE.
pjp
Yes, I copied DbTest to run for testing already. Then when I ran it, it appears this error.
Sopolin
+1  A: 

Download page for Oracle JDBC driver and Oracle JDBC examples. Also see Sun's JDBC tutorial.

Jesper