aspose file tools*
The moose likes Java in General and the fly likes how to list info of more than one jar. 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 list info of more than one jar." Watch "how to list info of more than one jar." New topic
Author

how to list info of more than one jar.

jing hu
Ranch Hand

Joined: Jun 30, 2009
Posts: 63
use
jar -tf test.jar
I can get the info in the test.jar
I want to know many .jars info.
how to do this?
I test "jar -tf test1.jar test.2.jar", but i can't success.
Any one tell me the answer or solution, thanks.
Balu Sadhasivam
Ranch Hand

Joined: Jan 01, 2009
Posts: 874

Jing,

I guess thats not possible. What you could do is to write script or batch file (depending on OS) to take each jar file in a directory and execute jar -tvf command on it and store the output to a file.
jing hu
Ranch Hand

Joined: Jun 30, 2009
Posts: 63
ok, thanks.
Tanzy Akhtar
Ranch Hand

Joined: Jul 19, 2009
Posts: 110
Thanks jing, for the useful command.


Thanks,
Tanzy.


Roll with punchers, there is always tomorrow.
Techie Blog -- http://jtanzy.blogspot.com/
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617


Balu Sadhasivam
Ranch Hand

Joined: Jan 01, 2009
Posts: 874

David Newton wrote:


Did that work ? xargs will still supply all info to piped command and same as jar -tvf 1.jar 2.jar.. script would be better option.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to list info of more than one jar.