• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

can we decompile and get the orginal source code,is it possible?

 
Vishal Hegde
Ranch Hand
Posts: 1077
Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is it possibe to decompile the class file and get the source code???if yes how come java becomes security concious?
 
Rob Spoor
Sheriff
Pie
Posts: 20661
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't get the source code as is, because all comments are removed, and generic information is also gone. Most of it is still available. You can make it harder by using obfuscators but all those do is make it hard to read the decompiled code, not impossible.
 
Henry Wong
author
Marshal
Pie
Posts: 21494
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Decompiling an executable, is *always* an option -- regardless of the program. The JVM needs to open and read class files, so hence, the class files can be opened by a decompiler. This is also true for other languages. Something has to be able to read and run the program, hence, another thing should be able to read and decompile it.

There is no way to stop decompilation. The only thing that can be done is to make it harder. In the case of Java, there are ofuscators that does weird things to the class files, so that they will still run, but will look weird when they are decompiled. But even then, a good programmer can easily get the jist of the decompiled code.

Henry
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic