Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try {
- Settings settings = new Settings();
- settings.usejavacp().tryToSetFromPropertyValue("true");
- settings.stopAfter().tryToSetColon(Nil.$colon$colon("dce")); // same as "dce" :: Nil in scala
- settings.debug().tryToSetFromPropertyValue("true");
- System.out.println("About to compile " + new String(sourceUnit.getContents()));
- PrintWriter out = new PrintWriter("output.txt");
- IMain main = new IMain(settings, out);
- boolean success = main.compileString(new String(sourceUnit.getContents()));
- System.out.println("Compiled? " + success);
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- }
Add Comment
Please, Sign In to add comment