连接ORACLE

package com.cw.test;

import java.sql.Connection;
import java.sql.DriverManager;

public class DBManager {

public DBManager() {
}

/**
* @param args
*/
public static void main(String[] args) {

try {
Class.forName("oracle.jdbc.driver.OracleDriver");
String url = "jdbc:oracle:thin:@10.0.3.220:1521:orcl ";
Connection c = DriverManager.getConnection(url, "ymbi",
"ymbi");
System.out.println("c=="+c);
} catch (Exception e) {
e.printStackTrace();
}

}

}

你可能感兴趣的:(java,oracle,sql,c,jdbc)