更新时间:2023-01-14 22:46:01
我通常会拍拍hs in
I normally set paths in
~/.bashrc
但对于Java,我按照
的说明 https://askubuntu.com/questions/55848/how-do-i-install-oracle-java-jdk-7
However for Java, I followed instructions at https://askubuntu.com/questions/55848/how-do-i-install-oracle-java-jdk-7
这对我来说已足够了。
您还可以定义多个java_home并且只有其中一个有效(其余的已注释)。
you can also define multiple java_home's and have only one of them active (rest commented).
假设在你的bashrc文件中,你有
suppose in your bashrc file, you have
export JAVA_HOME = ...... jdk1.7
#export JAVA_HOME = ...... jdk1.8
通知1.8被评论。一旦你做了
notice 1.8 is commented. Once you do
source~ / .bashrc
jdk1.7将在路径中。
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.