/usr/bin/jython, which is a wrapper script, does not take into consideration LD_LIBRARY_PATH when setting java.library.path. if you have a jar that uses JNI one needs to point at the corresponding library. LD_LIBRARY_PATH seems the logical way to do this. Reproducible: Always Portage 2.1.1-r2 (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.4-r4, 2.6.18-gentoo-r4 x86_64) ================================================================= System uname: 2.6.18-gentoo-r4 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ Gentoo Base System version 1.12.6 Last Sync: Mon, 11 Dec 2006 21:20:01 +0000 distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] app-admin/eselect-compiler: [Not Present] dev-java/java-config: 1.3.7, 2.0.30 dev-lang/python: 2.4.3-r4 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.60 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.14 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=athlon64 -O2 -msse3 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c" CXXFLAGS="-march=athlon64 -O2 -msse3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distcc distlocks fixpackages metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="ftp://gentoo.llarian.net/pub/gentoo http://gentoo.llarian.net/ http://gentoo.arcticnetwork.ca/" LINGUAS="en ja" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="amd64 X Xaw3d a52 aac aalib acpi aim alsa ao apache2 audiofile bash-completion bcmath bidi browserplugin bzip2 cairo calendar canna caps cddb cdparanoia cdr cjk cracklib crypt cscope ctype cups curl curlwrappers dbus dio dlloader doc dts dv dvb dvd dvdr dvdread elibc_glibc emacs emacs-w3 encode enscript examples exif ffmpeg fftw firefox flac flash foomaticdb fortran gb gcj gd gdbm geoip gif gimp ginac glut gmp gnutls gphoto2 graphviz gstreamer gtk gtk2 gtkhtml hal icq ieee1394 imagemagick imap imlib input_devices_keyboard input_devices_mouse ipod ipv6 jabber jack java javascript jbig jikes jpeg jpeg2k junit jython kernel_linux ladcca ladspa lapack lash lcms libcaca libedit libgda libnotify libsamplerate libwww linguas_en linguas_ja live lm_sensors logrotate lua m17n-lib mad matroska mbox mcal mikmod mime ming mmap mng motif mp3 mpeg mplayer msn musepack nas ncurses neXt netcdf nls nptl nptlonly nsplugin nvidia objc ocaml ofx ogg openal openexr opengl osc oscar oss pam pcntl pcre pda pdf perl php plotutils png portaudio posix ppds prelude python quicktime rdesktop readline recode ruby sasl scanner screen sdl sharedmem shorten skey smp sndfile soap sockets sox speex spell spl ssl stream svg tcl tetex theora threads tidy tiff tk truetype unicode usb userland_GNU vcd video_cards_nv video_cards_nvidia video_cards_vesa video_cards_vga videos vim-syntax vorbis wmf x264 xface xine xinetd xml xosd xpm xprint xsl xv xvid xvmc yahoo zlib" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
would java-pkg_dolauncher not do this? java-pkg_dolauncher attempts to automatically generate -classpath and -Djava.library.path from a packages dependencies http://www.gentoo.org/proj/en/java/java-devel.xml might help explain how it works.
(In reply to comment #0) > /usr/bin/jython, which is a wrapper script, does not take into consideration > LD_LIBRARY_PATH when setting java.library.path. if you have a jar that uses > JNI one needs to point at the corresponding library. LD_LIBRARY_PATH seems the > logical way to do this. > Our wrapper system is designed to work with stuff installed from ebuilds. It will automatically put all jni stuff from dependencies to java.library.path. See /usr/share/java-config-2/launcher/launcher.bash for details. If you want to add some custom stuff just modify: gjl_user_env="${HOME}/.gentoo/java-config-2/launcher.d/${gjl_package}" gjl_system_env="/etc/java-config-2/launcher.d/${gjl_package}" We should write some documents about this but we will hopefully have a GSoC project that will provide a GUI for setting these settings. Please reopen if you still think there is an issue here. This is how for example azureus wrapper works: betelgeuse@pena ~ $ GJL_DEBUG=1 azureus using /home/betelgeuse/.azureus/gentoo.config Calling: gjl --package azureus --get-args --get-vm Using: Running: exec java -classpath .:/usr/share/bcprov/lib/bcprov.jar:/usr/share/commons-logging/lib/commons-logging.jar:/usr/share/swt-3/lib/swt.jar:/usr/share/junit/lib/junit.jar:/usr/share/sun-jaf/lib/activation.jar:/usr/share/log4j/lib/log4j.jar:/usr/share/commons-lang/lib/commons-lang.jar:/usr/share/sun-javamail/lib/mail.jar:/usr/share/azureus/lib/Azureus2.jar:/usr/share/commons-cli-1/lib/commons-cli.jar -Djava.library.path=/usr/lib -Dazureus.install.path=/home/betelgeuse/.azureus/ org.gudy.azureus2.ui.common.Main --ui=swt
Wrong resolution. OOPS.
Works for me.