geertjanw opened a new pull request, #147:
URL: https://github.com/apache/netbeans-nbpackage/pull/147
Fixes #133.
The Windows installer passed the bundled JDK via `--jdkhome` on the Start
Menu / desktop shortcut. Launching the executable directly — e.g. via **Open
With…** on a file — bypassed the shortcut, so the bundled JDK wasn't found and
the launcher fell back to a system JDK or failed to start.
With the launcher now supporting `${BASEDIR}` substitution
(apache/netbeans#8408), the bundled JDK can be referenced from `netbeans.conf`
relative to the install, so it's found however the app is launched.
### Change
- `AbstractPackagerTask.addRuntimeToConf` now writes the bundled JDK
location as `${BASEDIR}/<jdk>` and sets both `jdkhome` and `netbeans_jdkhome`
(resolving the long-standing `@TODO` there). Previously it wrote a plain
relative path under only `jdkhome`, which didn't resolve for direct launches.
- Separators are normalised to `/`, which the Windows launcher tolerates.
### Decisions (per the open questions in the issue)
- **Scope:** applied in the shared conf handling, so it benefits every
packager that bundles the runtime inside the app dir
(deb/rpm/appimage/windows). macOS is unaffected (its runtime lives outside the
app dir, so this path isn't taken). Where other launchers still pass
`--jdkhome` on the command line, that continues to take precedence, so there's
no regression.
- **Shortcut `--jdkhome`:** kept. The conf entry fixes direct/Open-With
launches additively, while the shortcut keeps older NetBeans launchers (without
`${BASEDIR}` support) working. Zero regression.
- **32-bit launcher:** left in place — out of scope for this fix; can be a
separate change.
### Tests
- `TestUtils.buildFakeApp` now seeds the `.conf` with the `#jdkhome` /
`#netbeans_jdkhome` placeholders.
- `InnoSetupPackagerTest.testImageWithX86_64Runtime` asserts both keys are
rewritten to `${BASEDIR}/jdk`.
- Full suite passes locally.
### Still needs real-world validation
As the issue notes, this should be tested with both the IDE and a platform
app on Windows (and ideally the direct Open-With case) before release.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists