Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

HP-UX JNI problem

16 views
Skip to first unread message

jimw...@my-dejanews.com

unread,
Mar 25, 1999, 3:00:00 AM3/25/99
to
I am using HP-UX 10.20 and Java 1.1.7. I'm trying to get a simple JNI hello
world example working, but have run into problems finding the loadable
library. The name of my library is libNative.so. I used System.loadLibrary
("Native") to load the library. I also set my LD_LIBRARY_PATH environment
variable to point to the directory where the libNative.so file resides. The
error I get is as follows:

java.lang.UnsatisfiedLinkError: no Native in shared library path
at java.lang.Runtime.loadLibrary(Compiled Code)
at java.lang.System.loadLibrary(System.java)
at Main.main(Main.java:3)

I'm not sure what else to try at this point. Any help is appreciated.

Thanx,
Jim

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

Gabson Joh(KITECH)

unread,
Mar 26, 1999, 3:00:00 AM3/26/99
to
I guess...
You must change System.loadLibrary("Native") to
System.loadLibrary("libNative")

<jimw...@my-dejanews.com>이(가) 아래 메시지를
news:7ddl7j$if9$1...@nnrp1.dejanews.com에 게시하였습니다.

Bob Hays, Computer Geek

unread,
Mar 26, 1999, 3:00:00 AM3/26/99
to
On Thu, 25 Mar 1999 15:37:24 GMT, jimw...@my-dejanews.com wrote:

>I am using HP-UX 10.20 and Java 1.1.7. I'm trying to get a simple JNI hello
>world example working, but have run into problems finding the loadable
>library. The name of my library is libNative.so. I used System.loadLibrary
>("Native") to load the library. I also set my LD_LIBRARY_PATH environment
>variable to point to the directory where the libNative.so file resides. The
>error I get is as follows:
>
>java.lang.UnsatisfiedLinkError: no Native in shared library path
> at java.lang.Runtime.loadLibrary(Compiled Code)
> at java.lang.System.loadLibrary(System.java)
> at Main.main(Main.java:3)
>
>I'm not sure what else to try at this point. Any help is appreciated.

I think you may have more success using SHLIB_PATH instead of
LD_LIBRARY_PATH. Ultimately, you end up in libdld.sl whether you like
it or not, and you will need SHLIB_PATH I think. Also, should the
extension be .so or .sl?

Basically, you need the default setup for any HP-UX binary, not what
the docs say - they are documentation for Solaris and Windows, and
HP-UX has its own way of doing things (darn it).

Good luck and have fun! - Bob

--
I did not ask for the anal probe. -- Passion Fish
Discipline is never an end in itself, only a means to an end. - King Crimson
Whoever flees history will be pursued by history. - Janusz Korczak
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS d+(-)@ s+:+ a C++(+++)$ U$ P+$ L@ E+++$ W+++$ N++ !o-- K--? w$ !O M$ V@
PS+ PE !Y+ PGP t !5-- !X !R tv+ b++() DI+ !D- G-- e++ h--- r+++ y+++**
------END GEEK CODE BLOCK------
rh...@interaccess.com (home) http://homepage.interaccess.com/~rhays
Bob....@abnamro.com (work)

0 new messages