You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for asking, @CodingMan26, and @koppor for chiming in. Let me give a straight answer.
Today jbundle works on Windows as a build host (the CI runs on windows-latest and there's install.ps1), but not as an output target. The binary it produces is a POSIX shell script with the runtime and your jar appended, so it needs /bin/sh, tail, tar and gzip. #36 fixed running jbundle itself on Windows, which is probably where the confusion comes from.
It got worse than it should be because on a Windows host the default target was windows-x64, so a plain jbundle build happily produced a file that can't start. #79 makes that fail right away with a clear message and tells you to pass --target linux-x64 or a macOS target.
Real Windows output is doable, but it's not a small patch. It needs a native launcher: a small .exe (Rust, built per target) that reads the payload appended to itself, extracts the runtime and jar to %LOCALAPPDATA%\jbundle\cache the same way the shell stub does, and starts java.exe. jbundle would then ship that launcher for windows-x64 and pick it instead of the shell stub. The pieces are there (we already download Windows JDKs and the release builds a Windows binary), it's mostly the launcher and its tests.
I'm keeping this issue open to track that. If someone wants to pick it up, I'm happy to review and help with the design, just say hi here first so we don't duplicate work.
Activity
koppor commentedon Jul 1, 2026
@CodingMan26 Please report with an MWE what is going wrong for you. - According to #36, it is fixed. But I think, I never got it to work.
avelino commentedon Oct 12, 2026
Thanks for asking, @CodingMan26, and @koppor for chiming in. Let me give a straight answer.
Today jbundle works on Windows as a build host (the CI runs on
windows-latestand there'sinstall.ps1), but not as an output target. The binary it produces is a POSIX shell script with the runtime and your jar appended, so it needs/bin/sh,tail,tarandgzip. #36 fixed running jbundle itself on Windows, which is probably where the confusion comes from.It got worse than it should be because on a Windows host the default target was
windows-x64, so a plainjbundle buildhappily produced a file that can't start. #79 makes that fail right away with a clear message and tells you to pass--target linux-x64or a macOS target.Real Windows output is doable, but it's not a small patch. It needs a native launcher: a small
.exe(Rust, built per target) that reads the payload appended to itself, extracts the runtime and jar to%LOCALAPPDATA%\jbundle\cachethe same way the shell stub does, and startsjava.exe. jbundle would then ship that launcher forwindows-x64and pick it instead of the shell stub. The pieces are there (we already download Windows JDKs and the release builds a Windows binary), it's mostly the launcher and its tests.I'm keeping this issue open to track that. If someone wants to pick it up, I'm happy to review and help with the design, just say hi here first so we don't duplicate work.
fix: fail early when the output target is Windows
fix: fail early when the output target is Windows