Upgrade from 25 to 26 (release) with deb package looses configured Java platforms.
Apache NetBeans version
Apache NetBeans 26 latest release candidate
What happened
The upgrade from 25 to 26 (release) does not import the Java platforms. Since I use Zulu JDK with included JavaFx and 26 deb comes with included JDK 24 (without JavaFX), all my JavaFX projects lost the jfx dependencies and had to repaired by hand one by one.
Language / Project Type / NetBeans Component
Java Maven JavaFX project.
How to reproduce
Create a JavaFX project using a Zulu JDK with included JavaFx, then upgrade Netbeans from 25 to 26 (release).
Did this work correctly in an earlier version?
No / Don't know
Operating System
Linux Mint Debian Edition 6 (LMDE 6)
JDK
zulu21.34.19-ca-fx-jdk21.0.3-linux_amd64.deb
Apache NetBeans packaging
Third-party package
Anything else
I was using the Netbeans-provided deb packages (without JDK) up to 25, but 26 is no longer provided, so the third-party deb with included JDK 24 was used to upgrade.
Are you willing to submit a pull request?
No
did you run NetBeans 25 on the JDK which included JavaFX? If yes, the platform is listed as "default" and represents the runtime JDK. The runtime JDK is part of the environment and isn't stored as configuration (therefore not imported) since it can change between releases.
If your add the zulu JDK via the platform manager, the config will be migrated next time you update.
Yes, please confirm whether this was due to change in default platform or whether you had configured alternative platforms and they were not imported correctly? I noticed you did say "Java platforms" in your report so we should confirm that before closing this.
If the runtime JDK is not bundled in the package like the current community deb, the default JDK is liable to change at any point the primary system JDK changes, not just per release as with the bundle. Under either scenario, if your project has specific custom JDK requirements like this, you should definitely register a specific JDK under Tools / Java Platforms and select that in the project properties.
Thanks for your replies and sorry my own delay.
Yes, I have for some time, and several versions of Netbeans, used 3 configured Java Platforms: JDKs 8, 11 and 21, all from Azul, with JavaFX. Now, you will have to forgive my memory, it is not what it used to be, but I think they did transfer from version to version, when the new version imports the previous configuration. Now, the JDK21 with FX may have been the default for running Netbeans by now, but not when I first installed it, so I think it was carried over. But no matter what, the other 2 should have been imported, right?
I thought at first this was a packaging problem, as the previous deb packages did not include a JDK as the new one does, but then I figured it is actually Netbeans itself which imports the previous configuration, and I did say yes when it asked to.
EDIT: Also, the projects themselves have a JDK configuration, which, in my projects, can be any of the three I mentioned. This was changed to the package's JDK 24 (without JavaFX) in all cases.
you might still have the old config in
~/.netbeans/25/config/Services/Platforms/org-netbeans-api-java-Platform/
if you want to recover them.
I couldn't reproduce it so far.
I installed the NB 25 deb, installed zulu FX JDK 21, registered the JDK. Now I installed NB 26 deb (Friends of NetBeans bundle), clicked import and it worked.
you might still have the old config in
Thanks, but I already added them manually, that's pretty simple. The thing was having to add the dependencies manually to every JavaFX project.
I couldn't reproduce it so far.
Well, if I have some time, I will try this again in a VM and report back.