I connect to db2 use jdbc ,the programe is :
try{
Class.forName("COM.ibm.db2.jdbc.app.DB2Driver");
Connection db = DriverManager.getConnection("jdbc:db2:dl","db2inst 1","db2inst1");
Statement stmt = db.createStatement();
System.out.println("11111111111111");
Connection db_exec = DriverManager.getConnection("jdbc:db2:dl","db2inst 1","db2inst1");
System.out.println("22222222222222");
Statement ppstmt = db_exec.createStatement();
........
the result of run is :
$ java ImChangeData 3 Dj
11111111111111
[IBM][CLI Driver] SQL1224N A database agent could not be started to service a request, or was terminated as a result of a database system shutdown or a force command. SQLSTATE=55032