aspose file tools*
The moose likes Java in General and the fly likes how to convert a jar/war file of .class files to a folder containing .java files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "how to convert a jar/war file of .class files to a folder containing .java files" Watch "how to convert a jar/war file of .class files to a folder containing .java files" New topic
Author

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

karthik sreeram
Greenhorn

Joined: Jul 10, 2006
Posts: 9
HI ,
I want to know how to convert a .jad file to .java file,
i have large number of .jad files[around 4000] to .java files,
is there any tool to do this,
please reply me , if you know about it,
thanks in advance
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14347
    
  22

Can't you just rename the files (*.jad -> *.java)?


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Chetan Raju
Ranch Hand

Joined: Aug 02, 2006
Posts: 109
As per my understanding, you mean to ask how to convert class files to java files. If this is the query then the answer is that you unzip/untar the war/jar files to a folder and then use a decompiler to decompile the classes to java files. DJ Decompiler is one that I can suggest. However, there can be many available on the net.
karthik sreeram
Greenhorn

Joined: Jul 10, 2006
Posts: 9
thanks for replying,
what i want exactly is to rename a bulk amount of .jad files to .java files,
is there any tool to rename a directory of files from .jad to .java.
Chetan Raju
Ranch Hand

Joined: Aug 02, 2006
Posts: 109
ren *.jad *.java should work if im not wrong
Jeroen T Wenting
Ranch Hand

Joined: Apr 21, 2006
Posts: 1847
Originally posted by Chetan Raju:
ren *.jad *.java should work if im not wrong


if you're on a Windows machine and they're all in the same directory

But the principle is sound, other operating systems have similar commands, some of them may even have an option to recursively process deeper directories.


42
Rajah Nagur
Ranch Hand

Joined: Nov 06, 2002
Posts: 239
Write a Java program to rename the files.


You can't wake a person who is <b><i>pretending</i></b> to be asleep.<br />Like what <b>"it"</b> does not like - <i> Gurdjieff </i>
karthik sreeram
Greenhorn

Joined: Jul 10, 2006
Posts: 9
Thanks the renaming utility is working , but it is renaming the files in the current directory only,
but i want to rename the entire directory tree containing .jad files to .java files, how can i?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42612
    
  65
Are you aware that Jad has an option that allows you to set the extension being used for decompiled files? That way there would be no need to rename the files.


Ping & DNS - my free Android networking tools app
karthik sreeram
Greenhorn

Joined: Jul 10, 2006
Posts: 9
thanks , jad is working ,thanks everyone , i got my solution.
 
Don't get me started about those stupid light bulbs.
 
subject: how to convert a jar/war file of .class files to a folder containing .java files