You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "mbien (via GitHub)" <gi...@apache.org> on 2025/11/12 01:09:10 UTC
[PR] wakefield: MainWindow WLToolkit CCE fix [netbeans]
mbien opened a new pull request, #9004:
URL: https://github.com/apache/netbeans/pull/9004
first commit is the fix, second is just cleanup
- only run x11 workarounds when x11 toolkit is active
- wakefield may use WLToolkit on wayland (`-Dawt.toolkit.name=WLToolkit`)
The `#183739` might be still useful, unfortunately I don't know what `#198639` does since bugzilla isn't loading the issue for me.
symptom: startup failure
<details>
```
java.lang.ExceptionInInitializerError
at java.desktop/sun.awt.X11.XAtom.<init>(XAtom.java:244)
at java.desktop/sun.awt.X11.XWM.<clinit>(XWM.java:340)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:467)
at java.base/java.lang.Class.forName(Class.java:458)
at org.netbeans.core.windows.view.ui.MainWindow.init(MainWindow.java:136)
at org.netbeans.core.windows.WindowSystemImpl.init(WindowSystemImpl.java:46)
at org.netbeans.core.GuiRunLevel.initializeMainWindow(GuiRunLevel.java:127)
at org.netbeans.core.GuiRunLevel.run(GuiRunLevel.java:72)
at org.netbeans.core.startup.Main.start(Main.java:316)
at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:97)
at java.base/java.lang.Thread.run(Thread.java:1474)
Caused by: java.lang.ClassCastException: class sun.awt.wl.WLGraphicsEnvironment cannot be cast to class sun.awt.X11GraphicsEnvironment (sun.awt.wl.WLGraphicsEnvironment and sun.awt.X11GraphicsEnvironment are in module java.desktop of loader 'bootstrap')
at java.desktop/sun.awt.X11.XToolkit.<clinit>(XToolkit.java:508)
... 12 more
```
</details>
I don't think project wakefield has made builds available yet, so to test this (linux+wayland) it would require the following:
```
git clone -b jdk25-wayland --single-branch --depth 5 https://github.com/openjdk/wakefield.git
cd wakefield
bash configure --with-vulkan
make images
```
start nb using the wakefield JDK with the following flags:
```
-J-Dawt.toolkit.name=WLToolkit -J-Dsun.java2d.vulkan=True
```
you should see something like this in the log instead of the exception:
```
Vulkan rendering enabled: YES
Presentation enabled: YES
Accelerated surface data enabled: YES
Devices:
*0: NVIDIA GeForce GTX 1080
```
Doesn't look great on my system though. Something is wrong with the font AA, popups are all over the place and some overlays (e.g editor highlighting layer) doesn't work. It runs at least.
thanks to @cstamas for noticing this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] wakefield: MainWindow WLToolkit CCE fix [netbeans]
Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas commented on PR #9004:
URL: https://github.com/apache/netbeans/pull/9004#issuecomment-3523444056
@mbien followed your great instructions, but did not build this PR but ran "vanilla" 27 and it works nicely. What you see "popups are all over the place and some overlays" etc may be the fact that I have AMD and you NVidia?
```
Product Version: Apache NetBeans IDE 27
Java: 25-internal; OpenJDK 64-Bit Server VM 25-internal-adhoc.cstamas.wakefield
Runtime: OpenJDK Runtime Environment 25-internal-adhoc.cstamas.wakefield
System: Linux version 6.17.7-300.fc43.x86_64 running on amd64; UTF-8; en_US (nb)
User directory: /home/cstamas/.netbeans/27
Cache directory: /home/cstamas/.cache/netbeans/27
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] wakefield: MainWindow WLToolkit CCE fix [netbeans]
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #9004:
URL: https://github.com/apache/netbeans/pull/9004#issuecomment-3523360145
regarding [#198639](https://bz.apache.org/netbeans/show_bug.cgi?id=198639) / [archive](https://web.archive.org/web/20200511205428/https://bz.apache.org/netbeans/show_bug.cgi?id=198639) (the second workaround which was also the cause of the startup error).
I believe the better option there is to remove the workaround entirely. It could cause side effects and it appears that it was implemented for GTK LAF + old gnome version + X11 specifically, without checking if it is even active. E.g users reported that switching to metal fixed it - which should also apply to FlatLAF.
The more encapsulation breaking hacks we get rid off the better. Will update the PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] wakefield: MainWindow WLToolkit CCE fix [netbeans]
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien merged PR #9004:
URL: https://github.com/apache/netbeans/pull/9004
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] wakefield: MainWindow WLToolkit CCE fix [netbeans]
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #9004:
URL: https://github.com/apache/netbeans/pull/9004#issuecomment-3523510251
@cstamas thanks for testing! Yeah my system isn't a good indicator since I am still using cinnamon where wayland support is still considered experimental. I do actually like how simple and stable the window manager is, but if this doesn't improve with the upcoming releases I will switch to something else at some point.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] wakefield: MainWindow WLToolkit CCE fix [netbeans]
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #9004:
URL: https://github.com/apache/netbeans/pull/9004#issuecomment-3522561268
> NB. NetBeans can be run on the full JDK version of JBR to test this too, rather than requiring to build the JDK.
yep the JBR SDK ships wakefield. I prefer the most direct approach to test things though. Building JDKs is super easy.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] wakefield: MainWindow WLToolkit CCE fix [netbeans]
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #9004:
URL: https://github.com/apache/netbeans/pull/9004#issuecomment-3522687014
> Looks like what was suggested on Slack should we decide to keep this workaround in place.
the first workaround makes sense to me and is mostly harmless. I can't access the second issue unfortunately so I don't know if it makes sense to keep it. But its probably ok to stay as long X11 still exists, removing `--add-opens=java.desktop/sun.awt.X11=ALL-UNNAMED` would switch it off too.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists