Netbeans not working (Java issue?)

Hi everyone, it’s nice to be here and be a part of this great community! Manjaro just works so nice with everything out of the box.
However, I am having an issue with Netbeans in my BSPWM. When I started with the dmenu, Netbeans just loads and gets stuck in a blank screen.
When I started it with the terminal it prompts me this:

~ >>> netbeans
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.netbeans.core.windows.view.ui.MainWindow (jar:file:/usr/lib/netbeans/platform/modules/org-netbeans-core-windows.jar!/) to field sun.awt.X11.XToolkit.awtAppClassName
WARNING: Please consider reporting this to the maintainers of org.netbeans.core.windows.view.ui.MainWindow
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

However if I start it executing in the terminal first this instruction:

export _JAVA_AWT_WM_NONREPARENTING=1

Netbeans appears to work just fine (I have to bear the terminal open though)
However still prompts on the terminal the same warning:>

~ >>> export _JAVA_AWT_WM_NONREPARENTING=1
~ >>> netbeans
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.netbeans.core.windows.view.ui.MainWindow (jar:file:/usr/lib/netbeans/platform/modules/org-netbeans-core-windows.jar!/) to field sun.awt.X11.XToolkit.awtAppClassName
WARNING: Please consider reporting this to the maintainers of org.netbeans.core.windows.view.ui.MainWindow
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

So, I was wondering where could the problem be!!!

This is an application issue - and you should raise it with the developers at their source code repo.

Not so long ago - with another NetBeans issue - I tested the IDE and there was no issues (Openbox system).

As no two systems is identical - It may be something local to your system - there is really no way to know.

That warning has been around for years.

The experienced problem is from Java not recognizing your WM as non-reparenting.

1 Like

Thanks for your response. Exactly, each system and each installation is a world. Let’s hope that I can find the reason why Java is working like this in my installation.

So I guess that it might be a Java issue and it can affect other software.
Then it raises the question: is any way to make the launcher aware of this problem, so I don’t need to input the export command when executing the app from the terminal?

1 Like

Try in ~/.xinitrc

BSPWM is known to have problems like this with Java (Netbeans does not work on Manjaro bspwm 16.05 - Newbie Corner - Manjaro Linux Forum).

This link may help:
https://wiki.archlinux.org/index.php/Bspwm#Problems_with_Java_applications

Bro, you are a hero at this time… that’s the exactly issue that I had

1 Like

[Solution]

My results, based on this link:

  • For last version of JDK append line export AWT_TOOLKIT=MToolkit in ~/.xinitrc before exec window manager.

    • Did not work
  • Also, we can try to use wmname with line wmname compiz in your ~/.xinitrc

    • After also adding this line, Netbeans now loads.

Thanks!