ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: System.loadLibrary() hangs on win2k cmd.exe console?
Date Mon, 29 Jul 2002 16:32:33 GMT
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
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"
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]

ps., so it looks like half-Ant-unrelated after all <sorry>.

- 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 2002/03/08 17:17:33 kkonaka Exp $ -->
<project basedir="." default="doit">
    <target name="doit">
      <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"/>
          <pathelement path="build"/>
        <arg value="abc"/>
    <target name="clean">
      <delete dir="build"/>
        <fileset dir="." includes="**/*~" defaultexcludes="no"/>

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

View raw message