I unknowingly downloaded the wrong jdk onto my system (openjdk 11) and would prefer java 1.8.0_181 to be installed. I'm just looking to run an application so I believe that jre is all that is needed. I got the official release from http://www.oracle.com/technetwork/java/javase/jre8-downloads-2133155.html for linux x64.
I now have both of these java version on my ubuntu machine. the jdk is located in
/usr/lib/jvm/ and I placed the jre folder in
/usr/lib/java/. I have set the
$JAVA_HOME path to
/usr/lib/java/jre1.8.0_181 in both
/etc/environment and in
When I do
echo $JAVA_HOME the correct path shows up (jre path). However, when I do java -version, it still shows as java Version 10 instead of 1.8.0_181.
Can anyone assist with this? I'm not sure what else I can do here.