GraalVM is the new Java compiler backend. This Docker Image helps experimenting with native images.
Use the prebuild image.
Mount the current directory:
docker run --rm -it -v $(pwd):/app danny02/graalvm bash
Now run the following commands:
cd app
javac HelloWorld.java
native-image HelloWorld