开发者

JDBC driver for Oracle 10G XE

I have installed Oracle 10G XE. I 开发者_运维技巧want to connect to it using JDBC . Which driver should i use for it and from where can i download it ?

Thank You.


On the machine you have installed the server, Oracle JDBC drivers are in ORACLE_HOME/jdbc/lib. Just put ojdbc14.jar on your classpath (ojdbc14_g.jar is the same as ojdbc14.jar, except that classes were compiled with "javac -g" and contain some tracing information).

EDIT: According to Oracle Database 10g Release 2 (10.2.0.4) JDBC Drivers, ojdbc14.jar contains classes for use with JDK 1.4 and 1.5 (and I don't see why it wouldn't work with a JDK 6, some features of JDBC 4.0 won't just be available).

Some newer drivers are available at Oracle Database 11g Release 2 JDBC Drivers but I don't really see the difference between ojdbc14.jar and ojdbc15.jar (except that ojdbc15.jar requires a JDK 5+): they are both JDBC 3.0 driver so I think it's just a matter of end of life support for ojbdc14.jar. If you want JDBC 4.0 support, you'll need ojdbc16.jar though. Have a look at the Oracle JDBC FAQ if you want more details.


http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html

You generally want the latest JDBC drivers, they will work with older versions of the database as well. Or, to be on the safe side, match the JDBC version with your DB.


According to this getting started guide you need the Oracle Express client which can be found here


You want to choose a JDBC driver that matches both your version of Oracle and the JDK you're using. ojdbc14.jar is for JDK 1.4; there are newer versions for at least JDK 5 that I know of. I'm not sure if there's a JDBC driver for JDK 6. Use the best match to your situation that Oracle makes available.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜