package mypackage;
import java.sql.*;
import java.util.*;
import java.io.*;
class test
{
public static void main(String args[])
throws SQLException, Exception
{
try
{
Class.forName("COM.ibm.db2.jdbc.app.DB2Driver").newInstance();
String url="jdbc:db2:EBUSINES"; //EBUSINES为数据库名
String user="db2admin";
String password="mydb2";
Connection conn= DriverManager.getConnection(url,user,password);
System.out.print("Done!OK!!!\n");
}catch(SQLException sqle)
{
System.out.print(sqle);
}
}
}