jbangdev / jbang

Unleash the power of Java - JBang Lets Students, Educators and Professional Developers create, edit and run self-contained source-only Java programs with unprecedented ease.
https://jbang.dev
MIT License
1.39k stars 155 forks source link

jbang --native=jlink or jbang --jlink #557

Open maxandersen opened 3 years ago

maxandersen commented 3 years ago

after conversation on reddit I think we should add support for --jlink similar to how we have --native. It would generate a binary with embedded runtime.

I tried this in past but never reliably worked for me but lets try again.

quintesse commented 3 years ago

I'm wondering if we shouldn't start with those plugins :-)

maxandersen commented 3 years ago

Jlink doesn't let you package non modularised app. Then is just a runtime so not much gain.

brunoborges commented 3 years ago

@maxandersen: Jlink doesn't let you package non modularised app. Then is just a runtime so not much gain.

I'm not sure this is true, mate. jlink can be run without a modularized app. You provide which modules you need, and yes, it generates a runtime with those modules only. Maybe jbang should first provide a way to generate a jdep scan though.