Y
yby
Unregistered / Unconfirmed
GUEST, unregistred user!
這個問題已困擾我很久了希望大家幫忙解決一下
import java.sql.*;
public class login
{
public static void main(String[] args)
{
//load the driver
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
String sourceURL = "jdbcracle:thinserver:1521:databasename";
String user = "beg";
String password = "java";
Connection databaseConnection =
DriverManager.getConnection(sourceURL, user, password);
System.out.println("Connection established successfully!");
System.out.println("Hello World!");
// close connection
databaseConnection.close();
}
catch (ClassNotFoundException cnfe)
{
System.err.println(cnfe);
}
catch (SQLException sqle)
{
System.err.println(sqle);
}
}
}
javac login.java 已通過
j2sdk1.4和oracel8.05
提示 ‘oracle.jdbc.driver.OracleDriver’出錯,驅動程序加載出錯,classes12.jar已在類路徑中加載過了,不知是否為classes12.jar驅動程序的問題,請各位幫忙看一下,能否提供一個驅動程序,謝謝
import java.sql.*;
public class login
{
public static void main(String[] args)
{
//load the driver
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
String sourceURL = "jdbcracle:thinserver:1521:databasename";
String user = "beg";
String password = "java";
Connection databaseConnection =
DriverManager.getConnection(sourceURL, user, password);
System.out.println("Connection established successfully!");
System.out.println("Hello World!");
// close connection
databaseConnection.close();
}
catch (ClassNotFoundException cnfe)
{
System.err.println(cnfe);
}
catch (SQLException sqle)
{
System.err.println(sqle);
}
}
}
javac login.java 已通過
j2sdk1.4和oracel8.05
提示 ‘oracle.jdbc.driver.OracleDriver’出錯,驅動程序加載出錯,classes12.jar已在類路徑中加載過了,不知是否為classes12.jar驅動程序的問題,請各位幫忙看一下,能否提供一個驅動程序,謝謝