Repository navigation
Conversation
The Windows installer set the bundled JDK via --jdkhome on the Start
Menu shortcut, so launching the executable directly - eg. via
"Open With..." on a file - did not find the bundled JDK and either fell
back to a system JDK or failed to launch.
Write the bundled JDK location into netbeans.conf relative to the
installation using the launcher's ${BASEDIR} token (now supported by the
IDE and platform launchers), setting both jdkhome and netbeans_jdkhome.
This resolves however the application is launched. The shortcut
--jdkhome parameter is kept so packaging of older launchers that lack
${BASEDIR} support is unaffected.
This applies to all packagers that bundle the runtime inside the
application directory; the previous plain relative path was replaced.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #133.
The Windows installer passed the bundled JDK via
--jdkhomeon 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 fromnetbeans.confrelative to the install, so it's found however the app is launched.Change
AbstractPackagerTask.addRuntimeToConfnow writes the bundled JDK location as${BASEDIR}/<jdk>and sets bothjdkhomeandnetbeans_jdkhome(resolving the long-standing@TODOthere). Previously it wrote a plain relative path under onlyjdkhome, which didn't resolve for direct launches./, which the Windows launcher tolerates.Decisions (per the open questions in the issue)
--jdkhomeon the command line, that continues to take precedence, so there's no regression.--jdkhome: kept. The conf entry fixes direct/Open-With launches additively, while the shortcut keeps older NetBeans launchers (without${BASEDIR}support) working. Zero regression.Tests
TestUtils.buildFakeAppnow seeds the.confwith the#jdkhome/#netbeans_jdkhomeplaceholders.InnoSetupPackagerTest.testImageWithX86_64Runtimeasserts both keys are rewritten to${BASEDIR}/jdk.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.