Why "bytecode"? Can you reverse-engineer the code from bytecode?

Showing Answers 1 - 3 of 3 Answers

Prachi

  • Mar 14th, 2005
 

Bytecode - a machine independent way of representing an application .Yes we can reverse - engineer the code from bytecode , using Decomplier like JODE , Mocha. Mocha reads one or more files of bytecodes (classes) and converts them back to Java source code. Although the code generated by Mocha is not exactly the same as the original source code, it is close enough for someone to understand and modify.

  Was this answer useful?  Yes

viswanath

  • Mar 14th, 2005
 

If you develop a software and willing to give share & use your interfaces but not the inner workings, there definitely needs to be a mechanism to hide your implementations. If java compiles to machine code, you need to share your source code too as compilation on each m/c would be different. In the same way as you like your code to be universally used but just give away with the bytes, the java infrastructure would provide for this.Java interpreterJIT comes into picture to resolve from byte-code to machine code,and this interpreter is machine specific(as has to be). It is this byte code that can be ported across different machines without recompiling. If no byte code, then each compilation will be machine specific.

  Was this answer useful?  Yes

saurav sen

  • Apr 1st, 2005
 

Yes it can be reversed, you can reverse a class file into a .java file, using a freely available tool named DJ JAVA DECOMPILER. A bytecode is effecient as it is compile once and run anywhere all it needs a JVM and that is the benifit and makes it a platform indepent, well not totally only if you are creating applets.. and servlets for that matter

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions