apache / netbeans

Apache NetBeans
https://netbeans.apache.org/
Apache License 2.0
2.69k stars 853 forks source link

X3D-Edit autoinstaller and zip for Windows fails, found workaround #6934

Open brutzman opened 11 months ago

brutzman commented 11 months ago

Apache NetBeans version

Apache NetBeans 20

What happened

Creating autoinstaller for X3D-Edit module does not find local Java once installed. Workaround is to edit netbeans.conf file, which is typically difficult for end user.

Details found at

Language / Project Type / NetBeans Component

NetBeans Windows Installer

How to reproduce

Example of autoinstaller exhibiting this error are found at

Can download source for X3D-Edit module and then test autogeneration using the source archive

Did this work correctly in an earlier version?

No. This has never worked properly for us in previous versions of NetBeans over the past several years. Possibly we have misconfigured something.

Operating System

OS Name Microsoft Windows 10 Pro, Version 10.0.19045 Build 19045

JDK

OpenJDK 21.0.1

Apache NetBeans packaging

Apache NetBeans provided installer

Anything else

We are happy to apply modifications and test further.

Are you willing to submit a pull request?

No thanks, we are not building or modifying NetBeans source.

neilcsmith-net commented 11 months ago

What does creating an autoinstaller for X3D-Edit mean exactly? Are you talking about distribution of a NetBeans platform application containing the module? For the latter I would recommend building an installer with NBPackage and ideally shipping with bundled JDK / Java runtime.

The Windows installer infrastructure, particularly for platform applications, is basically unmaintained.

Not sure why you mention netbeans.conf as opposed to <branding>.conf? Anyway, the other option with either is to edit the desktop shortcut to added the JDK location.

brutzman commented 11 months ago

Thanks for feedback. We are using the provided NetBeans capability:

The problem occurs identically on Windows for installers produced by menu-item selections Zip Distribution and for Installers.

The reason we mention the application's netbeans.conf file is because that is where the workaround can be applied, namely the end user editing the jdkhome property and pointing to their local Java installation. Such guru-level surgery can be difficult and error prone for non-expert users, further they often do not have system administrator permissions that might be required.

The overall goal for this issue is to have these Windows installers work "out of the box", finding the local Java (or possibly JDK) when first installing itself by properly configuring the jdkhome property on an end-user's system.

Editing the desktop icon sounds like another good workaround but again punts corrections to end users. Hopefully the Windows zip/installer can become robust enough to actually be able to run following installation. Thanks in advance for all consideration of resolutions.

neilcsmith-net commented 11 months ago

There is a known issue with the Windows launcher not finding Java (assuming it's installed in a discoverable way). Hopefully that can be fixed in future. However, you cannot exactly guarantee if that's set up correctly, or that it points to what you need. Relying on a system-wide Java install is really something for the past.

Also, as said above, no-one is maintaining the package as installers or macos application. They are almost untouched since donation to ASF. NetBeans itself has moved away from using that installer infrastructure for anything other than Windows, and we are looking at replacing that (actually pending on some launcher fixes).

If your overall goal is a trouble free experience working out-of-the-box, I would suggest looking at shipping the JDK (or stripped down runtime depending on what you need), and including that with NBPackage as outlined above.

brutzman commented 10 months ago

Acknowledged with thanks, we'll think about when we can pursue that direction.

Suggest considering changes to NetBeans "Package as" menu actions so that developers are alerted to issues when trying them. Having a help page on all this would be helpful too.