This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: mingw32 JNI Problems
- From: Frank Jacobs <forkjake at yahoo dot com>
- To: java at gcc dot gnu dot org
- Date: Mon, 3 Jun 2002 19:44:23 -0700 (PDT)
- Subject: Re: mingw32 JNI Problems
I took a look at past posts and found this info on
libltdl in regards to cross-compilers:
http://gcc.gnu.org/ml/java/2001-09/msg00075.html
According to the message thread, getting libltdl to
work with cross-compilers is not a trivial task. :-(
Darn it.
-Frank
--- Frank Jacobs <forkjake@yahoo.com> wrote:
> Date: Fri, 31 May 2002 18:53:14 -0700 (PDT)
> From: Frank Jacobs <forkjake@yahoo.com>
> Subject: Re: JNI Problems
> To: tromey@redhat.com
> CC: java@gcc.gnu.org
>
> > I thought libltdl worked fine on Windows. Is that
> > not the case?
>
> When I try to run a JNI application on Windows, I
> get:
>
> Exception in thread "main"
> java.lang.UnknownError:
> Runtime.loadLibrary not implemented
>
> I just did some research and found this in
> libjava/configure.in:
>
> # Only use libltdl for native builds.
> if test -z "${with_cross_host}"; then
> AC_LIBLTDL_CONVENIENCE
> AC_LIBTOOL_DLOPEN
> DIRLTDL=libltdl
> AC_DEFINE(USE_LTDL)
>
> I looks like libltdl isn't supported with cross
> compilers. I wonder if there is any way around this?
>
> :-) Frank
>
> --- Tom Tromey <tromey@redhat.com> wrote:
> > >>>>> "Frank" == Frank Jacobs <forkjake@yahoo.com>
> > writes:
> >
> > Frank> AFAIK, JNI under Windows with GCJ is not
> > supported yet. If you
> > Frank> look at java/lang/natRuntime.cc, the
> support
> > for loading
> > Frank> libraries for Windows is turned off.
> >
> > Frank> Lately, I've been thinking about how hard
> it
> > would be to
> > Frank> implement this... My initial (naive)
> thought
> > is that it
> > Frank> wouldn't be that hard. The Windows API call
> > LoadLibrary should
> > Frank> do it for us.
> >
> > I thought libltdl worked fine on Windows. Is that
> > not the case?
> >
> > The `!WIN32' code in Runtime::_load has to do not
> > with mangling the
> > library name on Windows.
> >
> > Kailas, how did you compile your program?
> > Did you remember to use `-fjni'? (I assume so.)
> > Does your program try to load the library
> containing
> > the JNI code?
> >
> > Tom
>
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com