Please add a "print" feature to java-config. The parameter to the "print" option would be the ID of one of the installed JVMs. The output should be something like this: JAVA_HOME=/opt/sun-jdk.... ... This way, the output can be eval'ed into scripts setting up an appropriate environment to run a program under a specific JVM. For example, I could setup my system to use 1.4.2_02 as default, but specific programs could use 1.3.
I'll add this to the next release of java-config. Idea for fixing it is to generate an env.d entry and output it to stdout.
This has been added to the main branch of java-config. I need to test the code bit more then it'll be release as a hardmasked version.
In portage versions 1.1.8 and 1.2.0 .
I lied, --print is only in 1.2.0, is uses a lot of new code, so it might be unstable.
The man page was updated to have this, but java-config --help doesnt lists it (Using 1.2.1).
It works for me. --- jmob@shamash [jmob] $ ACCEPT_KEYWORDS=~x86 sudo emerge "=java-config-1.2.1" Calculating dependencies ...done! >>> emerge (1 of 1) dev-java/java-config-1.2.1 to / [...] >>> dev-java/java-config-1.2.1 merged. [...] jmob@shamash [jmob] $ java-config --help Usage: java-config [ OPTIONS ] Options: [...] << -L --list-available-vms >> List all available virtual machines << -P arg1[,arg2,...] --print=arg1[,arg2,...] >> Print the environment information for a specified VM << -S argument --set-system-vm=argument >> Set the VM for the entire system [...]
This is in the 1.2.x series, which is at version 1.2.4 right, which is in x86.