Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

jars
jar
files
java

What are JAR files in Java?

Educative Answers Team

A JAR file is simply the compressed version of Java class files and all the subsidiary resources like (image files, audio files, etc.). It is more of an archived package file that can be unarchived very easily using any tool (e.g., WinZip). JARs have the jar extension.

Remember: All Java files (*java) are usually converted into a single jar file.

Commands

commands meaning
cf It converts the specified file into a jar file.
tf It is used to view the contents of a jar file.
xf It is used to extract all the contents of a jar file.
-jar It is used to run the jar file.

Illustration

1 of 5

RELATED TAGS

jars
jar
files
java
Copyright ©2022 Educative, Inc. All rights reserved
RELATED COURSES

View all Courses

Keep Exploring