简体   繁体   中英

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.

根据此入门指南,您需要可在此处找到的Oracle Express客户端

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM