Netbeans not working on debian 11 (chromebook)

so i can use the terminal to try and run netbeans but i get an error message about sava being unable to connect to the x11 window server. Could anyone help me with this?

Are you running the NetBeans snap by Apache NetBeans, shown below? That package runs in classic mode, so it should have full access to your system.

What is the exact text of the error messages you receive? Just copy and paste the error messages from your Terminal into a comment here. Thanks.

Is there any chance you’re using X11 forwarding, such as with ssh -X, and getting the following messages?

$ strictly-netbeans 
WARNING: package com.apple.eio not in java.desktop
X11 connection rejected because of wrong authentication.
java.awt.AWTError: Can't connect to X11 window server using
    'localhost:10.0' as the value of the DISPLAY variable.

If so, you can work around the problem by export the XAUTHORITY environment variable before starting NetBeans, like so:

$ export XAUTHORITY=$HOME/.Xauthority
$ strictly-netbeans 

I assume you’re using the currently unlisted Strictly NetBeans snap because you’re on an ARM Chromebook. I’ll see whether I can fix this problem in the Snap package itself. I also plan to make the Snap package public soon.