我用jdbc技术连接本机的oracle,但是获得Connection时
("jdbc:oracle:thin:@localhost:1521:orcl","scott","tiger");
这样写就报错,错误是:Io 异常: The Network Adapter could not establish the connection
我改成("jdbc:oracle:thin:@192.168.1.101:1521:orcl","scott","tiger");这样写之后就可以连接上数据库了,我想知道这是怎么回事,写localhost和IP(192.168.1.101)有什么区别???