From: jhkyu AT ibm DOT net (Jackal Yu) Subject: Re: JNI and GCC 10 Sep 1997 15:38:24 -0700 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <341624E9.E22B032.cygnus.gnu-win32@ibm.net> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------4AA1777862A0236EF8676059" X-Mailer: Mozilla 4.02 [en] (WinNT; U) Original-To: Igor Boukanov Original-CC: gnu-win32 AT cygnus DOT com Original-Sender: owner-gnu-win32 AT cygnus DOT com This is a multi-part message in MIME format. --------------4AA1777862A0236EF8676059 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Try System.loadLibrary(); To use System.load() your DLL must be in some kind of shared library path. Unfortunately, JDK docs, as far as I can tell, did not tell us what it is on Windows platform. Igor Boukanov wrote: > > Hi, > > I tried to use gcc from b18 to implement JNI native libraris but without > much success, i.e. I was able to create dll, but I could not load libarary > from JVM. After the execution: > System.load("C:\\test\\test.dll"); > I always got: > java.lang.UnsatisfiedLinkError: C:\test\test.dll > at java.lang.Runtime.load(Runtime.java:397) > at java.lang.System.load(System.java:553) > at Prompt.main(Prompt.java:32) > > In the same time I saw in the list archive that some guys at least were > able to call native methods. So what is a problem? > > P.S. > > I also noticed that I can load system, MS-OFFICE dll's and cygwin.dll > from Sergey, but not the one from oficial b18 package (of cause, they do > not contain any Java methods and the linking failed). So what is the > difference? > > Regards, Igor Boukanov. > igor DOT boukanov AT fi DOT uib DOT no > http://www.fi.uib.no/~boukanov/ > > - > For help on using this list (especially unsubscribing), send a message to > "gnu-win32-request AT cygnus DOT com" with one line of text: "help". --------------4AA1777862A0236EF8676059 Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Jackal Yu Content-Disposition: attachment; filename="vcard.vcf" begin: vcard fn: Jackal Yu n: Yu;Jackal org: Interlink Harbor Ltd. adr: 2815 - 14Ave SE;;;Calgary;AB;T2A 0J8;Canada email;internet: jhkyu AT ibm DOT net title: Co-op Students tel;work: (403) 231-9884 tel;fax: (403) 248-7900 tel;home: (403) 804-8363 x-mozilla-cpt: ;0 x-mozilla-html: TRUE version: 2.1 end: vcard --------------4AA1777862A0236EF8676059-- - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".