Make a Dockerfile for this, use basic javac and java commands.
Modify the code in the app and rebuild the image. Observe which layers are cached.
Change the messages shown at runtime, by changing the env variables and by volume-mounting the included message.txt