1

I'm working on a project involving servlets. Using JD Java Decompiler for Eclipse I can decompile and read through all the class files making up jars in Reference libraries. Is it possible to read the contents of a WAR file in a similar way?

Also, is there a way to break down executable jar files and read the original code?

alex28
  • 552
  • 2
  • 10
  • 19

1 Answers1

7

Just unzip the .war file and decompile the individual classes. A WAR-file is a type of JAR-file.

Pål Brattberg
  • 4,568
  • 29
  • 40
  • Thanks, I was unsure since eclipse doesn't allow to just view the contents of a war file the way it allows you to view the class files making up a jar file. Do you happen to know of any good tutorials/reference materials for working with them – alex28 Jun 29 '11 at 17:06
  • For working with WAR-files? Sun `^M^M^M` Oracle should have the basic info, if you need more than that you need to be more specific. Also, google `java war` for some more information. – Pål Brattberg Jun 29 '11 at 17:09
  • Here's a good start I believe: http://download.oracle.com/javaee/6/tutorial/doc/gipio.html Also, if this answered your question, feel free to accept! :) – Pål Brattberg Jun 29 '11 at 17:13
  • Yeah, I think that about covers it – alex28 Jun 29 '11 at 18:11