import java.sql.*; public class appl_04 { 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 = "insert into "+args[0]+" values ("+args[1]+",'"+args[2]+"','"+args[3]+"')"; stmt.executeUpdate(sql); conn.close(); } } catch(SQLException ex) { System.out.println(ex); } catch(ClassNotFoundException ex) { System.out.println(ex); } } }