mirror of https://github.com/sbt/sbt.git
fix for scala-library.jar not being on the classpath for javac
This commit is contained in:
parent
bb05bf2ce4
commit
ab2e038817
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
project.organization=empty
|
||||
project.name=Java Test
|
||||
project.version=1.0
|
||||
|
|
@ -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; }
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
> compile
|
||||
Loading…
Reference in New Issue