* JNI and GCC
@ 1997-09-09 15:01 Igor Boukanov
1997-09-10 2:25 ` Jackal Yu
1997-09-12 10:21 ` Paolo Ciccone
0 siblings, 2 replies; 4+ messages in thread
From: Igor Boukanov @ 1997-09-09 15:01 UTC (permalink / raw)
To: gnu-win32
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.boukanov@fi.uib.no
http://www.fi.uib.no/~boukanov/
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: JNI and GCC
1997-09-10 2:25 ` Jackal Yu
@ 1997-09-10 0:38 ` Igor Boukanov
0 siblings, 0 replies; 4+ messages in thread
From: Igor Boukanov @ 1997-09-10 0:38 UTC (permalink / raw)
To: Jackal Yu; +Cc: Igor Boukanov, gnu-win32
On Tue, 9 Sep 1997, Jackal Yu wrote:
> Try System.loadLibrary();
>
It does not work either.
BTW, you can use System.load() if you specify a full path to the library.
And what I really do not undestand is why JDK do not like Dll's produced
by my instalation of Cygwin...
Regards, Igor Boukanov.
igor.boukanov@fi.uib.no
http://www.fi.uib.no/~boukanov/
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: JNI and GCC
1997-09-09 15:01 JNI and GCC Igor Boukanov
@ 1997-09-10 2:25 ` Jackal Yu
1997-09-10 0:38 ` Igor Boukanov
1997-09-12 10:21 ` Paolo Ciccone
1 sibling, 1 reply; 4+ messages in thread
From: Jackal Yu @ 1997-09-10 2:25 UTC (permalink / raw)
To: Igor Boukanov; +Cc: gnu-win32
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.boukanov@fi.uib.no
> http://www.fi.uib.no/~boukanov/
>
> -
> For help on using this list (especially unsubscribing), send a message to
> "gnu-win32-request@cygnus.com" with one line of text: "help".
begin: vcard
fn: Jackal Yu
n: Yu;Jackal
org: Interlink Harbor Ltd.
adr: 2815 - 14Ave SE;;;Calgary;AB;T2A 0J8;Canada
email;internet: jhkyu@ibm.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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: JNI and GCC
1997-09-09 15:01 JNI and GCC Igor Boukanov
1997-09-10 2:25 ` Jackal Yu
@ 1997-09-12 10:21 ` Paolo Ciccone
1 sibling, 0 replies; 4+ messages in thread
From: Paolo Ciccone @ 1997-09-12 10:21 UTC (permalink / raw)
To: Igor Boukanov; +Cc: gnu-win32
>>>>> "IB" == Igor Boukanov <boukanov@sentef2.fi.uib.no> writes:
IB> Hi, I tried to use gcc from b18 to implement JNI native
IB> libraris but without much success, i.e. I was able to create
IB> dll, but I could not load libarary from JVM. After the
IB> execution: System.load("C:\\test\\test.dll"); I always got:
IB> java.lang.UnsatisfiedLinkError: C:\test\test.dll at
IB> java.lang.Runtime.load(Runtime.java:397) at
IB> java.lang.System.load(System.java:553) at
IB> Prompt.main(Prompt.java:32)
Are you using C++ or C ? I experienced a similar problem with code
that was compiled as C++ (with Borland C++). When I renamed the module
to .c it linked ok.
Paolo
--
The opinions expressed here are exclusively my own
Remove the extra junk to my e-mail address to reply, sorry for the
inconvenience, I get spammed a lot.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1997-09-12 10:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-09-09 15:01 JNI and GCC Igor Boukanov
1997-09-10 2:25 ` Jackal Yu
1997-09-10 0:38 ` Igor Boukanov
1997-09-12 10:21 ` Paolo Ciccone
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).