> 1. Only one way to configure default Java globally.
> 2. Support for overriding the default Java for a user.
> 3. Support for overriding the Java version used for an application globally.
> 4. Support for overriding the Java version used for an application for a user.
> 5. Mechanism on (1) should preset JAVA_HOME globally.
> 6. Mechanism on (2) should preset JAVA_HOME for a user.

1. If you point /etc/jvm at /usr and /usr only by default, then by
default update-java-alternatives takes effect. The list of default stuff
in /etc/jvm is old and poorly thought out anyways. I guess my hope with
this file was to make it point to only two things: gcj and Sun. Period.
Ask gcj tended to be our "official" "good-enough" Java implementation
(it was most likely to work given all our choices). Sun's would not be
used unless the user changed the order. (Sun's is non-free, and we
cannot rely on it being installed, ever, except for other non-free
stuff. It is better to pretend it does not exist. (OpenJDK??))

2. ~/.jvm already exists.

3. /etc/jvm.d

4. ~/.jvm.d

5. Well, not sure how you're going to manage this. You'll need it as
part of the login path. So, what, take the first entry out of /etc/jvm
and set it in /etc/environment, using some script? Since /etc/jvm
doesn't require a script to be used to alter it, that's not going to
work. Guess writing that code in /etc/profile to set it up might work.
Not sure how you're going to edit that file in any suitable automated
way. Also this file isn't even used by the Gnome or KDE login sessions
is it? Yeah, I think I found the only reliable way to properly set an
environmental variable at login was /etc/environment, as it's done by
PAM.

6. Same problems exist.

To conclude, I think everything except (5) and (6) work now, with the
exceptions that a) Eclipse is broken and b) /etc/jvm is stale. I think
(5) and (6) are going to be hard to accomplish. I've hit this same issue
and arrived at the conclusion that at least for now, making the user set
JAVA_HOME manually has been the best (only) possibility.

-- 
Eclipse uses /etc/eclipse/java_home instead of java-common scripts
https://bugs.launchpad.net/bugs/45347
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to