How to determine JAVA_HOME on Debian/Ubuntu?
Posted
by Witek
on Server Fault
See other posts from Server Fault
or by Witek
Published on 2010-05-20T15:09:42Z
Indexed on
2010/05/20
15:11 UTC
Read the original article
Hit count: 227
On Ubuntu it is possible to have multiple JVMs at the same time. The default one is selected with update-alternatives
. But this does not set the JAVA_HOME
environment variable, due to a debian policy.
I am writing a launcher script (bash), which starts a java application. This java application needs the JAVA_HOME
environment variable. So how to get the path of the JVM which is currently selected by update-alternatives
?
© Server Fault or respective owner