If you have Java Archive files such as jar, war, or ear and you want to extract them using the Linux command then make use of the jar command.
.jar - Java Archive File
.war - Java Web Archive File
.ear -Enterprise Java Archive File
Command to extract Java .jar file
Syntax:# jar -xvf /path/to/file/fileName.[war|ear|jar]
Example:
# jar -xvf myApp-uat-2.0.1-SNAPSHOT.war
Make sure you have Java JDK installed on the system to use this command, or else you will get an error.
# jar -xvf my-production-2.0.1-SNAPSHOT.ear
The operation couldn’t be completed. Unable to locate a Java Runtime.

Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!