Advertisement
Guest User

Untitled

a guest
Oct 25th, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. import java.sql.Connection;
  2. import java.sql.DriverManager;
  3. import java.sql.SQLException;
  4.  
  5. public class OracleConnectionTest {
  6. public static void main(String[] args) throws ClassNotFoundException, SQLException {
  7. Class.forName("oracle.jdbc.OracleDriver");
  8.  
  9. Connection con =
  10. DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "1111");
  11.  
  12. if(con != null){
  13. System.out.println("연결 성공");
  14. }
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement