mkdir -p hello-example/samplepackage sample;
import java.util.logging.Logger;
public class HelloWorld {
private static final Logger LOG = Logger.getLogger(HelloWorld.class.getName());
public static void main(String[] args) {
LOG.info("Hello World!");
}
}module sample
{
requires java.logging;
}./jdk-21/bin/javac -d example $(find hello-example -name \*.java)./jdk-21/bin/java -cp example sample.HelloWorlddu -sh jdk-21/mkdir sample-module
```bash
```bash
./jdk-21/bin/jmod create --class-path example/ --main-class sample.HelloWorld --module-version 1.0.0 -p example sample-module/hello.jmodCreating a custom JRE with the required modules and a custom application launcher for the application
./jdk-21/bin/jlink --launcher hello=sample/sample.HelloWorld --module-path sample-module --add-modules sample --output custom-runtimedu -sh custom-runtime./custom-runtime/bin/java --list-modules./custom-runtime/bin/hello