ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Magesh Umasankar" <umag...@apache.org>
Subject Re: JavaEnvUtils and J2SDK 1.4.0/WinNT
Date Mon, 08 Apr 2002 17:57:02 GMT
The JavaEnvUtilsTest::testGetExecutableWindows() method
asserts the following:

  assertTrue(j+" is absolute", (new File(j)).isAbsolute());

But from the JavaEnvUtils::getJreExecutable(String command)
method:
        } else {
            // Unfortunately on Windows java.home doesn't always refer
            // to the correct location, so we need to fall back to
            // assuming java is somewhere on the PATH.
            return addExtension(command);
        }

it appears like a non-absolute executable
may be returned...

So, I don't know if we need to be performing
this assertion...

Cheers,
Magesh

*********************************************
*  When in doubt, mumble; when in trouble,  *
*  delegate; when in charge, ponder.        *
*                          - James H. Boren *
*********************************************
----- Original Message -----
From: "Magesh Umasankar" <umagesh@apache.org>
To: "Ant Developers List" <ant-dev@jakarta.apache.org>
Sent: Monday, April 08, 2002 1:37 PM
Subject: JavaEnvUtils and J2SDK 1.4.0/WinNT


> The method getJdkExecutable(String) returns
> "javac.exe" when passed the argument "javac".
> This does not represent the absolute path and
> hence the following test fails: (The environment
> is JDK 1.4.0, WinNT).  Please note that the test
> case passes under JDK 1.3.0/WinNT.  Any idea what
> is going on?
>
>     [junit] Testcase:
> testGetExecutableWindows(org.apache.tools.ant.util.JavaEnv
> UtilsTest):     FAILED
>     [junit] javac.exe is absolute
>     [junit] junit.framework.AssertionFailedError: javac.exe is absolute
>     [junit]     at junit.framework.Assert.fail(Assert.java:51)
>     [junit]     at junit.framework.Assert.assertTrue(Assert.java:38)
>     [junit]     at
> org.apache.tools.ant.util.JavaEnvUtilsTest.testGetExecutableW
> indows(JavaEnvUtilsTest.java:102)
>     [junit]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>     [junit]     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
> Source)
>     [junit]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
> Sourc
> e)
>     [junit]     at java.lang.reflect.Method.invoke(Unknown Source)
>     [junit]     at junit.framework.TestCase.runTest(TestCase.java:166)
>     [junit]     at junit.framework.TestCase.runBare(TestCase.java:140)
>     [junit]     at
junit.framework.TestResult$1.protect(TestResult.java:106)
>     [junit]     at
> junit.framework.TestResult.runProtected(TestResult.java:124)
>     [junit]     at junit.framework.TestResult.run(TestResult.java:109)
>     [junit]     at junit.framework.TestCase.run(TestCase.java:131)
>     [junit]     at junit.framework.TestSuite.runTest(TestSuite.java:173)
>     [junit]     at junit.framework.TestSuite.run(TestSuite.java:168)
>     [junit]     at
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.
> run(JUnitTestRunner.java:265)
>     [junit]     at
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execut
> eInVM(JUnitTask.java:670)
>     [junit]     at
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execut
> e(JUnitTask.java:459)
>     [junit]     at
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execut
> e(JUnitTask.java:436)
>     [junit]     at org.apache.tools.ant.Task.perform(Task.java:313)
>     [junit]     at org.apache.tools.ant.Target.execute(Target.java:309)
>     [junit]     at
org.apache.tools.ant.Target.performTasks(Target.java:334)
>     [junit]     at
> org.apache.tools.ant.Project.executeTarget(Project.java:1176)
>
>     [junit]     at
> org.apache.tools.ant.Project.executeTargets(Project.java:1118
> )
>     [junit]     at org.apache.tools.ant.Main.runBuild(Main.java:573)
>     [junit]     at org.apache.tools.ant.Main.start(Main.java:179)
>     [junit]     at org.apache.tools.ant.Main.main(Main.java:201)
>     [junit]
>     [junit]
>
> BUILD FAILED
> D:\Projects\jakarta-ant\build.xml:1149: Test org.apache.tools.ant.util.J
> avaEnvUtilsTest failed
>
> *********************************************
> *  When in doubt, mumble; when in trouble,  *
> *  delegate; when in charge, ponder.        *
> *                          - James H. Boren *
> *********************************************
>
>
> --
> To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message