I have jar containing different folder, sub-folder and files.
To list and view the content of the jar i can use jar -tvf jar_name
.
Is there any way jar -tvf or similar other command which will list only directory inside content of jar.
I am seeing jar have following option but other than -t
, I cant find which can help to list files or folder specifically.Not all in once with -t
option.
jar Options:
-c create new archive
-t list table of contents for archive
-x extract named (or all) files from archive
-u update existing archive
-v generate verbose output on standard output
-f specify archive file name
-m include manifest information from specified manifest file
-e specify application entry point for stand-alone application
bundled into an executable jar file
-0 store only; use no ZIP compression
-M do not create a manifest file for the entries
-i generate index information for the specified jar files
-C change to the specified directory and include the following file
I need to load the jar files and display the folder and files in the tree structure. What could be the best approach implement such logic.