rognan/gradle-jlink-example

A couple of things

Closed this issue · 4 comments

  1. I read in the description

Use gradle to create a minimal runtime image (22M) with JLink.

but my build/image is actually ~2.5x times bigger (51.7 MB exactly)

  1. There is no such path

./build/dist/bin/launch

PS C:\Users\gbarbieri\IdeaProjects\badass-jlink-example\build> ls


    Directory: C:\Users\gbarbieri\IdeaProjects\badass-jlink-example\build


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----       24/06/2019     15:09                classes
d-----       24/06/2019     15:09                image
d-----       24/06/2019     15:09                jlinkbase
d-----       24/06/2019     15:09                libs
d-----       24/06/2019     15:09                resources
d-----       24/06/2019     15:09                tmp

ps: my java.home points to C:\Program Files\Java\jdk-11.0.1

That's strange ... Here's my output:

$ ./gradlew clean jlink

BUILD SUCCESSFUL in 4s
4 actionable tasks: 4 executed

$ du -sch ./build/dist/
 26M	./build/dist/
 26M	total

$ ./build/dist/bin/launch
Minimal webapp running on port 8080 powered by Java 12.0.1

Did you run ./gradlew jlink or ./gradlew build?

Could the excessive size in your output folder be due to the default block size chosen for your hdd? (In which case small files will still take up a full block even though it requires less in real data.)

I ran ./gradlew jlink

Anyway, I'll be out two weeks, we'll pick it up again then

PS! If you have changed the output folder from dist to image as your directory listing seems to suggest, the launch agent will be found at build/image/bin/launch instead of build/dist/bin/launch

Shit, I confused this project with another sample.. my bad sorry!

Everything runs perfect, thanks!