Voglio avere diverse versioni Java sulla mia macchina. Ho installato jenv per questo motivo. Tuttavia, non posso impostare la versione Java desiderata su di esso. In realtà non è possibile impostare alcuna versione.
Ho installato Java 8 e 11. Voglio impostare Java 8 come globale.
Ecco snippet cosa ho provato:
sdos-MacBook-Pro:~ nazar$ ls -la /Library/Java/JavaVirtualMachines
total 0
drwxr-xr-x 4 root wheel 128 Nov 28 16:58 .
drwxr-xr-x 5 root wheel 160 Nov 19 19:41 ..
drwxr-xr-x 3 root wheel 96 Nov 19 12:04 jdk1.8.0_192.jdk
drwxr-xr-x@ 3 nazar staff 96 Oct 6 15:25 openjdk-11.0.1.jdk
sdos-MacBook-Pro:~ nazar$ jenv versions
* system (set by /Users/nazar/.jenv/version)
sdos-MacBook-Pro:~ nazar$ jenv add /Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/
ln: /Users/nazar/.jenv/versions/oracle64-1.8.0.192: No such file or directory
sdos-MacBook-Pro:~ nazar$ ls -lg /Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/
total 52224
-r--r--r-- 1 wheel 3244 Oct 6 19:57 COPYRIGHT
-r--r--r-- 1 wheel 40 Oct 6 19:57 LICENSE
-r--r--r-- 1 wheel 159 Oct 6 19:57 README.html
-rw-r--r-- 1 wheel 108062 Sep 12 12:20 THIRDPARTYLICENSEREADME-JAVAFX.txt
-r--r--r-- 1 wheel 155003 Oct 6 19:57 THIRDPARTYLICENSEREADME.txt
drwxr-xr-x 46 wheel 1472 Oct 6 20:01 bin
drwxr-xr-x 3 wheel 96 Nov 19 12:04 bundle
drwxr-xr-x 9 wheel 288 Oct 6 19:57 include
-rw-r--r-- 1 wheel 5207430 Sep 12 12:20 javafx-src.zip
drwxr-xr-x 10 wheel 320 Oct 6 19:58 jre
drwxr-xr-x 14 wheel 448 Oct 6 19:58 lib
drwxr-xr-x 5 wheel 160 Oct 6 19:57 man
-rw-r--r-- 1 wheel 427 Oct 6 19:57 release
-rw-r--r-- 1 wheel 21242800 Oct 6 19:57 src.zip
sdos-MacBook-Pro:~ nazar$ java -version
openjdk version "11.0.1" 2018-10-16
OpenJDK Runtime Environment 18.9 (build 11.0.1+13)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.1+13, mixed mode)
Non riesco a capire cosa ci sia mancato lì.
Come impostare Java 8 con jenv
?