Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-Id: X-Mailer: Novell GroupWise 4.1 Date: Fri, 03 Dec 1999 10:50:55 +0000 From: Alan Griffiths To: cygwin AT sourceware DOT cygnus DOT com Subject: Using Cygwin 1 with Mumit's JNI examples I'm using the Cywin 1.0 CD and have downloaded Mumit's JNI examples, but I can't get them to work! What I've done: /1/ download and unzip java-jni-examples.zip from http://www.xraylith.wisc.edu/~khan/software/gnu-win32/ /2/ go to the c++ sub-directory /3/ copy Makefile.cyg to Makefile /4/ Add the following lines after the respective defines: CPPFLAGS+= -D__int64="long long" JDK_ROOT = c:/Java/jdk1.2.2 DLLWRAP_FLAGS+= --target=cygwin32 /5/ type "make". This appears to build the dll successfully. *But* now when I run the Main application it exits with no apparent results. So... /6/ I changed the initialiser in HelloWorld.java to... static { try { System.out.println("arg debug: before loadLibrary"); System.loadLibrary("hello"); } finally { System.out.println("arg debug: after loadLibrary"); } } ...and discovered that the first println() is executed and the second isn't. (If I delete the dll I reach the second println() and have the expected UnsatisfiedLinkError trace.) Clearly something is going horribly wrong with loading the dll. But I don't have the first idea what to look for. Any suggestions? PS Thanks Mumit for pointing me at the list archive - which had answers to some of my earlier difficulties. -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com