求助JAVA连ORACLE问题
这是我简单写的程序
import java.sql.*;
public class oracleTest {
/**
* @param args
*/
public oracleTest(){
try{
Class.forName( "oracle.jdbc.driver.OracleDriver ");
}
catch(Exception e){
e.printStackTrace();
}
}
public static void main(String[] args) {
// TODO Auto-generated method stub
String strSQL= "select * from users ";
try{
Connection con = DriverManager.getConnection( "jdbc:oracle:thin:@192.168.1.4:1521:student ", "system ", "system ");
Statement stm=con.createStatement();
ResultSet rs=stm.executeQuery(strSQL);
while(rs.next()){
System.out.print(rs.getString(1));
}
}
catch(Exception e){
e.printStackTrace();
}
}
}
这是提示的错误
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at oracleTest.main(oracleTest.java:20)
提示这个错误是什么意思啊 ?????
------解决方案--------------------可能是 student 这个名字错了,看你的数据库的SID是什么,好象一般的都是大写