• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

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

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.......
 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author and iconoclast
Posts: 24204
44
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
knowledge is the difference between drudgery and strategic action -- tiny ad
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic