Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between java class and jar

Tags:

java

class

jar

What is the difference between a java class file and a jar file?

like image 846
hari Avatar asked Apr 21 '11 11:04

hari


1 Answers

A Jar file is an Zip archive containing one or multilple java class files. This makes the usage of libraries (consisting of multiple classes) more handy. Directories and Jar files are added to the classpath and available to the ClassLoader at runtime to find particular classes inside of it.

like image 156
BertNase Avatar answered Sep 27 '22 21:09

BertNase