I have .jar file. I tried running command jar xf my.jar it gave nothing. I tried using JD GUI, but it gave me this message: Invalid input file '/home/hey/Desktop/my.jar'.
Does it mean I can't extract classes from this .jar file?
for linux users
unzip your.jar
If you wish to extract a file from the Jar file, use the following command:
jar xf jar-filename archived-files
The x
option indicates we wish to extract files, the f
option indicates from a jar file, the jar-filename
is the filename of the jar file to extract from and the archived-files
are the files to extract.
We can also extract all files by simply not specifying which files to extract:
jar xf project.jar
Note: If it's not Accessible do like as @Legend told, Open With WinRaR check weather it's a proper .jar
or .zip
file. If it's not opening with winrar there may be problem in .jar/.zip
.
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