Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to convert a jar/war file of .class files to a folder containing .java files

 
karthik sreeram
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to know how to convert a archive file[jar /war /ear] containing .class files to a folder whivh will contain only .java files ,i want to save this converted file in my pc .
is there any tool which is capable to do this.
let i explain my problem clearly : suppose i compiled some .java files in a directory using javac as : > javac -d classes src\*.java
after exectuing this i will get all my .class files in the classes directory,

Now i want to convert this .classes files to .java files and save them in my system,
please dont suggest any java decompilers which will convert .class file and just edit the the the .java file using .class file,
please suggest me any way to do this, that will do the following thing
>JJJJ -d src classes\*.class
which is just reverse to the functionality of javacompiler.
plese reply if u know abt it.
waiting 4 ur reply,
bye, thanks in advance.......
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What you are asking for is a decompiler. DJ Decompiler

If you dont want that to be done you might as well use javap.exe

javap will list the functions available in that class. It will obtain the wrong results if the code is obfuscated.

The syntax is "javap classFileName"
 
karthik sreeram
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks 4 ur reply,
but i know there are many java decompilers,which will just convert a .class file and edit that .class file's java code, but dont save java file in my pc,
i want to convert a bulk amount of .classes files to .java files and save those .java files in my personal computer.
please reply me any one, who knows about it.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you considered possibly following the link given above, and reading the documentation -- and that it's possible that your beliefs about how decompilers typically work are incorrect?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic