title: DB2 java connection driver
body: <p>I've just installed DB2 Express-C version 10.1 (the newest) and I've tried to make a connection to a SAMPLE database. I've already done t through db2.exe, all done normally.
  here is my java code</p>
  
  <pre><code>    String url = "jdbc:db2:SAMPLE";
      String user = "db2admin";
      String password = "db2admin";
      Connection conn = null;
      try {
          // Load the DB2 JDBC Type 2 Driver with DriverManager
          //Class.forName("COM.ibm.db2.jdbc.app.DB2Driver");
          //Driver d = new COM.ibm.db2.jcc.DB2Driver();
          Driver d = new COM.ibm.db2.jdbc.app.DB2Driver();
          if(!d.jdbcCompliant()) System.console().printf("jdbc driver is not ccompliant");
          //DriverManager.registerDriver(new COM.ibm.db2.jdbc.app.DB2Driver());
          DriverManager.registerDriver(d);
          if(!d.acceptsURL(url))
              throw new SQLException("url \"" + url + "\" is not accepted by jdbc driver");
          conn = DriverManager.getConnection(url, user, password);
          conn.setAutoCommit(false);
  
          /* do some work */
          conn.commit();
          conn.close();
      }
      catch (Exception e) {
          e.printStackTrace();
      }
  </code></pre>
  
  <p>output is</p>
  
  <pre><code>java.sql.SQLException: url "jdbc:db2:SAMPLE" is not accepted by jdbc driver
  </code></pre>
  
  <p>what is the problem?
  I've added .zip with driver to my library so it is found properly.
  Maybe I have some wrong settings?</p>