Java is available in two editions:
- Standard Edition (J2SE)
- Enterprise Edition (J2EE)
Here, we will opt for Standard Edition. Java is free to download and use for all operating systems.
You can download Java 10.0.2 from http://www.oracle.com/technetwork/java/javase/downloads/index.html.
Download for your operating system.
After installation, please check whether Java is installed. To check, open your Terminal and type java --version. If Java is installed successfully, you will see the following Java version:
Check java version
Alternatively, you will see an error. If this occurs, try to install it again to resolve it.