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

Allow the Decompiler (Fernflower) to also work on .jar files #3369

Closed
dasTanmoy0096 opened this issue Jan 24, 2025 · 3 comments
Closed

Allow the Decompiler (Fernflower) to also work on .jar files #3369

dasTanmoy0096 opened this issue Jan 24, 2025 · 3 comments

Comments

@dasTanmoy0096
Copy link

According to FernFlower's documentation at https://github.com/JetBrains/intellij-community/tree/master/plugins/java-decompiler/engine, seems like it does support decompiling .jar files yet the Language Server doesn't seem to be able to process those files. I know I can just simply extract and decompile those files individually, but a jar viewer/decompiler would also be nice.

@rgrunber
Copy link
Contributor

I think a similar thing was asked in #3160 . What client are you using with JDT-LS ? I think it's just a matter of moving some code into JDT-LS so we can properly handle jar files.

@dasTanmoy0096
Copy link
Author

dasTanmoy0096 commented Jan 29, 2025

Currently using VSCode with JDT-LS, and it does mention in that issue that the Project Manager can look inside jars. But I believe it's only for dependency jars though? Not sure if it can decompile project target jars.

@rgrunber
Copy link
Contributor

rgrunber commented Jan 29, 2025

Yup, It only seems to do it for dependencies and the JRE. We'd have to figure out if we can represent jar files that aren't dependencies in the project's Java model. I don't think we'd want to add it to the classpath, but if we could just pass the URI and get some kind of Java model element, it should be possible. I'll mark this as a duplicate in favour of #3160 since once that's addressed, we could do this.

Also, we do support using Fernflower for arbitrary .class files. See redhat-developer/vscode-java#2985 (comment) . The issue with that approach is whether creating a custom editor page for a Jar file is really the right approach.

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

No branches or pull requests

2 participants