I tried to install Oracle SQL Developer. But my ubuntu has IBM ACE 11 Developer Edition installed, which makes me not able to use the IBM/java path to run the Oracle SQL Developer.
So I downloaded and installed JAVA SE 8 and set to use the new Java JDK by sudo update-alternatives -set java
Current at my user terminal even I have set to use the new Java JDK:
java version "1.8.0_271"
Java(TM) SE Runtime Environment (build 8.0.6.20 - pxa6480sr6fp20ifix-20210224_01(SR6 FP20+IJ30974))
IBM J9 VM (build 2.9, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20210223_466229 (JIT enabled, AOT enabled)
OpenJ9 - 5b31a42
OMR - 4eb8f5f
IBM - b7e48f4)
JCL - 20201119_01 based on Oracle jdk8u271-b0
$ which java
/opt/IBM/ace-11.0.0.12/common/jdk/jre/bin/java
I want to ask what could be the setting that cause my user terminal java -version is still the java installed via the installation of ACE 11? Is it some IBM ACE 11 setting that makes the java -version different from root terminal even I have run the update-alternatives -set java? And cause my sqldeveloper not able to start at my user account?
As in my root terminal, when type java -version:
java version "1.8.0_291"
Java(TM) SE Runtime Environment (build 1.8.0_291-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.291-b10, mixed mode)
# which java
/usr/lib/jvm/jdk1.8.0_291/bin/java
In the /etc/alternatives:
lrwxrwxrwx 1 root root 34 June 4 15:52 java -> /usr/lib/jvm/jdk1.8.0_29/bin/java*
I set JAVA_HOME in both my user and root .bashrc and .profile to /usr/lib/jvm/jdk1.8.0_29/bin/java