oralce与jdbc的连接.doc

  1. 1、本文档共5页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
oralce与jdbc的连接

Setting up Oracle JDBC Authors: Lichu Dang, Lixin Yu The steps to enable your Java program to talk to Oracle database: Install Oracle and make sure it is running ok. (ie. you can connect to Oracle by sqlplus) Download the JDBC driver from Oracle at the following url. /software/tech/java/sqlj_jdbc/content.html Typically, the JDBC driver file you should download is named class12.zip. If you want to know the details of the JDBC drivers on the Oracle site. Here is some info. JDBC drivers can be classified into 4 types, ranging from pure Java driver to thin Java/heavy native driver. The class12.zip driver we chosen is the pure Java type. And for different type, there are different drivers for different Oracle versions and JDK versions. Pick the one that match your environment. I assume we are using Java 2, so we should use the class12.zip driver. Put this class12.zip file to your Java classpath. You should know how to do this. If not, follow the steps: For Windows 2000 (Windows 9x or XP should be similar): save class12.zip to C:\sjsu\cs157a\jdbc right click My Computer, choose Properties, click Advanced tab, click Environment Variables button, choose the variable CLASSPATH in the User variables table, click Edit button in the variable value text field, append ;C:\sjsu\cs157a\jdbc\classes12.zip if CLASSPATH is not present in the table, click Add button and type CLASSPATH in the variable name and type C:\sjsu\cs157a\jdbc\classes12.zip in the variable value box. For Unix or Linux: save class12.zip to /usr/jdbc add the line setenv CLASSPATH $CLASSPATH:/usr/jdbc to your .login file. relogin to your shell Do a short simple test by issuing command in DOS or a shell: java oracle.jdbc.driver.OracleDriver You will get an error, but dont panic. If your error said: Exception in thread main java.lang.NoSuchMethodError: main Congradulation, you have setup JDBC driver correctly, despite what the error said. But if your error said: Exception in thread main j

文档评论(0)

xcs88858 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:8130065136000003

1亿VIP精品文档

相关文档