请教一个连接ORACLE数据库的问题
日期:2006-08-25 荐:
请教一个连接ORACLE数据库的问题各位大哥大姐,我是初学者我的程序代码try{ String driverName = "oracle.jdbc.driver.OracleDriver"; Class.forName(driverName).newInstance(); String url="jdbc:oracle.thin:@211.97.105.22:1521:rsdb"; conn = DriverManager.getConnection(url,"ruisuo","ruisuo"); conn.close(); } 编译后出错了提示:ConnectionBean.java:15: unreported exception java.lang.ClassNotFoundException; must be caught or declared to be thrown Class.forName(driverName).newInstance(); ^ConnectionBean.java:15: unreported exception java.lang.InstantiationException; must be caught or declared to be thrown Class.forName(driverName).newInstance();我的classpath:d:\j2sdk\lib\tools.jar;d:\j2sdk\lib\class12.jar;d:\j2sdk\test;.;d:\j2sdk\lib\dt.jar;D:\j2sdk\jre\lib;e:\myclasses请各位帮忙,谢谢了~~有没有包含Oracle的jdbc驱动?
标签: