0

Recently I used the jenv VERSION control tool in Ubuntu16LTS. This is probably the first time I have used this tool. Once installed, I can switch versions using jenv local VERSION, but jenv global VERSION does not seem to work. How to solve it?

in the first terminal window:

zx@zx-virtual-machine:~$ jenv versions
  system
  11
* 12 (set by /home/zx/.java-version)
  openjdk64-11
  openjdk64-12

zx@zx-virtual-machine:~$ jenv version
12 (set by /home/zx/.java-version)

zx@zx-virtual-machine:~$ jenv global 11

then,i close the first terminal window,and open another teminal windows:

zx@zx-virtual-machine:~$ jenv version
12 (set by /home/zx/.java-version)

so,it didn't work for me.How to solve the problem?

1 Answers1

0

1.Set the jdk version for a specific directory. The priority is greater than global. If the local version of the current directory is specified, the local version prevails and the global version is ignored.

2.You can understand the difference between "jenv local" and "jenv global" by going to ubuntu's home"~" and root directory "/" and looking at "jenv version"