为了使您的生活更轻松,我建议您仅使用Oracle的Thin Driver。
首先,从Oracle网站下载驱动程序:
http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html
然后将JAR添加到您的项目中,并使用以下命令连接到数据库:
Class.forName ("oracle.jdbc.driver.OracleDriver");Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:@//localhost:1521/orcl", "scott", "tiger");当然,将这些参数替换为与您的数据库相对应的参数。



