hi - thanks all for the replies.
one interesting thing I've found out about a minute
ago is that:
the program runs perfectly fine if the single line
System.loadLibrary("myDll");
was changed to
System.loadLibrary("jpeg"); // this resolves to %JAVA_HOME%\jre\bin\jpeg.dll
(again: System.loadLibrary("myDll"); fails only if the
launched JVM is running under ant)
the JNI part of the source code actually looks like this:
--
#include <jni.h>
#include <stdio.h> // <- can this be problematic by any chance??
#include "foo_bar_baz.h"
JNIEXPORT jlong JNICALL
Jjava_foo_bar_baz_f(JNIEnv *env, jclass c) {
...
GetSystemInfo(&siSysInfo); //<- only operation (doesn't matter anyway)
...
return xyz;
}
--
now I'm thinking about dead-lock related to STDLIB
initialization routines (possibly coming from(?) <stdio.h>).
maybe try recompiling this particular DLL file with
different (compile and/or linking) options?
[this dll file actually is prepared by somebody else,
so at the moment I don't know exactly what was done to create this... anyway]
regards,
kenji
ps., so it looks like half-Ant-unrelated after all <sorry>.
ps2.,
- doing tests under ant1.5 didn't make any difference.
- below by the way is the complete build.xml file
--
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id: build.xml,v 1.1.1.1 2002/03/08 17:17:33 kkonaka Exp $ -->
<project basedir="." default="doit">
<target name="doit">
<tstamp/>
<mkdir dir="build"/>
<mkdir dir="boot"/> <!-- contains modified java.lang.ClassLoader for verbose
tracing -->
<javac classpath="boot" debug="on" destdir="boot" srcdir="boot"/>
<javac classpath="build" debug="on" destdir="build" srcdir="src"/>
<java classname="Win2kHang" fork="yes">
<jvmarg value="-Djava.library.path=lib"/>
<jvmarg value="-Xbootclasspath/p:boot"/>
<classpath>
<pathelement path="build"/>
</classpath>
<arg value="abc"/>
</java>
</target>
<target name="clean">
<delete dir="build"/>
<delete>
<fileset dir="." includes="**/*~" defaultexcludes="no"/>
</delete>
</target>
</project>
--
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>