CreateTable.java
import java.sql.*;
import org.apache.commons.dbcp.BasicDataSource;
class CreateTable {
public static void main(String[] args) {
BasicDataSource bds = new BasicDataSource();
bds.setDriverClassName("com.mysql.jdbc.Driver");
bds.setUrl("jdbc:mysql://localhost:3306/mydb");
bds.setUsername("root");
bds.setPassword("");
try {
Connection con = bds.getConnection();
try {
Statement st = con.createStatement();
String QueryString = "CREATE TABLE user_master1(User_Id INTEGER NOT NULL
AUTO_INCREMENT, "
+ "User_Name VARCHAR(25), UserId VARCHAR(20), User_Pwd VARCHAR(15), primary key(User_Id))";
st.executeUpdate(QueryString);
System.out.println("Table created!!");
con.close();
} catch (SQLException s) {
System.out.println("SQL code does not execute.");
}
} catch (Exception e) {
e.printStackTrace();
}
}
}

In the lib folder place all required file ie. commons-collections.jar, commons-dbcp.jar, commons-pool.jar, j2ee.jar and mysql-connector-java-5.1.7-bin.jar
In the pathset.bat write following statement
set classpath=.;lib/commons-collections.jar;lib/commons-dbcp.jar;lib/commons-pool.jar;lib/j2ee.jar;lib/mysql-connector-java-5.1.7-bin.jar

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.