Guest User

Untitled

a guest
Jan 23rd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. try {
  2. Settings settings = new Settings();
  3. settings.usejavacp().tryToSetFromPropertyValue("true");
  4. settings.stopAfter().tryToSetColon(Nil.$colon$colon("dce")); // same as "dce" :: Nil in scala
  5. settings.debug().tryToSetFromPropertyValue("true");
  6.  
  7. System.out.println("About to compile " + new String(sourceUnit.getContents()));
  8.  
  9. PrintWriter out = new PrintWriter("output.txt");
  10. IMain main = new IMain(settings, out);
  11. boolean success = main.compileString(new String(sourceUnit.getContents()));
  12. System.out.println("Compiled? " + success);
  13. } catch (FileNotFoundException e) {
  14. e.printStackTrace();
  15. }
Add Comment
Please, Sign In to add comment