I did a little debugging on my FreeBSD box, and the rpath values do get built into the test binary and are used for the libraries explicitly linked into the executable. Dependencies requested by those shlibs don't use the rpath, though. I don't know if this is expected behaviour or not. If the executable's rpath should apply to second-level dependencies, it's a runtime linker bug. If they aren't, it's a bug in the jvm libraries because they don't specifiy their own rpath. Or are you supposed to always set LD_LIBRARY_PATH when running stuff linked with java libraries?
$ objdump -p conftest | grep RPATH RPATH /usr/local/jdk1.4.2/jre/lib/i386:/usr/local/jdk1.4.2/jre/lib/i386/ native_threads:/usr/local/jdk1.4.2/jre/lib/i386/server:/usr/local/ jdk1.4.2/jre/l ib/i386/client:/usr/tmp/pike/build/freebsd-5.2-current-i386/bundles/ lib:/usr/loc al/lib:/usr/X11R6/lib $ ldd -a conftest /tmp/conftest: libzip.so => /usr/local/jdk1.4.2/jre/lib/i386/libzip.so (0x2807b000) libjava.so => /usr/local/jdk1.4.2/jre/lib/i386/libjava.so (0x28093000)
Hum... Did you try with diablo-jdk ? It is more native than jdk-1.4.2 ?
/Xavier -- Xavier Beaudouin - Unix System Administrator & Projects Leader. President of Kazar Organization : http://www.kazar.net/ Please visit http://caudium.net/, home of Caudium & Camas projects