Score:1

Ubuntu 20.04 - Install a specific version of openjdk "1.8.0_201"

ph flag
Kim

I have openjdk version "1.8.0_292" installed on my Ubuntu 20.04.

I need to install an exact version of openjdk - 1.8.0_201

How do I do that?

The reason being that an old application I am trying to run is giving me an exception:

java.lang.IllegalArgumentException: Invalid version number: Version number may be negative or greater than 255 at com.ibm.icu.util.VersionInfo.getInstance(VersionInfo.java:154) at com.ibm.icu.impl.ICUDebug.getInstanceLenient(ICUDebug.java:71)

I have 'icu4j_2_6_1.jar' in my lib folder. Upgrading it is causing more errors

ChanganAuto avatar
us flag
Why do you think you need a specific sub-sub-version?
Score:0
ax flag
  1. Download

Download the SDK you need in the Java 8 Archive.

  1. Installing

Install it according to these instructions.

  1. Setting alternative

Include this specific version as an alternative, using this command on your terminal (root needed):

sudo update-alternatives --install /usr/bin/java java /usr/java/jdkXXX/bin/java 1

Being:

  • /usr/bin/java is the result of which java;
  • jdkXXX is the name of the JDK folder you created before.

Finally, set the version you want to use:

sudo update-alternatives --config java

Select the version you want, typing the number displayed on the first column.

You may need to repeat step 3 with javac, javaws, etc., according to your needs.

Also, make sure to test the changes with java -version.

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.