Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 95476 - Per application based java settings support
Summary: Per application based java settings support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords: InVCS
Depends on: 127816
Blocks:
  Show dependency tree
 
Reported: 2005-06-08 10:48 UTC by Peter Fischer
Modified: 2006-06-30 19:45 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Fischer 2005-06-08 10:48:23 UTC
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/)
Comment 1 Saleem Abdulrasool (RETIRED) gentoo-dev 2005-06-09 21:49:41 UTC
Ill have to think about this, although, I highly doubt that this will be done in
the next release.
Comment 2 Chris Aniszczyk (RETIRED) gentoo-dev 2005-06-10 07:46:21 UTC
I'd vouch for this, I think this would be somewhat useful... my only worry is
maintence.
Comment 3 Thomas Matthijs (RETIRED) gentoo-dev 2005-09-11 07:01:47 UTC
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
Comment 4 Thomas Matthijs (RETIRED) gentoo-dev 2005-09-11 07:03:04 UTC
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

Comment 5 Josh Nichols (RETIRED) gentoo-dev 2006-06-30 19:45:56 UTC
This is found in the new Java system. Marking fixed.