package test;
import java.sql.*;
public class conn{
Connection connection = null ; 
public conn(){  try{ 
   //load the jdbc driver ; 
   String driverName = "oracle.jdbc.driver.OracleDriver"; 
   Class.forName(driverName).newInstance(); 
   //create a connection to the database; 
   String serverName = "10.10.21.112"; 
   String serverPort = "1521:hnpost"; 
   String serverID = serverName + serverPort ; 
   String userName = "admin"; 
   String userPsw = "admin"; 
   String url = "jdbc:oracle:thin:@" + serverID ; 
   Connection = DriverManager.getConnection(url , userName , userPsw); 
  } 
  catch(ClassNotFoundException e1) 
  {
  } 
}
}