JDK 9+ added the Launcher-Agent-Class that can be used for attaching the Java Agent when JOL is invoked via the Executable JAR: https://docs.oracle.com/javase/9/docs/api/java/lang/instrument/package-summary.html#:~:text=name%20or%20path.-,Launcher%2DAgent%2DClass,application%20main%20method%20is%20invoked.
Adding it to jol-cli and jol-samples might be in order.
Adding it to jol-cli and jol-samples might be in order.