Advertisement
Guest User

Untitled

a guest
Jul 29th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. InputStream is = (this.getClass().getClassLoader().getResourceAsStream("InterWebApp.py"));
  2. File script = File.createTempFile("script", ".py");
  3. Files.copy(is, script.toPath(), StandardCopyOption.REPLACE_EXISTING);
  4. InputStream is1 = (this.getClass().getClassLoader().getResourceAsStream("setup.xml"));
  5. File xml = File.createTempFile("config", ".xml");
  6. Files.copy(is1, xml.toPath(), StandardCopyOption.REPLACE_EXISTING);
  7.  
  8. Process p = Runtime.getRuntime().exec("." + script.getAbsolutePath());
  9. p.waitFor();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement