How to check version of java in Linux
Java is one of the most famous and thoroughly utilized programming tongues from one side of the world to the other. On the off chance that you are a Java engineer, you should have an information "on the best method for looking at java rendition, indeed".
There are two or three frameworks to truly take a gander at which Java variety introduced in your design.
Assuming you know next to nothing about how to introduce Java, you ought to examine my aide on How to Install Java on Ubuntu 20.04.
Essentials
A server running Debian 10.
A root secret key is set up in your server.
Check java version in linux
java –version
In case present, it will list the variety numbers and the construction date of the ceaseless java change. For this current situation, it shows the variation number is "22.0.22".
Expecting you get a blunder saying that the solicitation wasn't found, it recommends you don't have Java introduced on your gadget.
Moreover, execute the going with solicitation to check the change of the consistent default Java compiler
javacJavac-version
In the event that you are searching for a construction cynic way on the best method for checking the Java rendition familiar on your framework attempt with thus recover the Java variety.
This technique ought to work with any Java change as well as any working framework.
Utilizing any word processor make another record CheckJavaVersion.java with the going with substance:
public class CheckJavaVersion1 {
public static void main(String args[]) {
String javaVersion = System.getProperty("java--version");
System.out.format("Java--Version = '%s'\n", java--Version);
}
}
The execution of the CheckJavaVersion Java program accomplished java variety yield. For this current situation Java Version 11 is introduced on our framework.
There are a couple of methodologies to truly see java structure on linux:
- Check java variation on linux.
- Finding the variation by checking way where truly java is presented.
- We can similarly truly see java structure in presented pacakages list as well.