From the docs:
To extract the files from a jar file, use x
, as in:
C:\Java> jar xf myFile.jar
To extract only certain files from a jar file, supply their filenames:
C:\Java> jar xf myFile.jar foo bar
The folder where jar
is probably isn’t C:\Java
for you, on my Windows partition it’s:
C:\Program Files (x86)\Java\jdk[some_version_here]\bin
Unless the location of jar
is in your path environment variable, you’ll have to specify the full path/run the program from inside the folder.
EDIT: Here’s another article, specifically focussed on extracting JARs: http://docs.oracle.com/javase/tutorial/deployment/jar/unpack.html
Related Posts:
- Failed to write core dump. minidumps are not enabled by default on client version of windows
- “Javac” doesn’t work correctly on Windows 10
- How can I convert a .jar to an .exe?
- javac not working in windows command prompt
- How to get rid of Checkstyle message ‘File does not end with a newline.’
- Extracting .jar file with command line
- JAVA_HOME should point to a JDK not a JRE
- Java and Windows – error: illegal escape character
- How can I convert a .jar to an .exe?
- “Javac” doesn’t work correctly on Windows 10
- Failed to load the JNI shared Library (JDK)
- Corrupt jar file
- What is the jasperrepots-fonts jar for and how to use it?
- Error: Could not find or load main class net.minecraft.launchwrapper.Launch when launching Minecraft 1.12.2 with Forge
- java ‘jar’ is not recognized as an internal or external command
- Can’t load IA 32-bit .dll on a AMD 64-bit platform
- IntelliJ IDEA “The selected directory is not a valid home for JDK”
- How do I convert a String to an int in Java?
- How can I convert IPV6 address to IPV4 address?
- Spring Boot – Unable to resolve Whitelabel Error Page
- When do you use Java’s @Override annotation and why?
- Java Error “Exception in thread “main” java.util.InputMismatchException” On an Array program
- How to sort an ArrayList?
- getting error HTTP Status 405 – HTTP method GET is not supported by this URL but not used `get` ever?
- What is a classpath and how do I set it?
- Editor does not contain a main type in Eclipse [duplicate]
- Understanding regex in Java: split(“\t”) vs split(“\\t”) – when do they both work, and when should they be used
- Make copy of an array
- How can I use ant
to execute commands on linux? - Invalid initial heap size -Xms4096M
- How do I use a PriorityQueue?
- What does Java option -Xmx stand for?
- Global variables in Java
- Does the Project Lombok @Data annotation create a constructor of any kind?
- Javac is not found
- Printing HashMap In Java
- Java “.class expected”
- Java Initialize an int array in a constructor
- How Exactly Does @param Work – Java
- Return string Input with parse.string
- Android ListView headers
- What does -XX:MaxPermSize do?
- What does .class mean in Java?
- What does the following Oracle error mean: invalid column index
- how to fix java.lang.arrayindexoutofboundsexception: 0?
- Convert the string into stringBuilder in java
- “NoClassDefFoundError: Could not initialize class” error
- What’s the advantage of load() vs get() in Hibernate?
- What Java ORM do you prefer, and why?
- Always Round UP a Double
- Using Enum values as String literals
- How to change a package name in Eclipse?
- Are arrays passed by value or passed by reference in Java?
- How do I get “Press any key to continue” to work in my Java code?
- What does “?” mean in Java? [duplicate]
- What is the difference between a local variable, an instance field, an input parameter, and a class field?
- Error: Selection does not contain a main type
- Java, “Variable name” cannot be resolved to a variable
- How can I get the current stack trace in Java?
- java.util.zip.ZipException: error in opening zip file
- paint() and repaint() in Java
- Good Hash Function for Strings
- Error – Illegal static declaration in inner class
- Bubble Sort Manually a Linked List in Java
- Checking Password Code
- java – how to create and manipulate a bit array with length of 10 million bits
- What is the difference between object-oriented languages and non object-oriented languages?
- Installing jdk8 on ubuntu- “unable to locate package” update doesn’t fix
- Java – Access is denied java.io.FileNotFoundException
- Simple way to repeat a string
- Unreachable statement compile error in Java
- Reflection generic get field value
- error: incompatible types: char cannot be converted to String – Java
- mongoDB, connection refused
- Displaying Image in Java
- How to check the input is an integer or not in Java?
- How to read and write XML files?
- Invalid signature file digest for Manifest main attributes exception while trying to run jar file
- JAVA + try catch(FileNotFoundException e) going in catch(Exception e)?
- Using a do-while loop to check a User’s input in Java
- What is the proper annotation since @SpringApplicationConfiguration, @WebIntegration, is deprecated in Spring Boot Framework?
- How to write a test class to test my code?
- How do I exit a while loop in Java?
- Java String import
- Printing array elements with a for loop
- How to implement a most-recently-used cache
- Cannot be resolved to a variable error in Eclipse
- JAVA_HOME is set to an invalid directory:
- Using JavaFX in JRE 8, “Access restriction” error
- Error: The processing instruction target matching “[xX][mM][lL]” is not allowed
- Unable to resolve host “
” No address associated with host name - Why int[] a = new int[1] instead of just int a?
- getOutputStream() has already been called for this response
- Pass object by reference in Java
- What is object serialization?
- How do I use StringUtils in Java?
- Error :- java runtime environment JRE or java development kit must be available in order to run eclipse
- How to set menu to Toolbar in Android
- How to implement Java “Scanner” in C++?
- Occurrences of substring in a string