import java.sql.*; // Run with one argument: a JDBC url to connect to. public class TestQuotes { private static final String QUERY = "insert into backupItem (idbackup,pathservidor,pathoriginal,hash,esenlace,metadatos) values (null,'/home/argaldo/datos/software/tomcat/tomcat/webapps/ubt/backup/dani/null/home/argaldo/test/prueba','/home/argaldo/test/prueba','1C940736976FFFFFFFCFFFFFF866EFFFFFFECFFFFFF827EFFFFFFDC413F7FFFFFFAF76FFFFFFF967','false','\n \n 420\n 1000\n UNIX\n false\n false\n 1114629588\n 1000\n 1114644020\n \n\n')"; public static void main(String[] args) throws Exception { Class.forName("org.postgresql.Driver"); Connection c = DriverManager.getConnection(args[0]); Statement s = c.createStatement(); s.executeUpdate(QUERY); c.close(); } }