"how to set java_home path on ubuntu? [closed]" Code Answer

5

i normally set paths in

~/.bashrc

however for java, i followed instructions at https://askubuntu.com/questions/55848/how-do-i-install-oracle-java-jdk-7

and it was sufficient for me.

you can also define multiple java_home's and have only one of them active (rest commented).

suppose in your bashrc file, you have

export java_home=......jdk1.7

#export java_home=......jdk1.8

notice 1.8 is commented. once you do

source ~/.bashrc

jdk1.7 will be in path.

you can switch them fairly easily this way. there are other more permanent solutions too. the link i posted has that info.

By samblake on July 10 2022

Answers related to “how to set java_home path on ubuntu? [closed]”

Only authorized users can answer the Search term. Please sign in first, or register a free account.