Reputation:
I have a java decompiler program jd-gui.exe
which decompiles the jar/class files, it works perfect, but I have a marshaled object inside the jar file that jd-gui.exe
cannot understand it.
the question is, is it possible to decompile the marshaled java object?! I mean unmarshal the object into class file then decompile it.
thanks in advance.
EDIT: the marshaled object is kinda serialized object
Upvotes: 1
Views: 662
Reputation: 719006
I assume that when you talk about marshalled objects, you mean objects that have been serialised using the Java Object Serialization subsystem.
A serialization contains the state of the object(s), together with their type signatures. It does not include the bytecodes for the objects' methods. So the answer to your question is that it is not possible ... unless you have the bytecodes elsewhere in the JAR file.
FWIW - I'm not aware of any serialization scheme for Java in which the bytecodes are embedded in the serial form. So the above answer probably applies in the general case.
Upvotes: 1