fix for scala-library.jar not being on the classpath for javac

This commit is contained in:
Mark Harrah 2010-03-27 09:24:34 -04:00
parent bb05bf2ce4
commit ab2e038817
4 changed files with 12 additions and 1 deletions

View File

@ -78,7 +78,8 @@ final class Compile(maximumErrors: Int, compiler: AnalyzingCompiler, analysisCal
}
protected def processJava(sources: Set[File], classpath: Set[File], outputDirectory: File, options: Seq[String], log: Logger)
{
val arguments = (new CompilerArguments(compiler.scalaInstance, false, compiler.compilerOnClasspath))(sources, classpath, outputDirectory, options)
val augmentedClasspath = if(compiler.autoBootClasspath) classpath + compiler.scalaInstance.libraryJar else classpath
val arguments = (new CompilerArguments(compiler.scalaInstance, false, compiler.compilerOnClasspath))(sources, augmentedClasspath, outputDirectory, options)
log.debug("Calling 'javac' with arguments:\n\t" + arguments.mkString("\n\t"))
def javac(argFile: File) = Process("javac", ("@" + normalizeSlash(argFile.getAbsolutePath)) :: Nil) ! log
val code = withArgumentFile(arguments)(javac)

View File

@ -0,0 +1,3 @@
project.organization=empty
project.name=Java Test
project.version=1.0

View File

@ -0,0 +1,6 @@
package test;
public final class R {
public static final int y = 4;
public static int x(scala.ScalaObject s) { return 3; }
}

View File

@ -0,0 +1 @@
> compile