Oracle 10g与Java的连接 [英] Oracle 10g connection with Java
本文介绍了Oracle 10g与Java的连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
用于连接java for Desktop应用程序的驱动程序是什么。我发现很多类型,如微小的,但都无法理解。
请帮帮我
what are the drivers which are used to connect with java for Desktop application. i have found many types like tiny and all but was not able to understand. Please help me out
推荐答案
为了让您的生活更轻松,我建议您只使用Oracle的瘦身驱动程序。
To make your life easier, I would recommend just using Oracle's Thin Driver.
首先,从 Oracle的网站:
http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html
然后将JAR添加到项目中并使用以下命令连接到数据库: / p>
Then add JAR to your project and connect to database using:
Class.forName ("oracle.jdbc.driver.OracleDriver");
Connection conn = DriverManager.getConnection
("jdbc:oracle:thin:@//localhost:1521/orcl", "scott", "tiger");
当然,请将这些参数替换为与您的数据库对应的参数。
Of course, replace these parameters with the ones corresponding to your DB.
这篇关于Oracle 10g与Java的连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文