This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: file not found for JNI


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]