Mr. Butterworth Mr. Butterworth - 1 year ago 92
Java Question

linux - $JAVA_HOME

New to

Linux ubuntu

sudo update-alternatives --config java

returns "There is only one alternative in link group java (providing

Really I just wanna set the $JAVA_HOME because I think I'll use it later.

I think i have to copy (as in Ctrl+c) "
" and set it as the
but not sure if that's correct because of the "providing" statement mentioned above. I'm not sure what "providing" means. :(

also, how do I copy (Ctrl+c) the returned folder address?

Thanks in advance :)

Answer Source

You do not need to set JAVA_HOME unless you want to ensure that a specific Java is the one you use. In your case, you only have one specific Java installed.

That said, if you really want to configure this, add the following lines to your ~/.bashrc file

export JAVA_HOME

If you are going to go this route, I suggest also adding to your PATH

export PATH

somewhere below the JAVA_HOME lines detailed above.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download