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

  • 2
    Why do you think you need a specific sub-sub-version? – ChanganAuto Jun 17 at 14:15
  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


  • /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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.