ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Morten Grum, PH-Consult">
Subject user.dir problem with dll through junit
Date Mon, 12 Jan 2004 08:01:48 GMT
Hi All

When running junit via ant I set the user dir using
            <sysproperty key="user.dir" value="${testrun}"/>
in the junit task (see full task below).

My java code loads a *.dll library which also needs to know the same user
dir. However, running through ant's junit task it seems as if the *.dll is
running in a different user dir (not having the code for the *.dll I haven't
been able to detect which). When I run my java code directly from the promt
there's no problem at all (the *.dll library then also knows the correct
user directory).

How could I in my tests get the *.dll library to run in the same correct
Any hits?

Thanks in advance.


PS: my junit task looks like this:
    <target name="test" depends="testdirectories"
        description="Test the distribution with JUnit" >

        <!-- Run tests with JUnit -->
        <junit fork="on" dir="${build}" showoutput="true">
            <classpath refid="testlibs" />
            <classpath path="${build.testclasses}" />
            <classpath path="${project.jar}" />
            <formatter type="xml" />
            <jvmarg line="-Xmx256m -Xss8192k" />
            <test name="${testtorun}" />
            <sysproperty key="user.dir" value="${testrun}"/>

Morten Grum
OrdruphĂžjvej 4
2920 Charlottenlund

Tel.: +45 39 96 22 03
Mob.: +45 40 93 43 84
Fax.: +45 39 63 02 72
Web :

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message