Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <63DA2E3D7F76D311BCDF0008C7E6EB98029A1BF6@zuk28exm04.ecid.cig.mot.com> From: Fulton William-WFULTON1 To: "'laurent DOT hausermann AT naema DOT org'" Cc: "'swig AT cs DOT uchicago DOT edu'" , "'cygwin AT sourceware DOT cygnus DOT com'" Subject: RE: [Swig] JNI, Cygwin32 and swig. Date: Fri, 22 Jun 2001 08:58:49 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain I havn't used SWIG with Cygwin or Win32, but there is one problem in your code. Use: try { System.loadLibrary("openssl"); that is don't specify the text '.dll'. I don't know why you don't see the "Error Loading the lib" message, it ought to show. Put in some more debug output or use breakpoints in a debugger to follow the execution path. William > hi all, > > I am trying to recompile a c library (openssl) under W32 > (using Cygwin) and to > access it in the W32 environnement with my JAVA program > mapped with swig... > Ok , it may sounds strange... but .... > If I include the .dll in my java code, my java will not run > any more... > EX : > public class simple { > static { > try { System.loadLibrary("openssl.dll"); } > catch (UnsatisfiedLinkError e) { > System.out.println("Error loading the lib"); System.exit(1); > } > } > public static void main(String argv[]) { > System.out.println("Hello World !"); > } > } > > If I include the static code, I have not output... I have put > in comments the > static loading part I have no problem I have my silly output... > > the strangest thing is that the JVM(1.3) says nothing !! > Of course, on my linux box everything is fine... > > Regards, > > Laurent Hausermann > PS : please write me back, I didn't subscribe to the list. -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple