Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
- package javaapplication1;
- import java.sql.Connection;
- import java.sql.DriverManager;
- import java.sql.SQLException;
- /**
- *
- * @author faris
- */
- public class JavaApplication1 {
- /**
- * @param args the command line arguments
- */
- public static void main(String args[]) {
- Connection conn = null;
- try {
- System.out.println("Koneksi sedang berjalan...");
- String url = "jdbc:mysql://localhost/SEWA_RUANG";
- String user = "root";
- String password = "";
- conn = DriverManager.getConnection(url, user, password);
- System.out.println("Koneksi Berhasil");
- } catch (SQLException e) {
- System.out.println(e.getMessage());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement