file not found for JNI
Tom Tromey
tromey@redhat.com
Tue Apr 8 22:15:00 GMT 2003
>>>>> "David" == McCullars David <- dmccul <David.McCullars@acxiom.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
More information about the Java
mailing list