When I run java-config (1.2.6) I get a .gentoo/java-env which looks for .gentoo/java-env-classpath, but never looks for .gentoo/java, which appears to be where all the environment pieces are set. The docs claim that java-env is the thing to source from shell-startup. Reproducible: Always Steps to Reproduce: 1. java-config --set-user-vm [foo] 2. look in $HOME/.gentoo/java-env 3. note no environment variables set 4. note no reference to .gentoo/java Actual Results: The nazis arrived and carried me away. Expected Results: It should have added something like: if [ -f $HOME/.gentoo/java ] ; then . $HOME/.gentoo/java fi Portage 2.0.50-r5 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.6.3-gentoo-r1) ================================================================= System uname: 2.6.3-gentoo-r1 i686 Intel(R) Pentium(R) 4 CPU 1.80GHz Gentoo Base System version 1.4.3.13 distcc 2.13 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] Autoconf: sys-devel/autoconf-2.58-r1 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O2 -mcpu=i686 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /etc/tomcat /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -mcpu=i686 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://open-systems.ufl.edu/mirrors/gentoo ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync2.us.gentoo.org/gentoo-portage" USE="X alsa apm arts avi berkdb bonobo crypt cups encode esd foomaticdb gdbm gif gnome gpm gtk gtk2 guile imlib java jpeg kde ldap libg++ libwww mad mikmod motif mozilla mpeg mysql ncurses nls oggvorbis opengl oss pam pdflib perl png postgres python qt quicktime readline sdl slang spell ssl svga tcltk tcpd truetype x86 xml2 xmms xv zlib"
Fix is in CVS, new java-config release in a few days.
Fixed in 1.2.7 .
I am using 1.2.10 and this bug is not fixed. The following are 2 scenarios that is happening if starting from scratch: Scenario 1: 1) User wants to use system vm so don't set user vm. 2) User sets his user classpath to include commons-logging. Result -> java-config creates .gentoo/java-env-classpath -> java-config creates .gentoo/java-env Contents of java-config sources .gentoo/java. Summary: The classpath never get sourced. Scenario 2: 1) User sets own vm. Result -> java-config creates .gentoo/java-env -> java-config creates .gentoo/java -> java-config creates source scripts for csh. 2) User sets commons-logging in his user path. Result -> java-config creates .gentoo/java-env-classpath Contents of java-config sources .gentoo/java Summary: Seeing that both .gentoo/java and .gentoo/java-env contain a reference to java-env-classpath, the classpath do not get set. Solution: Source java-env-classpath from java-env.
Typo: For scenario 1 it is the contents of java-env which sources and not java-config.
setting a user and system classpath though java-config will be deprecated in the next version if you want todo this put something like: export CLASSPATH="${CLASSPATH}:$(java-config -p pkg1,pkh2)" in your .profile (if using bash)