Package scala.tools.nsc

Examples of scala.tools.nsc.Settings


  @Override public String scriptName() {
    return MAIN_SCRIPT;
  }

  private static IMain initInterpreter(String interpreterClasspath) throws ClassNotFoundException {
    Settings settings = new Settings();
    MutableSettings.PathSetting bootClasspath = (MutableSettings.PathSetting) settings.bootclasspath();
    bootClasspath.append(interpreterClasspath);

    ((MutableSettings.BooleanSetting) settings.usejavacp()).tryToSetFromPropertyValue("true");

    return new IMain(settings, new PrintWriter(interpreterOutput));
  }
View Full Code Here


        // "usejavacp" (System.getProperty("java.class.path")) is not enough when
        // there are multiple class loaders (and even when there's only one class
        // loader but the "java.class.path" system property does not contain Scala JARs
        //
        // http://stackoverflow.com/questions/18150961/scala-runtime-in-compiler-mirror-not-found-but-working-when-started-with-xboo
        Settings settings = new Settings();

        // http://www.scala-lang.org/old/node/8002
        settings.classpath().value_$eq(classpath);

        // Without this class loader setting, the REPL and the target process will
        // see different instances of a static variable of the same class!
        // http://stackoverflow.com/questions/5950025/multiple-instances-of-static-variables
        settings.explicitParentLoader_$eq(Option.apply(cl));

        ILoop repl = new ILoop(
            new BufferedReader(new InputStreamReader(in)),
            new PrintWriter(out)
        );
View Full Code Here

TOP

Related Classes of scala.tools.nsc.Settings

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.