The SO question is indeed outdated, it´d be great if someone with enough
reputation could leave a comment.

On NB 12.4 copying it to this location worked:
~/snap/netbeans/common/data/12.4/etc/netbeans.conf
But since NB 13 it seems to not use the "common" folder, and use a non
semVer versioning for folders
Help -> About:
[image: image.png]
[image: image.png]
Here, 58 = NB 13
So my current working editable netbeans.conf is
~/snap/netbeans/58/etc/netbeans.conf
(~/snap/netbeans/current/etc/netbeans.conf)

Hope this helps the OP. It's A little hard to get right, but worth it to
set stuff like the JDK and IDE font size  (--fontsize 13 in
netbeans_default_options )

On Wed, May 25, 2022 at 11:13 AM Laszlo Kishalmi <laszlo.kisha...@gmail.com>
wrote:

>
> On 5/25/22 06:08, Stroud Custer wrote:
>
> I took the sage advice of several of the responders to this question and
> installed the Oracle version of Java 18.0.1.1 into my home directory.  I
> did not have success with placing a modified netbeans.conf in the
> netbeans/etc file located in the snap directory in my home directory.
>
> I'm curious, what went wrong there? Have you followed my instructions or
> the one on Stackoverflow (that one is outdated and does not work on
> NetBeans 13)?
>
> I'd not recommend this desktop file workaround to anyone. The file would
> need to be updated every release.
>
>
> To get netbeans to use the newly installed JDK when invoked from the KDE
> menu, I edited the netbeans_netbeans.desktop file in
> /var/lib/snapd/desktop/application to add the --jdkhome parm as shown below.
>
> Thanks to everyone who responded to this issue.  I guess I will have to
> educate myself on snap.
>
>
> [Desktop Entry]
> X-SnapInstanceName=netbeans
> Type=Application
> Name=Apache NetBeans 13
> Comment=Apache NetBeans, The Smarter Way to Code
> Exec=env
> BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/netbeans_netbeans.desktop
> /snap/bin/netbeans %F *--jdkhome jdk-18.0.1.1*
> Categories=Development;IDE
> Icon=/snap/netbeans/58/meta/gui/icon.png
> Terminal=false
> StartupWMClass=Apache NetBeans IDE 13
>
>

--

*- Juan Algaba*

Reply via email to