I am trying to extract a jar file using the following command:
C:\Program Files\Java\jdk1.7.0_25\bin>jar xf C:\Users\...\MyJar.jar
but get the error:
java.io.IOException: META-INF : could not create directory
at sun.tools.jar.Main.extractFile(Main.java:953)
at sun.tools.jar.Main.extract(Main.java:877)
at sun.tools.jar.Main.run(Main.java:263)
at sun.tools.jar.Main.main(Main.java:1177)
What can it be solved?
To unpackage a JAR, you need a program that can extract compressed files. Windows includes functionality for this, but you can also use file extraction software like 7-Zip or WinRAR to get the job done. Open the JAR file within the software, and you can browse all the folders and files within it.
1 -Right click on the jar file and click on Open with and then click on choose another app. 5 – Select java.exe and click OK. If all of the above methods fail, search for jarfix program on Google and download it. This will instantly fix the issue.
The jar-file argument is the filename (or path and filename) of the JAR file from which to extract files. archived-file(s) is an optional argument consisting of a space-separated list of the files to be extracted from the archive. If this argument is not present, the Jar tool will extract all the files in the archive.
It's because you don't have write permissions in C:\Program Files\Java\jdk1.7.0_25\bin
.
Try uncompressing it in a different folder or open a console as administrator.
It looks like permission issue.
Try extracting the jar file using WinRAR or 7-zip. you can right click on jar file and select extract to (Where you have write permission) .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With