Skip to content

Conversation

nkilders
Copy link
Contributor

@nkilders nkilders commented Oct 1, 2025

This PR fixes #4114

Problem

When using the extension in Windows Subsystem for Linux (WSL), the decompiled.javaClass editor does not work properly. Opening a .class file results in an error text, "The file is not displayed in the text editor because it is either binary or uses an unsupported text encoding."

Screenshot Opening .class file without fix

Clicking "Open Anyway" opens the raw bytecode rather than the decompiled sources:

Screenshot 'Open Anyway' before fix

When right-clicking a .class file and selecting "Open With...", the decompiled.javaClass editor is not listed:

Screenshot 'Open With...' dialog without fix

Solution

By adding a new filename pattern to the package.json file, the issue is gone. Opening a .class file directly shows the decompiled code, and the "Open With..." dialog also lists the decompiled.javaClass editor.

Screenshots Opening .class file with fix 'Open With...' dialog with fix

@rgrunber
Copy link
Member

rgrunber commented Oct 1, 2025

Seems pretty reasonable to me, especially when it just works 😜 I'm guessing all the URIs are vscode-remote:// when dealing with WSL. @fbricon let me know if you see any issues with this.

@fbricon fbricon merged commit 1fc4597 into redhat-developer:main Oct 2, 2025
2 checks passed
@fbricon
Copy link
Collaborator

fbricon commented Oct 2, 2025

thanks @nkilders!

@nkilders nkilders deleted the wsl-decompiler-fix branch October 2, 2025 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Opening a .class file on a remote window doesn't show decompiled source

3 participants