Error trying to extract jar file

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 be solved?

+4
source share
3 answers

This is because you do not have write permissions to C:\Program Files\Java\jdk1.7.0_25\bin .

Try unpacking it in another folder or open the console as an administrator.

+7
source

This seems like a resolution issue.

Try extracting the jar file using WinRAR or 7-zip. you can right-click on the jar file and select extract to (where you have write permission).

+1
source

Looks like a permission question. Verify that:

1) You have read / write permissions in the folder that you are trying to extract. 2) Folder is write protected

Try copying this to another directory and try to extract the jar.

0
source

Source: https://habr.com/ru/post/1495272/


All Articles