如何在war文件中列出jar文件的内容 [英] how to list the contents of a jar file inside a war file

查看:81
本文介绍了如何在war文件中列出jar文件的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

让我说我有一个.war文件

Lets say I have a .war file

myWarFile.war

myWarFile.war

此文件中有一个jar文件-WEB-INF/myJarFile.jar

This file has a jar file inside it - WEB-INF/myJarFile.jar

我想在不提取war文件的情况下查看myJarFile.jar中的文件是什么.

I want to see what are the files inside myJarFile.jar without extracting the war file.

有办法吗?

推荐答案

jar xvf thewar.war /path/to/jar/inside/war #extract the file...    
jar tvf /path/to/jar/indide/war.jar # read the extracted jar  
rm /path/to/jar/inside/war # remove it 

我只是这样做了,它并没有删除我从战争中提取的文件.请验证一下...;)

I just did this and it did not delete the file I extracted from the war. Please verify that though...;)

这篇关于如何在war文件中列出jar文件的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆