MemoryLeak
MemoryLeak

Reputation: 7318

what software can help me to unwar a war file and get the java source code within it?

what software can help me to unwar a war file and get the java source code within it ?

Upvotes: 0

Views: 3165

Answers (3)

Koekiebox
Koekiebox

Reputation: 5963

If you want to do it programaticly, do the following:

  • Use java.util.zip.ZipInputStream to read the war file. See Sun Compression
  • Once the file is "unzipped". Write a class that will browse the directory tree of the unzipped archive.
  • Then use a java.io.FilenameFilter that only returns .java files. File.listFiles, See List Files

    Upvotes: 0

  • ericp
    ericp

    Reputation: 611

    I like http://www.rarlab.com/ WinRar for my XP. You can even search the war for certain class names, files containing certain text, etc.

    Upvotes: 1

    Prabhu R
    Prabhu R

    Reputation: 14222

    Use a normal zip utility like 7zip to open the war file and extract the content and use jd-gui to decompile the classes

    Upvotes: 2

    Related Questions