23.08.22, 15:49 +0200, Amn:
Thank you for your prompt response. Adding Java to the $PATH variable requires me to know the location where Java was installed, which I don't know. Is there a way to find out where Java was installed?
As Tomas wrote, the more interesting question than *how* to set JAVA_HOME, is *why* you want to set it in the first place.
That said, on Linux package managers often install JVMs in a subdirectory of /usr/lib/jvm. To find out what the java binary in your PATH thinks about where it's home is, you can do, for example
java -XshowSettings:properties -version 2>&1 > /dev/null | grep 'java.home' On debian update-alternatives --display java should show you the Java installations the system knows about.And, of course, a tool like dpkg could be used to show which files are installed by the package manager...
-- Regards mks