Issue
I installed Netbeans 11.2 on Ubuntu 18.04 via snap.
Now i want to configure Netbeans, modifying netbeans.conf
. This file is placed at /snap/netbeans/current/netbeans/etc/
and is mounted as read-only file system. So i assume you should not edit this file here.
How do i configure Netbeans if the classic way (editing netbeans.conf
) is blocked?
Note: I want to set netbeans_jdkhome="~/.sdkman/candidates/java/latest/"
.
UPDATE
This works:
netbeans --jdkhome ~/.sdkman/candidates/java/latest
Solution
You CAN have user local versions of the netbeans configuration. Just copy the global netbeans.conf from the global snap location to your Netbeans user directory and make your changes there.
Example for version 11.3 of Netbeans:
mkdir -p ~/snap/netbeans/common/data/11.3/etc cp /snap/netbeans/current/netbeans/etc/netbeans.conf ~/snap/netbeans/common/data/11.3/etc/netbeans.conf gedit ~/snap/netbeans/common/data/11.3/etc/netbeans.conf
NOTE: You will need to repeat this process whenever the user directory changes as a result of a version update. Ie. from 11.3 -> 12, etc.
Answered By - Kim Jersin
Answer Checked By - Dawn Plyler (JavaFixing Volunteer)