How to open a .war (web archive) or .jar (java archive) files

With Java we generate .JAR files to bundle a set of resources. For J2EE web applications, we generate .WAR (Web Archive) files for deploymen...

With Java we generate .JAR files to bundle a set of resources. For J2EE web applications, we generate .WAR (Web Archive) files for deployments. Both of these are ways of archiving a set of files.

Both these .jar or .war archives are in zip format. So there are plenty of ways to open those files to read the content. One way would be to use any tool that you use to open/extract a .zip file. Next will be to use the Jar command itself.

JAR Command
JAR (command) utility in Java can be used to open/extract these files as follows. Run following command from the folder where you need the content to be extracted by providing the path to the archive.

jar xf <path-to-file>

options:
x - extract the files
f - file to extract

jar xf myWebApp.war
jar xf myProject.jar

Related : Open and read a file inside a war file of a web application with Java

COMMENTS

BLOGGER: 2
Loading...
Name

About,8,Adsense,3,Ant,1,Apache,2,Axis,3,Database,2,Earn Online,3,Eclipse,8,Firefox,9,Google,27,GWT,8,Hardware,3,IE,1,Internet,1,Java,48,Javascript,8,Jenkins,1,Linux,6,Miscellaneous,18,News,46,Opinion,9,PHP,1,Productivity,3,Puzzle,3,Security,3,Software,25,Sports,9,Spring,2,TDD,4,Tech,87,Tips,18,Tomcat,5,Tools,19,Tutorial,13,Ubuntu,4,Web application,12,Web Design,2,Web services,4,Windows,3,
ltr
item
digizolm12: How to open a .war (web archive) or .jar (java archive) files
How to open a .war (web archive) or .jar (java archive) files
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipIcSYKRwZBUBOC0k40kJrEYBKmwBd6sHCkRpe2FvX3K93EooSlZqdim4rd_-1Gs-PmJirCZw6BinbSp1sV3GlTlD3kBfGMJn_jz3hGXwS6CYJERKtAHl75iTLOl93CrJ6faLml5dRNvjr/s400/.jar+.war+.zip.jpg
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipIcSYKRwZBUBOC0k40kJrEYBKmwBd6sHCkRpe2FvX3K93EooSlZqdim4rd_-1Gs-PmJirCZw6BinbSp1sV3GlTlD3kBfGMJn_jz3hGXwS6CYJERKtAHl75iTLOl93CrJ6faLml5dRNvjr/s72-c/.jar+.war+.zip.jpg
digizolm12
https://digizolm12.blogspot.com/2008/07/how-to-open-war-web-archive-or-jar-java.html
https://digizolm12.blogspot.com/
http://digizolm12.blogspot.com/
http://digizolm12.blogspot.com/2008/07/how-to-open-war-web-archive-or-jar-java.html
true
1218430210337039745
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy