| user.dir problem with dll through junit | user.dir problem with dll through junit 2004-01-12 - By Morten Grum, PH-Consult
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 "user.dir"? Any hits?
Thanks in advance.
Morten
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}"/> </junit> </target>
======================================== Morten Grum PH-Consult Ordruph?jvej 4 2920 Charlottenlund Denmark
Tel.: +45 39 96 22 03 Mob.: +45 40 93 43 84 Fax.: +45 39 63 02 72 Mail: mg@(protected) Web : www.phc.dk ========================================
--------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@(protected) For additional commands, e-mail: user-help@(protected)
|
|
 |