top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Is it possible to convert Java byte code into source code, if yes do we have any free tool?

+2 votes
797 views
Is it possible to convert Java byte code into source code, if yes do we have any free tool?
posted Mar 20, 2015 by Salil Agrawal

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

The process of disassembling Java bytecode is quite simple, not as complex as native c/c++ binary.
The first step is to compile the Java source code file, which has the *.java extension through javac utility that produce a *.class file from the original source code in which bytecode typically resides.
Finally, by using javap, which is a built-n utility of the JDK toolkit, we can disassemble the bytecode from the corresponding *.class file. The javap utility stores its output in *.bc file.

Note: Here remember one thing: It does display only the methods signature used in the source code, The entire source code of the Java executable, even if it contains methods related to opcodes, would be showcased by the javap –c switch

Drive:\> Javap –c LoginTest

This command dumps the entire bytecode of the program in the form of a special opcode instruction.

we shall use WinHex editor to disassemble the bytecode, which will produce the implementation logic in hexadecimal bytes, along with the strings that are manipulated in the application.

answer Mar 22, 2015 by Amit Kumar Pandey
...