Skip to content

Bytecode-Viewer-2.12 not work on Wayland with Gnome #502

Open

Description

@TechComet

Hi,

Bytecode Viewer 2.12 not work on Wayland with Gnome

System OS: Fedora Linux 40
Desktop: Gnome 46

java -jar ./Bytecode-Viewer-2.12.jar
output:

$ java -jar ./Bytecode-Viewer-2.12.jar
Bytecode Viewer 2.12 [Fat Jar] - Created by @Konloch
https://bytecodeviewer.com - https://the.bytecode.club
Cannot set security manager! Are you on Java 18+ and have not enabled support for it?
Because of this, you may be susceptible to some exploits!
Either deal with it or allow it using the -Djava.security.manager=allow parameter.
Exception in thread "main" 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,

	at java.desktop/java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:166)
	at java.desktop/java.awt.Window.<init>(Window.java:553)
	at java.desktop/java.awt.Frame.<init>(Frame.java:428)
	at java.desktop/java.awt.Frame.<init>(Frame.java:393)
	at java.desktop/javax.swing.JFrame.<init>(JFrame.java:180)
	at the.bytecode.club.bytecodeviewer.gui.components.JFrameConsole.<init>(JFrameConsole.java:48)
	at the.bytecode.club.bytecodeviewer.gui.components.JFrameConsole.<init>(JFrameConsole.java:44)
	at the.bytecode.club.bytecodeviewer.api.ExceptionUI.<init>(ExceptionUI.java:67)
	at the.bytecode.club.bytecodeviewer.BytecodeViewer.handleException(BytecodeViewer.java:652)
	at the.bytecode.club.bytecodeviewer.BytecodeViewer.handleException(BytecodeViewer.java:644)
	at the.bytecode.club.bytecodeviewer.BytecodeViewer.main(BytecodeViewer.java:239)

Activity

  1. Bl3nd commented on Jul 22, 2024

    @Bl3nd
    Contributor

    I have found a forum post that discusses this issue in relation to your OS. You may find this link useful. I hope this solves your issue.

  2. Konloch commented on Jul 23, 2024

    @Konloch
    Owner

    Hey @TechComet, thanks for the report. I believe to make the CLI work correctly we'll have to separate the GUI from the core. Essentially the CLI will need to preform actions without relying on the GUI. There's no ETA for this yet but I'll work on solving this. Sorry about that issue!

    @Bl3nd Thanks for the solution! Hopefully that will work in the mean time.

  3. self-assigned this
    on Jul 23, 2024
  4. ddxv commented on Aug 31, 2025

    @ddxv

    I was hitting this issue as well. The link above by @Bl3nd was very useful and led me to the simple fix:

    james@fedora:~$ rpm -qa | grep openjdk
    java-21-openjdk-headless-21.0.8.0.9-1.fc42.x86_64
    
    james@fedora:~$ sudo dnf install java-21-openjdk

    Looks like I had a headless version installed, installing the regular one and bytecode-viewer starts right up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions