summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
Diffstat (limited to 'test/files')
-rw-r--r--test/files/jvm/inner.scala12
1 files changed, 9 insertions, 3 deletions
diff --git a/test/files/jvm/inner.scala b/test/files/jvm/inner.scala
index 612228028c..4ad1f1e215 100644
--- a/test/files/jvm/inner.scala
+++ b/test/files/jvm/inner.scala
@@ -55,9 +55,15 @@ object Scalatest {
private val outputdir = System.getProperty("scalatest.output", "inner-jvm.obj")
private val scalalib = System.getProperty("scalatest.lib", "")
private val classpath = outputdir + File.pathSeparator + scalalib
- private val javahome = System.getProperty("java.home")
- private val javacmd = javahome + File.separator + "bin" + File.separator + "java"
- private val javac = javahome + File.separator + "bin" + File.separator + "javac"
+ private val javabin = {
+ val jhome = new File(System.getProperty("java.home"))
+ if (jhome.getName == "jre")
+ new File(jhome.getParent, "bin").getAbsolutePath
+ else
+ new File(jhome, "bin").getAbsolutePath
+ }
+ private val javacmd = javabin + File.separator + "java"
+ private val javac = javabin + File.separator + "javac"
def javac(src: String, fname: String) {
val tmpfilename = outputdir + File.separator + fname