JDK 16 brings the ability to pack a self-contained Java application with the jpackage packaging tool.

If you shudder thinking about compilation for different platforms, I know the feeling. One of the Java promises, the WORA (Write Once, Run Anywhere) principle, while revolutionizing platform independence, it stopped short of one more step – to be able to deploy anywhere. Personally, I think that WORADA sounds awesome, but I guess before Docker it didn’t occur to people that eliminating “works on my machine” is as simple as shipping your machine.

So you wrote a class, you’ve built a jar file and then you needed the right JVM (or JDK) and all the right dependencies, organized in a very particular way in order to make it work. What are the chances this knowledge will be consistently transferred intact from the Dev silo to the Ops silo?

The “Ship Your Machine” Container Revolution

Everything changed with containers. While in years past the complaint “I have a very hard time deploying Java applications” was met with “Well, at least it runs on every platform, everything else doesn’t even do that,” the rise of Docker and containers blew the “At least it’s multiplatform” argument out of the water. Suddenly, multi-platform support is much less important (since you ship the target platform) but having a package, which will contain the entire application emerged as a winner.

#java

jpackage Is Production-Ready in Java 16
3.00 GEEK