In this video we are going to see How to install Bellsoft Liberica JDK 17 in Linux Mint 21 for all users with JAVA_HOME Environment Variable and How to Compile and Run Java Module Program.
In this Example.
src --- contains two java modules IP4Validator and IP4ValidatorClient Modules. Each Module must contain module-info.java which is mandatory.
classes --- will store all the compiled class files of Java Modules.
Here IP4Validator Module contains module-info.java which exports the com.javafrm package, so that other modules can access the package and com.javafrm package contains IPv4Validator.java .
Class name and Method should be public, then only you can access this class and required methods from other modules.
Next IP4ValidatorClient Module contains contains module-info.java which requires (calls) IP4Validator Module.
It contains org.javafrm package which contains IPv4ValidatorClient.java (Main class) and access the class and methods from IP4Validator Module.
Example Java Commands:
javac --module IP4ValidatorModule -d /opt/Java-Module-Programs/Modules/classes --module-source-path /opt/Java-Module-Programs/Modules/src
javac --module IP4ValidatorClientModule -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 IP4ValidatorClientModule/org.javafrm.IPv4ValidatorClient
#libericajdk #java #jdkinstallation #installjdk #installjava #javainstallation #javajdk #javalinux #javahome #linuxmint #jdk17
On this page of the site you can watch the video online How to install Bellsoft Liberica JDK 17 in Linux Mint 21 with JAVA_HOME Environment Variable with a duration of hours minute second in good quality, which was uploaded by the user java frm 10 January 2024, share the link with friends and acquaintances, this video has already been watched 35 times on youtube and it was liked by 0 viewers. Enjoy your viewing!