任何人都可以请帮我解决这个问题,即使在我的程序中删除@ localhost之前我无法运行它...这次它给我的错误为.. “Exception in线程 “主要” 值java.sql.SQLException:IO异常:网络适配器无法建立连接“在线程主例外:IO异常
import java.sql.*;
class CreatingTable{
public static void main(String[] ar) throws Exception {
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection con = DriverManager.getConnection("jdbc:oracle:thin:localhost:1521:xe","priyanka","java");
Statement stmt=con.createStatement();
int students=stmt.executeUpdate("create table class(name varchar2(20),rollno number(20)");
con.close();
}
}
你为什么删除它?它是[连接字符串语法](http://www.orafaq.com/wiki/JDBC)的一部分... – A4L
您正在使用哪个操作系统? –
它的Windows Vista – user3203749