Specifically what I am trying to do is to list the contents of a jar which is inside a tar.
Well let me be even more specific. I have a situation where I have a tar file, inside this tar file is a series of other tar files, inside these tar files there are jar files and inside these jar files there may be other jar files. Ideally I would love to be able to do is a) list all jar files which sit inside the inner tar files and b) list the jar files that then may be present within these jar files.
Ideally I would like to do this with as little unarchiving as possible. So far I have been able to list all jar files that are present in the inner tar files by unarchiving the outer tar file. As far as I can see I would have to at least unarchive the inner tar files or the individual first layer of jar files to be able to list all inner jar files present there.
Any possible solution involving Java/Groovy or even linux command line would be most welcome.