Thanks for this gem, I used it in my recent development.
The only improvement I used in my approach was the plist build. I am including an XML template in a package. Then I use the class loader to read in XML and then write using the file, as you did above.
(Less improvement and a more accurate look, see below)
private String loadPlistXML() { StringBuilder file = new StringBuilder(); try{ is = this.getClass().getClassLoader().getResourceAsStream("LaunchPList.xml"); logger.info("is = " + (is != null)); BufferedReader in = new BufferedReader(new InputStreamReader(is)); String line = null; while((line = in.readLine()) != null) { file.append(line +"\n"); } }catch(Error e){ e.printStackTrace(); }catch (IOException e) {
Thanks again for helping with the original post.
mbarnettjones
source share