Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error while trying to extract jar file

Tags:

java

jar

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?

like image 978
user1016179 Avatar asked Aug 05 '13 07:08

user1016179


People also ask

How do I unzip a .JAR file?

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.

Why wont it let me open a JAR file?

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.

Can we extract files from jar?

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.


2 Answers

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.

like image 192
Augusto Avatar answered Sep 24 '22 02:09

Augusto


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) .

like image 30
Ankur Lathi Avatar answered Sep 21 '22 02:09

Ankur Lathi