discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to include libjvm.so in the framework


From: Nicola Pero
Subject: Re: How to include libjvm.so in the framework
Date: Mon, 10 Sep 2001 13:18:55 +0100 (BST)

> Hi,
> 
> I want to include libjvm.so in the GNU frameworkn(probably in the .preamble
> file) to load JNI classes . Does anybody had information on including .so
> files inside the GNU framework...

Hi,

it should quite easy, you just want to link against those libraries, so
you have to add something like

ADDITIONAL_OBJC_LIBS += -ljava -ljvm ...
ADDITIONAL_LIB_DIRS += -L/usr/local/java/jre/lib/i386/ ...

be warned that you will need to also modify LD_LIBRARY_PATH or
/etc/ld.so.conf to run the application because the java libraries are not
normally in the linker path.

but if you want to access Java from Objective-C, you might be interested
in JIGS :-)

Btw, even if you don't use JIGS engine to access Java (which I would
recommend), JIGS contains makefiles to compile ObjC stuff which links
against libjvm, so perhaps instead of writing your own makefiles, you can
use those (and contribute fixes/patches/improvements so that we share
them!).  Have a look in java/Makefiles/README.  Those makefiles work using
a setup script so that you don't have to touch manually LD_LIBRARY_PATH or
stuff, you just run the setup script and include the jigs.make makefile
and everything should work out-of-the-box.  (If you use a JVM other than
Sun's, it is likely you need to modify the makefiles to use the correct
paths for your JVM, that shouldn't be too difficult and if you do please
contribute the patches supporting your different JVM as that would be
appreciated).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]