Amazon Corretto 17 installation on Rocky Linux 9 | How to install Java 17 on Linux with JAVA_HOME
Amazon Corretto is a no-cost, multiplatform, production-ready distribution of the Open Java Development Kit (OpenJDK).
Corretto comes with long-term support that will include performance enhancements and security fixes.
Amazon runs Corretto internally on thousands of production services and Corretto is certified as compatible with the Java SE standard.
With Corretto, you can develop and run Java applications on popular operating systems, including Linux, Windows, and macOS.
In this video we are going to see how to install Amazon Corretto 17 on Rocky Linux 9 for all users with JAVA_HOME Environment Variable
In this Example:
src --- contains two java modules UrlValidator and UrlValidatorClient Modules. Each Module must contain module-info.java which is mandatory.
classes --- will store all the compiled class files of Java Modules.
Here UrlValidator Module contains module-info.java which exports the com.javafrm package, so that other modules can access the package and com.javafrm package contains UrlValidator.java.
Class name and Method should be public, then only you can access this class and required methods from other modules.
Next UrlValidatorClient Module contains contains module-info.java which requires (calls) UrlValidator Module.
It contains org.javafrm package which contains UrlValidatorClient.java (Main class) and access the class and methods from UrlValidator Module.
Example commands:
javac --module UrlValidatorModule -d /opt/Java-Module-Programs/Modules/classes --module-source-path /opt/Java-Module-Programs/Modules/src
javac --module UrlValidatorClientModule -d /opt/Java-Module-Programs/Modules/classes --module-source-path /opt/Java-Module-Programs/Modules/src
java --module-path /opt/Java-Module-Programs/Modules/classes --module UrlValidatorClientModule/org.javafrm.UrlValidatorClient
#corretto #java #jdkinstallation #installjdk #installjava #javajdk #amazoncorretto #javahome #rockylinux9 #jdk17