Big Sur + Netbeans : cannot open/create projects

After MacOS upgrade to Big Sur and having made changes to 'netbeans_jdkhome' into the netbeans.conf file, the application is opened and running but it is NOT possible to open any of my projects because the box with my project files under "Documents" shows empty content (and of course my files are present there).

Nor is it possible to create a new project, here some log messages:


cd /Users/bparis/Documents/Netbeans; JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-15.0.1.jdk/Contents/Home "/Applications/NetBeans/Apache ....
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Operation not permitted
pwd: error retrieving current directory: getcwd: cannot access parent directories: Operation not permitted
pwd: error retrieving current directory: getcwd: cannot access parent directories: Operation not permitted
chdir: error retrieving current directory: getcwd: cannot access parent directories: Operation not permitted
chdir: error retrieving current directory: getcwd: cannot access parent directories: Operation not permitted
Scanning for projects...

Same issue with Apache NetBeans 11.2 and 12.2.

So I suppose Netbeans is not allowed to access files on disk.
I went into my "System > Preferences > Security and Privacy" to try to change that behavior but Netbeans is not being listed and I can't add it" ("+" button not activated).

I can give Netbeans the permission "Full access" to disk but that does no change.

Thanks for any help,
Bernard
Issue reported to apache devs.

Workaround : start Netbeans from a terminal window:
> "/Applications/NetBeans/Apache NetBeans 11.2.app/Contents/Resources/NetBeans/netbeans/bin/netbeans"
Dear bparis,

Thank you very much. But when we run Netbeans from terminal, we cannot open the old projects. It starts to open, but stops on 10% opening progress.
Since Apple and Apache seems to not care about this important issue, i can tell you that what worked for me, it was to give full access to disk to "Terminal, Netbeans, java and sh" from "System > Preferences > Security and Privacy".

Hope this helps someone.
I am a Java developer, Computer Science educator and regular Netbeans user. Although I do not currently actively develop for the Netbeans team, I am subscribed to the developer mailing list and actively follow the Netbeans Developer Community through it.

@david_munoz I think your comments regarding the developers of Netbeans are high misplaced. "Apache" do not develop Netbeans - the Netbeans team, a small community of dedicated volunteers do. Many have been active contributors to the development since Sun first introduced Netbeans and have taken on the Herculean task of migrating the code from its previous ownership by Oracle corp., with dozens of different code-bases, conflicting licenses etc., to a single fully open source project, with one code-base, running under an Apache umbrella with a single Apache license. Issues with MacOS builds of Netbeans are discussed frequently on the mailing list and the developers aim to support MacOS fully for every release of both products. The key here is that Apple do not seem to make it easy for people developing outside of their ecosystem, especially Java devlopers, and they seem keen to turn MacOS into the same kind of 'no user serviceable parts' affair as iOS.

As a developer, if you feel strongly that is not being give a high enough priority, why not get involved yourself and try helping fix it? The guys at netbeans.apache.org would certainly welcome your contributions.
Hi, if you have found a solution for this, please let me know.
I'm using Netbeans 12.2 with a JDK 15 installed. I have the same issue and i have been trying to fix it all week for my university purposes. Do let me know!

FWIW, @david_munoz solution worked for me. I had the IDE + /usr/bin/java in Full Disk Access, seems adding /bin/sh there resolved the issue for me.

Big Sur + Netbeans : cannot open/create projects
 
 
Q