Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running swing applications results in HeadlessException #102

Open
remipannequin opened this issue Nov 13, 2024 · 0 comments
Open

Running swing applications results in HeadlessException #102

remipannequin opened this issue Nov 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@remipannequin
Copy link

I run Eclipse under Fedora40/Gnome, which use wayland as compositor.

When trying to execute a java swing program, I get the following error :

java.awt.HeadlessException:
No X11 DISPLAY variable was set,
or no headful library support was found,
but this program performed an operation which requires it,

If manually setting the DISPLAY variable in the environment tab (to the usual value of :0), the error becomes:

java.awt.AWTError: Can't connect to X11 window server using ':0' as the value of the DISPLAY variable.

I executed flatpak with a verbose flag, and noticed that the DISPLAY variable is not set. This might be due to commit 71fef86.

Manually removing the wayland socket and adding x11 fixed the issue.

flatpak override --user --socket=x11 --nosocket=wayland org.eclipse.Java

@remipannequin remipannequin changed the title Running swing applications result in HeadlessException Running swing applications results in HeadlessException Nov 13, 2024
@Mailaender Mailaender added the bug Something isn't working label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants