getting exception: The Network Adapter could not establish the connection in simple jdbc program
I was trying to run a simple jdbc code [ using jdk 1.6, oracle 10g] as, package javaapplication2; import java.text.*; import java.sql.*; import java.io.FileWriter; import java.io.PrintWriter; import java.io.BufferedWriter; /** * @author animark */ public class CallableStatementEx1 { public CallableStatementEx1(){;} public static void main(String s[]) throws Exception { try { Class.forName("oracle.jdbc.driver.OracleDriver").newInstance(); Connection con=null; String url= "jdbc:oracle:thin:@//localhost:1521:orcl" ; con = DriverManager.getConnection(url,"scott","password"); String query="update e
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.