I am creating a Python script within which I am executing UNIX system commands. I have a war archive named Binaries.war which is within an ear archive named Portal.ear
The Portal ear file resides in, say /home/foo/bar/
jar xf /home/foo/bar/Portal.ear Binaries.war
Will extract the Binaries.war file out of the /home/foo/bar/Portal.ear archive into the current directory I am running the script from.
How do you specify a target directory to be extracted to using just one command? I would like to do something like this to extract Binaries.war into the directory /home/foo/bar/baz
jar xf /home/foo/bar/Portal.ear Binaries.war [into target directory /home/foo/bar/baz]
I searched the the JAR man page for options and can't seem to find a simple way to do this. Of course I can extract the archive into my current directory and then move it using mv but I'd like to do this in one shot and not shuffle directories and files around.