MySQL数据库
Driver ="path/to/jdbc-drivers/mysql-connector-java-5.1.35-bin.jar" //驱动程序
Class ="com.mysql.jdbc.Driver";
URL ="jdbc:mysql://localhost:3306/db_name"; //连接的URL,db_name为数据库名
SQL server数据库
Driver ="path/to/jdbc-drivers/sqljdbc4.jar"
Class ="com.microsoft.jdbc.sqlserver.SQLServerDriver";
URL ="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=db_name"; //db_name为数据库名
Oracle数据库
Driver ="path/to/jdbc-drivers/ojdbc6-12.1.0.2.jar"
Class ="oracle.jdbc.driver.OracleDriver";
URL ="jdbc:oracle:thin:@loaclhost:1521:orcl"; //orcl为数据库的SID
DB2数据库
//连接具有DB2客户端的Provider实例
Driver ="path/to/jdbc-drivers/jt400.jar"
Class ="com.ibm.db2.jdbc.app.DB2.Driver";
URL ="jdbc:db2://localhost:5000/db_name"; //db_name为数据可名
PostgreSQL数据库
Driver ="path/to/jdbc-drivers/postgresql-9.4.1201.jdbc4.jar"
Class ="org.postgresql.Driver"; //连接数据库的方法
URL ="jdbc:postgresql://localhost/db_name"; //db_name为数据可名
原文:http://www.cnblogs.com/a-du/p/7612671.html