When running the java-config utility for setting the user specific CLASSPATH it only generates files for bash/sh compatible shells in the user $HOME/.gentoo directory. It does not generate the files which can be included in tcsh/csh compatible shells. Reproducible: Always Steps to Reproduce: 1. Run any of the user specific CLASSPATH commands (--set-user-classpath, --append-user-classpath, etc.) passing in the desired packages. 2. Inspect the .gentoo directory contents 3. Only java-env, java-env-classpath are created Actual Results: Could not source the generated files to include in my environment using tcsh Expected Results: Created java-env.csh and java-env-classpath.csh (assuming that is what these files are to be named) I am currently using the latest java-config. * dev-java/java-config Latest version available: 1.2.6 Latest version installed: 1.2.6 Size of downloaded files: 12 kB Homepage: http://www.gentoo.org/ Description: Java enviroment configuration tool License: GPL-2
Created attachment 28366 [details, diff] patch for jc_options to add this functionality This is my first attempt at programming python and making a patch, so use if you want. It is working on my system using tcsh, and seems to be generating the correct bash files.
I'll try to integrate this a bit later, the current patch is a little to much of a hacker solution (no offense), some abstraction of the process of setting a user CLASSPATH would be better -- if you have time feel free to submit another patch otherwise I'll work on it later.
I'll implement this in version 1.3.x of java-config, which will be a partial re-write.
An other issue that would be nice to see in java-config 1.3.x is, that I don't have to add some code to my .bashrc by myself. Without setting this, the stuff of --set-user-* never works. Or am I missing something?
No having to add something to your .bashrc would be tricky, since have java-config edit a user's .bashrc, looking for the java-config stuff might a good thing to add to some other part of the infrastructure. I'll have to do some research to figure what'd be the best place.
A more coherent version: Not having to add something to your .{c,ba}shrc would be tricky, since it would be bad idea to have java-config edit a user's .bashrc. Ideally some part of base system infrastructure should look for java-config's $HOME/.gentoo files and try to source them. I'll have to do some research to figure out exactly how to do this.
did someone forgot to mark this as FIXED?
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) i'm sure tcsh can do the same