import java.sql.*; public class appl_03 { public static void main(String[] args) throws Exception { String url = "jdbc:mysql://aragorn.elo.utfsm.cl/arg_musiteca"; String login = "antares"; String pass = ""; Connection conn = null; try { Class.forName("com.mysql.jdbc.Driver").newInstance(); conn = DriverManager.getConnection(url,login,pass); if (conn != null) { Statement stmt = conn.createStatement(); String sql = "create table "+args[0]+" ("+args[1]+" int (5) not null, "+args[2]+" varchar (32) not null, "+args[3]+" varchar (32) not null, primary key ("+args[1]+"))"; stmt.executeUpdate(sql); conn.close(); } } catch(SQLException ex) { System.out.println(ex); } catch(ClassNotFoundException ex) { System.out.println(ex); } } }