This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: file not found for JNI
- From: Tom Tromey <tromey at redhat dot com>
- To: McCullars David - dmccul <David dot McCullars at acxiom dot com>
- Cc: "'java at gcc dot gnu dot org'" <java at gcc dot gnu dot org>
- Date: 08 Apr 2003 15:08:58 -0600
- Subject: Re: file not found for JNI
- References: <CF113269FDACD311AA8C009027DE9D0419433ACF@conmsx01.corp.acxiom.net>
- Reply-to: tromey at redhat dot com
>>>>> "David" == McCullars David <- dmccul <David dot McCullars at acxiom dot com>> writes:
David> gcj -C test.java
David> gcjh -jni test
David> gcc -shared -o libtest.dll test.c
Should be `test.dll'. The `lib' prefix is only for Unixy systems.
David> gcj -fjni -o test.exe --main=test -L. -ltest test.java
Note that there's a PR open (since forever) saying that having a
`foo.so' and a program named `foo' will confuse the dlopen code.
It's possible you would want to name your executable something else.
(I haven't tested it, and the PR talks about a slightly different
scenario, so maybe it won't affect you.)
David> Is this a bug in the way loadLibrary() works? FYI: I've tried
David> replacing my call to load() and using the full path of the dll,
David> but that also returned a "file not found" message.
Curious. Maybe there's some other problem.
Tom