From e26f530f571e4ab7234cfd3e2e8ce1598be4e11d Mon Sep 17 00:00:00 2001 From: Gilles Dubochet Date: Tue, 29 Apr 2008 18:10:11 +0000 Subject: Hopefully fixed the annoying jvm/inner test cas... Hopefully fixed the annoying jvm/inner test case this time. --- test/files/jvm/inner.scala | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'test') 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 -- cgit v1.2.3