[Live-demo] Where should JAVA_HOME be set (if overriding default=openjdk 1.7)?

Hamish hamish_b at yahoo.com
Thu Jan 12 13:06:34 PST 2012


Cameron wrote:
> My question is how we should applications which
> wish to continue using java-6-sun update JAVA_HOME?

on their command lines (e.g. in *.desktop Exec= lines)
run like:

VARIABLE=foo program_name

I'm a little doubtful that shell-like commands will
work there, but it is worth a try. otherwise we'll
need wrapper scripts for them which set and export
the variable first. :-/


> * Where in the startup / install scripts should
> we be inserting a line which sets the JAVA_HOME
> variable?

it is set in /etc/profile.d/ by bin/install_java.sh

there was an earlier attempt to also put it into
/etc/rc.local but that won't work, because the
script is not sourced, it's run and so the enviro
variable will not propagate back to the partent
process.  I've just dropped that.


Hamish


ps- just add to install_java.sh, no need for a new
install_openjdk.sh script.



More information about the Osgeolive mailing list