Fork me on GitHub
#emacs
<
2018-09-18
>
stardiviner10:09:58

Emacs has a major mode javap-mode can view .class file. But I can't use javap-mode to view .class file in .jar file (which is opened in archive-mode in Emacs). Does anybody know how to handle this?

vemv11:09:52

there's an example of opening files-in-jars in the CIDER codebase which you may copy

jumar12:09:45

Isn't cider-open-classpath-entry and then opening the class file an option?

stardiviner04:09:45

@U06BE1L6T cider-open-class-entry open .jar file is same as open .jar file directly Emacs auto use archive-mode. Same as I do.

stardiviner04:09:00

After I open the .class file. I run command javap-buffer. Got error:

Error: Can't found class: SpeechRecognizer

jumar06:09:26

@U28FF36Q4 Well, I guess the more interesting part is to open the class file itself which should show a decompiled class. I don't remember if I set up anything special but I think I didn't (I use spacemacs).

jumar06:09:26

Well, not really decompiled but the kind of output you would get from javap

stardiviner03:09:22

I tried Emacs open a plain .class file. It can be decompiled. But when class file in .jar archive file. it can't be decompiled. I submitted an issue https://github.com/hiredman/javap-mode/issues/7