Running IDE from zip distribution does not save and/or restore some settings.
Apache NetBeans version
Apache NetBeans 27
What happened
Running the NetBeans IDE from the uncompressed official zip package does not save and/or restore some settings. The OS is Linux Mint 22.1 Cinammon. The zip is extracted in /opt and a custom .desktop file provided to run it. It is run as a normal user, so it stores it's settings in the user Home.
The same was observed, but not reported, in NetBeans 26 IDE zip package. This did not happen with the earlier official .deb packages.
Some settings that have been confirmed as failing to restore are:
- Splitter position for the vertical splitter between 'Projects' and 'Editor' panels. Happens on every restart of the IDE.
- Activated state of the JavaFX plugin (Scene Builder integration). Happens after a few restarts of the IDE (sorry, have been able to exactly count them).
Other settings may be impacted and not observed yet.
I have moved to using the zip distribution since NB 26 after the earlier issue reported with the installer bundled with JDK, where it would loose the dependency to loaded library projects and change to a dependency on the built jars of said library projects.
Language / Project Type / NetBeans Component
JavaFX maven project, Zulu JDK 21 LTS (deb).
How to reproduce
-
Vertical splitter position: Start the Netbeans IDE. Load some projects. Change the splitter position to your liking. Close the IDE. Start the IDE.
-
Activated state of the JavaFX plugin: Start the Netbeans IDE. Load a javaFX project with fxml files. Activate the JavaFX plugin. Configure path to Scene Builder. Close the IDE. Start the IDE. Open an fxml file by double-clicking or right-click, 'Open'. (repeat last 3 a few times until opening an fxml file opens in the NB editor window).
Did this work correctly in an earlier version?
Apache NetBeans 24 or earlier
Operating System
Linux Mint 22.1 Cinammon
JDK
Zulu JDK 21 LTS (deb) x64
Apache NetBeans packaging
Apache NetBeans binary zip
Anything else
The same was observed, but not reported, in NetBeans 26 IDE zip package. This did not happen with the earlier oficial .deb packages.
Are you willing to submit a pull request?
No
Sorry, edited due stating NB 24 in several places where NB 26 was meant.
please attach the log after startup. (you might have to rename it since github doesn't like .log).
Do you close the IDE normally? UI state is not persisted on hard exit.
Sorry for the delay, have been off work for a while.
please attach the log after startup. (you might have to rename it since github doesn't like
.log).Do you close the IDE normally? UI state is not persisted on hard exit.
I mostly close it with the windows 'X' button, which always seemed to do a normal exit. However, your question prompted me to do some experimenting and the results were somewhat strange.
After changing the splitter position then exiting via the menu, it then opens up correctly in the new position on next run. Apart from the fact that it is standard procedure to capture that X button and close normally, the strange thing is that after that test, I closed with the X button a few times and it would still open in the new position. After 3 or 4 times however, it went back to the default position again. I can still send the log if you think it would help, but it might require logs for when it works and when it doesn't and for the different ways of closing.
So I started using the Codelerity .deb and found the same problem now. However, I finally realized that it only happens with a dual-monitor configuration and when running the IDE on the second monitor. I will note a few things for the record:
- Monitor 1 is the laptop monitor, with 1366x768 resolution.
- Monitor 2 is a desktop monitor with 1920x1024 over hdmi.
- I cannot currently say what would happen on 2 monitors of equal resolution.
- Netbeans correctly remembers what monitor it last ran on and starts on the same one next time.
The sequence of events to understand the issue is as follows:
-
Run NB on monitor 1, maximize, set the project panel separator as desired, close NB.
-
On next run, the panel shrinks a little (not ideal, but not so bad).
-
On subsequent runs, this new position is maintained.
-
Drag NB to monitor 2, maximize, the panel remains in the same position as in monitor 1, close NB.
-
On subsequent runs, this new position is maintained.
-
Change the project panel separator as desired, close NB.
-
On next run, the panel shrinks to the much smaller size that prompted this issue.
-
On subsequent runs, said smaller size is maintained.
Hope that gives somebody an idea on how to further debug this.