[518] in java-interest

home help back first fref pref prev next nref lref last post

Re: Question about loading libraries

daemon@ATHENA.MIT.EDU (Jason Weiler)
Tue Jun 27 16:08:54 1995

Date: Tue, 27 Jun 1995 11:12:28 -0700
From: weilerj@std.teradyne.com (Jason Weiler)
To: java-interest@java.sun.com, yuri@cee.hw.ac.uk

> 
> Hi Java Team
> 
> A question about loading libraries:
> 
> o The only place where libawt.so is explicitly loaded is in WServer.run()
> libawt.so is calling routines in libXm, libXt, libX11. Does it load
> them all automatically? In my case, my native library is referring to
> some X-calls, and java complains at run time about inablility to find,
> say, XFlush(), even if LD_LIBRARY_PATH includes /usr/openwin/lib, where
> libX11.so resides, and I explicitly call 
> 	Linker.loadLibrary("X11");
> 	
> How does libawt deals with XFlush()? It has references to this routine.
> 
> Thanks for your time,
> 
> Yuri
> 
> 

Well, I'm not the Java team, but I've run into similar problems.
The only library I've ever had to explicitly load from Java has been 
the one that contains my native methods.  However, I have also had to 
load some non-standard ones that my native methods depend on. All I have 
to do is link those libraries with my c-code using the -R option. (in order
to save the path of the linked library)

> o Where are execute_method() and other routines of this type? Doesn't 
> seem to be in the libraries supplied with hotjava distribution. Should
> I link something special?

These routines aren't in those libraries. They're a part of the java 
executible.

I ran into that problem because I'm using C++ and Java. If that's the case
for you too, be sure you're using  'extern "C" { }' correctly.

Hope this helps.
Jason Weiler
<weilerj@std.teradyne.com>
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post