Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

conversion

 
bharati
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to convert .class file to .java file.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hmmmmmmmmmm...
Interesting qstn.....this seems more like a
reverse engg than just a simple conversion...
not sure if we can do this kind of stuff.
If I were to guess, I would say NO.
Regds.
- satya
 
Surya B
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bharati,
I don't know whether this question should be in the programmer certification or not , anyway coming to your question,you can convert a .class file to a .java file using decompilers and the most commonly used is the decompiler mocha.
But i guess if you want to decompile a commercial java application then it may not work because they use something called obfuscators whereby the source code produced by a decompiler is much less readable.By the way Mocha is a shareware and you can dowload and use it.Hope this helps.
 
Deepa sivasankar
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use the java disassembler and see the assembly instructions. But i am not sure for getting the source.
 
Anand Iyer
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes.. u can convert the .class to .java files. There are freewares available.
Also, to counter this one, there are special softwares (I think these are called Obfuscators).. which kind of "encrypt" your
.class file so that the decompilers don't give good results.
If you want to have a look at the .class file format you can see
one at www.vijaymukhi.com. After that maybe you will write one
decompiler
p.s. Vijay Mukhi's site also has a link to a Decompiler.. Check it out..

[This message has been edited by Anand Iyer (edited June 14, 2000).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic