Operating System - HP-UX
1833763 Members
2748 Online
110063 Solutions
New Discussion

HP/UX jre throws UnsatisfiedLinkError (tar.gz distribution)

 
SOLVED
Go to solution
Andrew_201
New Member

HP/UX jre throws UnsatisfiedLinkError (tar.gz distribution)

hi,

i've downloaded the HP/UX jre in its tar.gz form (ie not the .depot). My intention is to put it on the root of a CD with a java app so that the java app. can be run on HP/UX machines without a jre installed.

The two issues I'm aware of are
1) permissions (HP/UX is apparently sensitive to permissions on shared objects)
2) LD_LIBRARY_PATH needs setting in a script before the java binary is invoked

I've done both of these - setting LD_LIBRARY_PATH by doing
setenv LD_LIBRARY_PATH /home/asjf/work/rte14_14202_1100.tar/jre/lib/PA_RISC/:/home/asjf/work/rte14_14202_1100.tar/jre/lib/PA_RISC/server/:/home/asjf/work/rte14_14202_1100.tar/jre/lib/PA_RISC/motif21/:$LD_LIBRARY_PATH
and performing a "chmod -R 777 *" in the root directory. So all files in the distribution now have global read, write and execute access. I'm testing the idea out in my home directory (the untarred directory is confusingly called "rte14_14202_1100.tar").

The problem is that when I run a simple graphical application (console-only apps. work fine) I get the following exception:
Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp_mnt/home/asjf/work/rte14_14202_1100.tar/jre/lib/PA_RISC2.0/libfontmanager.sl: specified library, or one of its dependencies, does not exist. at
java.lang.ClassLoader$NativeLibrary.load(Native Method) at
java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1585) at
java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at
java.lang.Runtime.loadLibrary0(Runtime.java:788) at
java.lang.System.loadLibrary(System.java:834) at
sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50) at
java.security.AccessController.doPrivileged(Native Method) at
sun.awt.font.NativeFontWrapper.(NativeFontWrapper.java:57) at
sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) at
sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:134) at
java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62) at sun.awt.motif.MToolkit.(MToolkit.java:82) at
java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at
java.awt.Toolkit$2.run(Toolkit.java:748) at
java.security.AccessController.doPrivileged(Native Method) at
java.awt.Toolkit.getDefaultToolkit(Toolkit.java:739) at
javax.swing.ImageIcon.(ImageIcon.java:119) at
javax.swing.ImageIcon.(ImageIcon.java:138) at LayerTest.main
(LayerTest.java:12)

does anyone have any idea what else might need setting up to have this function correctly?

does swinstall do anything to the .depot file distribution that might need doing to the unzipped version?

any help appreciated,
thanks,
asjf
3 REPLIES 3
G. Vrijhoeven
Honored Contributor
Solution

Re: HP/UX jre throws UnsatisfiedLinkError (tar.gz distribution)

Hi asjf,

You could check the patch req. there might be a patch that solves your problem. Check:

http://www.hp.com/products1/unix/java/patches/index.html

HTH,

Gideon
Andrew_201
New Member

Re: HP/UX jre throws UnsatisfiedLinkError (tar.gz distribution)

hi,

thanks - i've found what the problem was now (?). If I set SHLIB_PATH instead of LD_LIBRARY_PATH then it all works ok. If this really is the correct thing to be doing then is it documented anywhere? (I couldn't find it in the readme etc..)

thanks,
asjf
ranganath ramachandra
Esteemed Contributor

Re: HP/UX jre throws UnsatisfiedLinkError (tar.gz distribution)

you probably have a very old 32-bit dynamic loader that does not support LD_LIBRARY_PATH and supports only SHLIB_PATH. i think the support for LD_LIBRARY_PATH was available only on the 64-bit loader. the 32-bit loader in the recent patches (starting PHSS_20014) has been supporting LD_LIBRARY_PATH.
 
--
ranga
hp-ux 11i v3[i work for hpe]

Accept or Kudo