Skip to content

Running swing applications results in HeadlessException #102

@remipannequin

Description

@remipannequin

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions