简体   繁体   中英

Java class editor like eclipse viewer

I decompiled a Java .jar file, after editing the problem i'm having with it, its not compiling again. So, i had to opt-in to using 7-zip to just bring out the class file and, now i've used 5 different Class Editors, all can't show me the codes like i can understand...

I used CE(Classeditor.sourceforege.net) , dirtyjoe , javaeditor(javaeditor.org) , Jad and JD- GUi (Seems not to do its work at all)

I imported the .jar file into Eclipse as a Project Reference Library and the most painful thing is i can see all of the class codes, but i can't edit it...It won't edit. But, it can run. What can i do to Eclipse to be able to make it allow editing the .class files attached to it.

EDIT: I want A Class Editor That Shows in Codes Format, not bytecodes. I have the source as well in .java format.

This Example is Eclipse Class Viewer(I want same, but not only viewer).

Eclipse Class Viewer Image, I want something similar

It sounds like you want to be able to edit class files directly. The Eclipse class viewer only works because it finds (in your project folder or online) a source code version of the jar that you're viewing. It's not actually looking at the class files and decompiling them, AFAIK. So, if you can view the source in Eclipse, your best bet may be to find the source version of the jar (on your machine or on maven, possibly, if you're using maven), and then edit it and build it yourself according to that project's build instructions. How hard that is depends on the library.

As far as being able to decompile, edit, and recompile, I'm not sure. I know that decompilers are not foolproof, and I've only used them as a last-ditch, read-only tool. It seems like it should work both ways, but I wouldn't be surprised to hear it doesn't.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM