• Post Reply Bookmark Topic Watch Topic
  • New Topic

java Dcompilers  RSS feed

 
Hineena agarwal
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I wanted to know, why decompilers, when, decompiles a class file, show a completely different code, than what was written. And this specially happens, when there are loops in the code, after decompilation, we get, lots of goto statements, which we shouldn't use, according to good programming style.
 
Ramaswamy Srinivasan
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Though I don't hands on information, regarding De-Compilation, I found these links, once when I was searching on this topic.

Hope these help you.

How Decompilers Work

Decompilers Compared

Another forum in Sun's Site

And regarding number of "go to"s, to my knowledge, it is the way, the byte code handles instructions. Can any one give more information, in this area?

Cheers,
Ram
 
Ramaswamy Srinivasan
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By the way,

I missed this somehow.

Hearty Welcome to the Ranch. Hope you will enjoy your time here...

Cheers,
Ram
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java decompilers won't include "goto" statements in their output unless they failed to decompile the code, because there is no goto statement in Java! Furthermore, it's actually often true that Java decompilers produce output which is remarkably similar to the original source, because the Java language doesn't allow a lot of leeway in how it's compiled to bytecode. The statements you've made above apply to decompilers for C or other languages much more so than they do for Java.
 
Georgy Bolyuba
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Hineena agarwal:
Hi,

I wanted to know, why decompilers, when, decompiles a class file, show a completely different code, than what was written. And this specially happens, when there are loops in the code, after decompilation, we get, lots of goto statements, which we shouldn't use, according to good programming style.


Can you show the links on that decompilers?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!