public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/12940] New: GCJ 3.3.1 on Windows 2002 - java.lang.System.loadLibrary("JniLayer"); does not work at runtime.
@ 2003-11-07 11:11 canutf at cadence dot com
2003-11-07 15:10 ` [Bug java/12940] " green at redhat dot com
2003-12-31 20:34 ` [Bug libgcj/12940] " pinskia at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: canutf at cadence dot com @ 2003-11-07 11:11 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2268 bytes --]
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12940
Summary: GCJ 3.3.1 on Windows 2002 -
java.lang.System.loadLibrary("JniLayer"); does not work
at runtime.
Product: gcc
Version: 3.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: canutf at cadence dot com
CC: gcc-bugs at gcc dot gnu dot org
I developed a java software with a JNI layer. This java software is built and
released only for Windows platforms
The JNI layer is built with CL (Microsoft compiler). It produced a dll. Letâs
call it JniLayer.dll.
Everything is working fine with the JVM (i.e. java) delivered by SUN.
Note: JniLayer.dll is in a folder pointed by the PATH environment variable.
For performance reason, I would like to use GCJ to compile my java code to a
Win32 executable without touching my JNI layer. I believe that it is possible by
using the GCJ âfjni option.
Iâm able to produce my Win32 executable. Letâs called it MyProg.exe.
When I run MyProg.exe I got this following exception : Exception in thread
"main" java.lang.UnsatisfiedLinkError: JniLayer: file not found.
I tried:
- to put JniLayer.dll into the current working directory (where MyProg.exe is
executed)
- to put JniLayer.dll where MyProg.exe reside on the file system.
- When I compiled MyProg.exe with gcj, I added the property
âDjava.library.path=. to force MyProg.exe to find JniLayer.dll in the current
working directory.
- I create a LD_LIBRARY_PATH environment variable to point to the current
working directory. (Where is JniLayer.dll)
For all these tries I got always the same exception (i.e. Exception in thread
"main" java.lang.UnsatisfiedLinkError: JniLayer: file not found.)
What should I do to make it working?
Note: here is the peace of code loading the JniLayer.dll
...
public class CJniLayerWrapper {
/* a "JniLayer.dll" SHOULD EXIST in the PATH Env. Var. */
static {
java.lang.System.loadLibrary("JniLayer");
}
...
}
Thanks in advance for your help.
Best regards,
FRED.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug java/12940] GCJ 3.3.1 on Windows 2002 - java.lang.System.loadLibrary("JniLayer"); does not work at runtime.
2003-11-07 11:11 [Bug java/12940] New: GCJ 3.3.1 on Windows 2002 - java.lang.System.loadLibrary("JniLayer"); does not work at runtime canutf at cadence dot com
@ 2003-11-07 15:10 ` green at redhat dot com
2003-12-31 20:34 ` [Bug libgcj/12940] " pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: green at redhat dot com @ 2003-11-07 15:10 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12940
------- Additional Comments From green at redhat dot com 2003-11-07 15:10 -------
I don't believe System.loadLibrary() works with static Windows executables. Try
linking your JNI library to the executable directly instead of using
System.loadLibrary().
AG
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libgcj/12940] GCJ 3.3.1 on Windows 2002 - java.lang.System.loadLibrary("JniLayer"); does not work at runtime.
2003-11-07 11:11 [Bug java/12940] New: GCJ 3.3.1 on Windows 2002 - java.lang.System.loadLibrary("JniLayer"); does not work at runtime canutf at cadence dot com
2003-11-07 15:10 ` [Bug java/12940] " green at redhat dot com
@ 2003-12-31 20:34 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-31 20:34 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-12-31 19:23 -------
Should be fixed now for 3.4 with the import of libltdl.
*** This bug has been marked as a duplicate of 13056 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Component|java |libgcj
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12940
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-12-31 19:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-07 11:11 [Bug java/12940] New: GCJ 3.3.1 on Windows 2002 - java.lang.System.loadLibrary("JniLayer"); does not work at runtime canutf at cadence dot com
2003-11-07 15:10 ` [Bug java/12940] " green at redhat dot com
2003-12-31 20:34 ` [Bug libgcj/12940] " pinskia at gcc dot gnu dot org
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).