[Live-demo] Where should JAVA_HOME be set (if overriding default=openjdk 1.7)?
edgar.soldin at web.de
edgar.soldin at web.de
Thu Jan 12 13:42:16 PST 2012
On 12.01.2012 22:06, Hamish wrote:
> 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.
>
>
we should also take care that the default java binary in path points to the new default. this is how openjump finds its jdk. does /etc/alternatives/java point to openjdk7?
easiest solution i see is: as all projects set up symlinks in /usr/bin they can as well put a wrapper script there instead which fixes the environment (JAVA_HOME,PATH) and runs the launcher.
..ede
More information about the Osgeolive
mailing list