r/java • • Jan 02 '25

How Java's Executable Assembly Jars Work

https://mill-build.org/blog/5-executable-jars.html
64 Upvotes

42 comments sorted by

View all comments

Show parent comment

3

u/TheKingOfSentries Jan 02 '25

So this avoids a resource call you say?

4

u/agentoutlier Jan 03 '25

It is more like it reuses a resource that was previously loaded and if there was another resource call it would in theory be a cheaper call.

I'm fairly sure it will cache some of the meta data but I don't thin adhoc if you use the Package manifest call.

See https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Package.html

The only way I guess is to test. I might ask chatty for fun to see what bull shit conjures up for me.