Java version pointing to wrong version
- java version showing old version in linux
- java version change in linux
Java 21.
java -version pulling up wrong version [duplicate]
First off I'm using Ubuntu 14.04
I was following this video to set up a Java JDK and at the end he uses
to see his current version number.
The Version I installed was 1.8.0_66 but mine returns
But when I check for the JAVA_HOME that seems to be correct
Where have I gone wrong?
Specify java version in command line
The additional resource he uses in the video is this and I feel like step 5 is maybe where things are going haywire, even though I do update the file name version before I run the script.
Any ideas? Anything is much appreciated thank you.
After digging around online I ran the line
which returned with
I've tried entering in 1 and sudo 1 etc but the java version doesn't change.
And it just redisplays the above code, without changing the default. How do I correctly enter this?
How to set default java version in redhat linuxIf this is even how to do it. According to this I already had java installed in the jvm folder. Is it necessary to use the latest version of java or should I use this preinstalled version? I'm new to java so I'm not very experienced on what I need to be doing.