public static void main(String[] args) throws IOException { Properties props = new Properties(); try (InputStream in = Files.newInputStream(Paths.get(args[0]))) { props.load(in); } String url = props.remove("url").toString(); String result = doPost(url, props); System.out.println(result); }