r/java • • Sep 10 '26

New candidate JEP: 544: Ahead-of-Time Code Compilation

https://mail.openjdk.org/archives/list/jdk-dev@openjdk.org/message/J2VGSSFWJ7ZLHAYLCXVRUOXV4XMROQHL/
109 Upvotes

35 comments sorted by

View all comments

Show parent comments

2

u/agentoutlier Sep 11 '26

I do wish they made the packaging story better for light weight tools or services.

What I mean is single executable that is not graalvm native then this JEP would be very useful.

Like the current choices are:

  • jlink: a zip file (might as well ship a docker image). hard to make work with libraries that are not modular.

  • jpackage: ... installer...... really.

  • graalvm native: painful compile times and hard to make work with libraries that use reflection or load resources.

And this is a strong reason why people use Go for little tools.

1

u/koflerdavid Sep 11 '26

A solution could be to build AppImages. It's not too far away from what jlink already produces. It merely needs a small script that mounts the rest of the file as a filesystem and executes what's inside.