Score:0

Installed Oracle JRE 8, but don't see it installed & can't select it

cn flag

Running UbuntuStudio v20.04

Trying to get Oracle Java selected instead of OpenJDK in order for my Trading Platform to work - using a JNLP file. It must use the Oracle version. Have installed latest from Oracle from here.

It installed to dir/usr/lib/jvm/jre1.8.0_301 but this is what it shows using this command.

MS-7640:~$ update-java-alternatives -l

java-1.11.0-openjdk-amd64      1111       /usr/lib/jvm/java-1.11.0-openjdk-amd64
java-1.8.0-openjdk-amd64       1081       /usr/lib/jvm/java-1.8.0-openjdk-amd64

MS-7640:~$ java -version

openjdk version "1.8.0_292"
OpenJDK Runtime Environment (build 1.8.0_292-8u292-10-0ubuntu1~20.04-b10)
OpenJDK 64-Bit Server VM (build 25.292-b10, mixed mode)

I don't see the Oracle version! How can I verify its installed and select it? Then perhaps my Trading Platform will run. Iced Tea may be intercepting, and ONLY uses OpenJDK. Don't know if I should Remove it ... or what?

In trying to Setup the Alternatives, I get the following Error:

MS-7640:~$ sudo update-alternatives --install /usr/bin/java OracleJava /usr/lib/jvm/jre1.8.0_301/bin/java 1

update-alternatives: error: alternative link /usr/bin/java is already managed by java

Any help is very appreciated. Thanks!

Knud Larsen avatar
by flag
.........../bin/java 1 : The numbering " 1 " has already been used, probably. Common practice is to type e.g. `/bin/java 2000` to allow 'alternatives' to select a new number for the new java.
cn flag
Stiil get the same Error, that's why I'm stumped !!!
Knud Larsen avatar
by flag
Wrong is "OracleJava" `sudo update-alternatives --install /usr/bin/java OracleJava /usr/lib/jvm/jre1.8.0_301/bin/java 1` : Should be → *sudo update-alternatives --install /usr/bin/java **java** /usr/lib/jvm/jre1.8.0_301/bin/java 2000* ........ Else you cannot use `sudo update-alternatives --config java`
cn flag
I see the mistake ... that's not a rename, but reference to the file being modified to include the new redirect. Works for me! THANKS a Million. Also had to add variables to /etc/environment (JAVA_HOME=) and /etc/profile (JAVA_HOME and PATH)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.