Normally, you can update your default JDK with the command sudo update-alternative --config java (and then the same with javac). The terminal will then display all the JVM / JDK it founds, with a star in front of the currently used one. You can enter the number of the one you wish to use in place of the current one.
Please note that if you wish to use JDK 14 for NetBeans only and another JDK for your system, then you should keep the update-alternatives command pointing on the desired system JDK and specify your NetBeans JDK in netbeans.conf (as you seems having done actually).
From what you say, the NetBeans icon does not launch NetBeans anymore. Maybe you could use your graphical menu editor to check what commands this icon is actually executing when you click on it ? You should also check what the current command is doing, which NetBeans binary it tries to execute, and check if this binary file indeed exists.
You could edit the command, so basically copy / paste the one you successfully use from terminal. If you do this, you should be able to launch again NetBeans from its icon, as you do from terminal. But I would rather recommend you to fix your JDK location as it sounds a "cleaner" way to solve your problem.
Last thing, I wonder where your NetBeans is, or how many NetBeans you have installed in your session. How did you install NetBeans? You mention you edited the netbeans.conf file. Where was it located ? I am asking because it seems that you installed NetBeans via snap, but if this is correct then you should not have been able to edit the .conf file.
If you cannot get a working NetBeans from any of the above steps, I would suggest uninstalling the snap package. The icon should have disappeared. You should not get any result for which netbeans in terminal.
I installed Netbeans on my Ubuntu 11.10 machine. I used the combined method, so Netbeans and JDK are installed from a single file. However, now that it's installed I can't figure out how to start Netbeans. If I try to reinstall it says that Netbeans is already installed, but if I look in /usr/share/netbeans there are the installation files but nothing else. How do I run Netbeans?
I have also enabled the Twig debugging in the services.yml file. I have added a breakpoint() line in the page.html.twig file located in templates directory for the theme I am using. I also use Google Chrome with the Xdebug helper extension, which I set to Debugging enabled for the address of the local Drupal site (turned green) and its IDE key option to netbeans-xdebug.
Debugging PHP code works perfectly, as I mentioned previously, but I don't get any code break in the break-point line of the template file when I refresh the front page (I have also cleared the cache). In other words, I cannot debug Twig templates.