The idea is to be able to diffentiate between different java-versions from commandline. If I write "$(java-config -J)" in a wrapper skript, I get a system-wide or user-wide default setting. What if I had several java environments and apps and some need a JDK (which is set to 1.4.2) and some need 1.5.* (which is a jre only)? If I could write "$(java-config -J sun-jre-bin-1.5 )" in an application wrapper and java-config would give me the best possible sun-jre-bin-1.5.* version installed on my system, I could run specific java apps with that specific vm version (and the wrapper even survives java minor revisions!), while not sacrificeing the stability of my system with insane defaults. As this could improve testing, too, I propose hereby to add the commandline option shown above to java-config. Reproducible: Always Steps to Reproduce: 1. zappa peter # java-config -J /opt/blackdown-jdk-1.4.2.01/bin/java 2. zappa peter # java-config -L [sun-jre-bin-1.5.0.03] "Sun JRE 1.5.0.03" (/etc/env.d/java/20sun-jre-bin-1.5.0.03) [blackdown-jre-1.4.2.01] "Blackdown JRE 1.4.2.01" (/etc/env.d/java/20blackdown-jre-1.4.2.01) [sun-jre-bin-1.4.2.08] "Sun JRE 1.4.2.08" (/etc/env.d/java/20sun-jre-bin-1.4.2.08) [blackdown-jdk-1.4.2.01] "Blackdown JDK 1.4.2.01" (/etc/env.d/java/20blackdown-jdk-1.4.2.01) * 3a. zappa peter # java-config -J sun-jre-bin-1.5.0.03 or better: 3b. zappa peter # java-config -J sun-jre-bin-1.5 Actual Results: Error: extraneous stuff on the command line Usage: java-config [ OPTIONS ] Options: << -h arg1[,arg2,...] --help=arg1[,arg2,...] >> List all command line options with --help , for command specific long help messages use --help=command (ex. --help=javac) or all long help messages with --help=* Expected Results: It should have printed: /opt/sun-jre-bin-1.5.0.03/bin/java I ran into this while trying to create an ebuild for SellersBestFriend (http://www.chromstein.de/sbf/)
Ill have to think about this, although, I highly doubt that this will be done in the next release.
I'd vouch for this, I think this would be somewhat useful... my only worry is maintence.
Just noticed this bug but java-config-2* that is part of a langer set of changes (coming to a tree near you sometime in the future) $ java-config --select-vm=sun-jdk-1.4 -J /opt/sun-jdk-1.4.2.09/bin/java $ java-config --select-vm=sun-jdk-1.5 -J /opt/sun-jdk-1.5.0.04/bin/java $ java-config --select-vm=blackdown-jdk -J /opt/blackdown-jdk-1.4.2.02/bin/java $ java-config --select-vm=blackdown-jdk -O /opt/blackdown-jdk-1.4.2.02 $ java-config --select-vm=ibm-jdk-1.4 -c /opt/sun-jdk-1.5.0.04/bin/javac
hmm ignore the bug in last one returning something from sun-jdk :P /me runs off to fix it $ java-config --select-vm=ibm-jdk-bin-1.4 -c /opt/ibm-jdk-bin-1.4.2/bin/javac
This is found in the new Java system. Marking fixed.