In this video we are going to see How to install Azul's Zulu OpenJDK 22 in Windows 11 with JAVA_HOME Environment Variable and How to Compile and Run Java Module Program.
In this Example.
src --- contains two java modules PalindromeNumber and PalindromeNumberClient Modules. Each Module must contain module-info.java which is mandatory.
classes --- will store all the compiled class files of Java Modules.
Here PalindromeNumberModule Module contains module-info.java which exports the com.javafrm package, so that other modules can access the package and com.javafrm package contains PalindromeNumber.java and has one method.
Class name and Method should be public, then only you can access this class from other modules.
Next PalindromeNumberClient Module contains contains module-info.java which requires (calls) PalindromeNumber Module.
It contains org.javafrm package which contains PalindromeNumberClient.java (Main class) and access the class and methods from PalindromeNumber Module.
Example Java Commands:
javac --module PalindromeNumberModule -d D:\Java-Module-Programs\Modules\classes --module-source-path D:\Java-Module-Programs\Modules\src
javac --module PalindromeNumberClientModule -d D:\Java-Module-Programs\Modules\classes --module-source-path D:\Java-Module-Programs\Modules\src
java --module-path D:\Java-Module-Programs\Modules\classes --module PalindromeNumberClientModule/org.javafrm.PalindromeNumberClient
#zulujdk #java #jdkinstallation #installjdk #installjava #javainstallation #javajdk #javahome #windows11 #jdk22
![](https://s2.save4k.ru/pic/sUymI1Agkrg/maxresdefault.jpg)