The system jar command always extracts into the current directory.
While this may be tolerable (albeit somewhat inconvenient) when executed from a shell or via `Process.exec` such that the current directory can be changed, it is not possible to control the output directory when the `jar` command is invoked via the `ToolProvider` SPI, as in
var jarTool = ToolProvider.findFirst("jar");
The workaround is that one has to exec the command in order to set the output directory.
While this may be tolerable (albeit somewhat inconvenient) when executed from a shell or via `Process.exec` such that the current directory can be changed, it is not possible to control the output directory when the `jar` command is invoked via the `ToolProvider` SPI, as in
var jarTool = ToolProvider.findFirst("jar");
The workaround is that one has to exec the command in order to set the output directory.
- duplicates
- 
                    JDK-8173970 jar tool should have a way to extract to a directory -           
- Resolved
 
-         
- relates to
- 
                    JDK-8321617 Support semi-standard file permissions in ZipEntry -           
- New
 
-