1

More than once I've had to go into apt to remove JDK > 8 because, at least for the moment, umake installs Netbeans 8 which only runs on JDK 8.

I only need JDK 8 for Netbeans, and that temporarily until umake install NB 9. That being said, how can I get the system to stay at JDK 8 (and maybe even JVM 8?) in concert with SDKMAN?

Or, fundamentally, are these different systems -- Java versioning specific to a user account for SDKMAN versus the system configuration?

thufir@dur:~$ 
thufir@dur:~$ javac -version
javac 11.0.1
thufir@dur:~$ 
thufir@dur:~$ sdk ls java
================================================================================
Available Java Versions
================================================================================
     12.ea.20-open                                                              
     11.0.1-zulu                                                                
     11.0.1-open                                                                
     10.0.2-zulu                                                                
     10.0.2-open                                                                
     9.0.7-zulu                                                                 
     9.0.4-open                                                                 
   * 8.0.192-zulu                                                               
     8.0.191-oracle                                                             
     7.0.201-zulu                                                               
     6.0.119-zulu                                                               
     1.0.0-rc-10-grl                                                            
     1.0.0-rc-9-grl                                                             
     1.0.0-rc-8-grl                                                             


================================================================================
+ - local version
* - installed
> - currently in use
================================================================================
thufir@dur:~$ 

Not sure what happened to JDK 8:

thufir@dur:~$ 
thufir@dur:~$ java -version
openjdk version "11.0.1" 2018-10-16
OpenJDK Runtime Environment (build 11.0.1+13-Ubuntu-2ubuntu1)
OpenJDK 64-Bit Server VM (build 11.0.1+13-Ubuntu-2ubuntu1, mixed mode, sharing)
thufir@dur:~$ 

fixed for now:

thufir@dur:~$ 
thufir@dur:~$ sudo update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                            Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      auto mode
  1            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      manual mode
* 2            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manual mode

Press <enter> to keep the current choice[*], or type selection number: 2
thufir@dur:~$ 
thufir@dur:~$ sudo update-alternatives --config javac
There are 2 choices for the alternative javac (providing /usr/bin/javac).

  Selection    Path                                          Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-11-openjdk-amd64/bin/javac   1111      auto mode
  1            /usr/lib/jvm/java-11-openjdk-amd64/bin/javac   1111      manual mode
* 2            /usr/lib/jvm/java-8-openjdk-amd64/bin/javac    1081      manual mode

Press <enter> to keep the current choice[*], or type selection number: 2
thufir@dur:~$ 
thufir@dur:~$ java -version
openjdk version "1.8.0_191"
OpenJDK Runtime Environment (build 1.8.0_191-8u191-b12-0ubuntu0.18.10.1-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)
thufir@dur:~$ 
thufir@dur:~$ javac -version
javac 1.8.0_191
thufir@dur:~$ 

but it's getting repetitive.

Thufir
  • 4,551

0 Answers0