<s>
A	O
JAR	B-Language
(	O
"	O
Java	B-Language
archive	I-Language
"	O
)	O
file	O
is	O
a	O
package	B-Application
file	O
format	O
typically	O
used	O
to	O
aggregate	O
many	O
Java	B-Language
class	I-Language
files	I-Language
and	O
associated	O
metadata	O
and	O
resources	O
(	O
text	O
,	O
images	O
,	O
etc	O
.	O
)	O
</s>
<s>
JAR	B-Language
files	I-Language
are	O
archive	B-Application
files	I-Application
that	O
include	O
a	O
Java-specific	O
manifest	O
file	O
.	O
</s>
<s>
They	O
are	O
built	O
on	O
the	O
ZIP	B-General_Concept
format	I-General_Concept
and	O
typically	O
have	O
a	O
.jar	B-Language
file	O
extension	O
.	O
</s>
<s>
A	O
JAR	B-Language
file	I-Language
allows	O
Java	B-Language
runtimes	I-Language
to	O
efficiently	O
deploy	B-Application
an	O
entire	O
application	O
,	O
including	O
its	O
classes	O
and	O
their	O
associated	O
resources	O
,	O
in	O
a	O
single	O
request	O
.	O
</s>
<s>
JAR	B-Language
file	I-Language
elements	O
may	O
be	O
compressed	O
,	O
shortening	O
download	O
times	O
.	O
</s>
<s>
A	O
JAR	B-Language
file	I-Language
may	O
contain	O
a	O
manifest	O
file	O
,	O
that	O
is	O
located	O
at	O
META-INF/MANIFEST.MF	O
.	O
</s>
<s>
The	O
entries	O
in	O
the	O
manifest	O
file	O
describe	O
how	O
to	O
use	O
the	O
JAR	B-Language
file	I-Language
.	O
</s>
<s>
For	O
instance	O
,	O
a	O
Classpath	B-Language
entry	O
can	O
be	O
used	O
to	O
specify	O
other	O
JAR	B-Language
files	I-Language
to	O
load	O
with	O
the	O
JAR	B-Language
.	O
</s>
<s>
The	O
contents	O
of	O
a	O
file	O
may	O
be	O
extracted	O
using	O
any	O
archive	B-Application
extraction	O
software	O
that	O
supports	O
the	O
ZIP	B-General_Concept
format	I-General_Concept
,	O
or	O
the	O
jar	B-Language
command	O
line	O
utility	O
provided	O
by	O
the	O
Java	B-Language
Development	I-Language
Kit	I-Language
.	O
</s>
<s>
Developers	O
can	O
digitally	O
sign	O
JAR	B-Language
files	I-Language
.	O
</s>
<s>
The	O
JAR	B-Language
itself	O
is	O
not	O
signed	O
,	O
but	O
instead	O
every	O
file	O
inside	O
the	O
archive	B-Application
is	O
listed	O
along	O
with	O
its	O
checksum	O
;	O
it	O
is	O
these	O
checksums	O
that	O
are	O
signed	O
.	O
</s>
<s>
Multiple	O
entities	O
may	O
sign	O
the	O
JAR	B-Language
file	I-Language
,	O
changing	O
the	O
JAR	B-Language
file	I-Language
itself	O
with	O
each	O
signing	O
,	O
although	O
the	O
signed	O
files	O
themselves	O
remain	O
valid	O
.	O
</s>
<s>
When	O
the	O
Java	B-Language
runtime	I-Language
loads	O
signed	O
JAR	B-Language
files	I-Language
,	O
it	O
can	O
validate	O
the	O
signatures	O
and	O
refuse	O
to	O
load	O
classes	O
that	O
do	O
not	O
match	O
the	O
signature	O
.	O
</s>
<s>
It	O
can	O
also	O
support	O
'	O
sealed	O
 '	O
packages	O
,	O
in	O
which	O
the	O
Classloader	B-Language
will	O
only	O
permit	O
Java	O
classes	O
to	O
be	O
loaded	O
into	O
the	O
same	O
package	B-Application
if	O
they	O
are	O
all	O
signed	O
by	O
the	O
same	O
entities	O
.	O
</s>
<s>
This	O
prevents	O
malicious	O
code	O
from	O
being	O
inserted	O
into	O
an	O
existing	O
package	B-Application
,	O
and	O
so	O
gaining	O
access	O
to	O
package-scoped	O
classes	O
and	O
data	O
.	O
</s>
<s>
The	O
content	O
of	O
JAR	B-Language
files	I-Language
may	O
be	O
obfuscated	O
to	O
make	O
reverse	O
engineering	O
more	O
difficult	O
.	O
</s>
<s>
An	O
executable	O
Java	O
program	O
can	O
be	O
packaged	O
in	O
a	O
JAR	B-Language
file	I-Language
,	O
along	O
with	O
any	O
libraries	O
the	O
program	O
uses	O
.	O
</s>
<s>
Executable	O
JAR	B-Language
files	I-Language
have	O
the	O
manifest	O
specifying	O
the	O
entry	B-Language
point	I-Language
class	O
with	O
Main-Class	O
:	O
myPrograms.MyClass	O
and	O
an	O
explicit	O
Class-Path	O
(	O
and	O
the	O
-cp	O
argument	O
is	O
ignored	O
)	O
.	O
</s>
<s>
The	O
typical	O
invocation	O
is	O
java	O
-jar	O
foo.jar	O
from	O
a	O
command	O
line	O
.	O
</s>
<s>
For	O
instance	O
,	O
Microsoft	O
Windows	O
users	O
who	O
prefer	O
having	O
Windows	O
EXE	O
files	O
can	O
use	O
tools	O
such	O
as	O
JSmooth	B-Language
,	O
Launch4J	O
,	O
WinRun4J	O
or	O
Nullsoft	B-Language
Scriptable	I-Language
Install	I-Language
System	I-Language
to	O
wrap	O
single	O
JAR	B-Language
files	I-Language
into	O
executables	O
.	O
</s>
<s>
A	O
manifest	O
file	O
is	O
a	O
metadata	O
file	O
contained	O
within	O
a	O
JAR	B-Language
.	O
</s>
<s>
It	O
defines	O
extension	O
and	O
package-related	O
data	O
.	O
</s>
<s>
It	O
contains	O
name	B-Application
–	I-Application
value	I-Application
pairs	I-Application
organized	O
in	O
sections	O
.	O
</s>
<s>
If	O
a	O
JAR	B-Language
file	I-Language
is	O
intended	O
to	O
be	O
used	O
as	O
an	O
executable	O
file	O
,	O
the	O
manifest	O
file	O
specifies	O
the	O
main	O
class	O
of	O
the	O
application	O
.	O
</s>
<s>
The	O
manifest	O
directory	O
has	O
to	O
be	O
the	O
first	O
entry	O
of	O
the	O
compressed	B-Application
archive	I-Application
.	O
</s>
<s>
The	O
manifest	O
appears	O
at	O
the	O
canonical	O
location	O
META-INF/MANIFEST.MF	O
.	O
</s>
<s>
There	O
can	O
be	O
only	O
one	O
manifest	O
file	O
in	O
an	O
archive	B-Application
and	O
it	O
must	O
be	O
at	O
that	O
location	O
.	O
</s>
<s>
The	O
content	O
of	O
the	O
manifest	O
file	O
in	O
a	O
JAR	B-Language
file	I-Language
created	O
with	O
version	O
1.0	O
of	O
the	O
Java	B-Language
Development	I-Language
Kit	I-Language
is	O
the	O
following	O
.	O
</s>
<s>
The	O
manifest	O
can	O
contain	O
information	O
about	O
the	O
other	O
files	O
that	O
are	O
packaged	O
in	O
the	O
archive	B-Application
.	O
</s>
<s>
Manifest	O
contents	O
depend	O
on	O
the	O
intended	O
use	O
for	O
the	O
JAR	B-Language
file	I-Language
.	O
</s>
<s>
JAR	B-Language
files	I-Language
created	O
only	O
for	O
the	O
purpose	O
of	O
archiving	O
do	O
not	O
use	O
the	O
MANIFEST.MF	O
file	O
.	O
</s>
<s>
Most	O
uses	O
of	O
JAR	B-Language
files	I-Language
go	O
beyond	O
simple	O
archiving	O
and	O
compression	O
and	O
require	O
special	O
information	O
in	O
the	O
manifest	O
file	O
.	O
</s>
<s>
The	O
manifest	O
allows	O
developers	O
to	O
define	O
several	O
useful	O
features	O
for	O
their	O
jars	B-Language
.	O
</s>
<s>
Properties	O
are	O
specified	O
in	O
key-value	B-Application
pairs	I-Application
.	O
</s>
<s>
If	O
an	O
application	O
is	O
contained	O
in	O
a	O
JAR	B-Language
file	I-Language
,	O
the	O
Java	B-Language
Virtual	I-Language
Machine	I-Language
needs	O
to	O
know	O
the	O
application	O
's	O
entry	B-Language
point	I-Language
.	O
</s>
<s>
An	O
entry	B-Language
point	I-Language
is	O
any	O
class	O
with	O
a	O
public	O
static	O
void	O
main( String[]	O
args	B-Language
)	O
method	O
.	O
</s>
<s>
Optionally	O
,	O
a	O
package	B-Application
within	O
a	O
JAR	B-Language
file	I-Language
can	O
be	O
sealed	O
,	O
which	O
means	O
that	O
all	O
classes	O
defined	O
in	O
that	O
package	B-Application
are	O
archived	O
in	O
the	O
same	O
JAR	B-Language
file	I-Language
.	O
</s>
<s>
A	O
package	B-Application
might	O
be	O
sealed	O
to	O
ensure	O
version	O
consistency	O
among	O
the	O
classes	O
in	O
the	O
software	O
or	O
as	O
a	O
security	O
measure	O
.	O
</s>
<s>
To	O
seal	O
a	O
package	B-Application
,	O
a	O
Name	O
entry	O
needs	O
to	O
appear	O
,	O
followed	O
by	O
a	O
Sealed	O
header	O
,	O
such	O
as	O
:	O
</s>
<s>
The	O
Name	O
header	O
's	O
value	O
is	O
the	O
package	B-Application
's	O
relative	O
pathname	O
.	O
</s>
<s>
Any	O
headers	O
following	O
a	O
Name	O
header	O
,	O
without	O
any	O
intervening	O
blank	O
lines	O
,	O
apply	O
to	O
the	O
file	O
or	O
package	B-Application
specified	O
in	O
the	O
Name	O
header	O
.	O
</s>
<s>
In	O
the	O
above	O
example	O
,	O
because	O
the	O
Sealed	O
header	O
occurs	O
after	O
the	O
Name	O
:	O
myCompany/myPackage	O
header	O
with	O
no	O
intervening	O
blank	O
lines	O
,	O
the	O
Sealed	O
header	O
applies	O
(	O
only	O
)	O
to	O
the	O
package	B-Application
myCompany/myPackage	O
.	O
</s>
<s>
The	O
feature	O
of	O
sealed	O
packages	O
is	O
outmoded	O
by	O
the	O
Java	B-Language
Platform	I-Language
Module	I-Language
System	I-Language
introduced	O
in	O
Java	O
9	O
,	O
in	O
which	O
modules	O
cannot	O
split	O
packages	O
.	O
</s>
<s>
One	O
set	O
of	O
headers	O
can	O
be	O
assigned	O
to	O
each	O
package	B-Application
.	O
</s>
<s>
The	O
versioning	O
headers	O
appear	O
directly	O
beneath	O
the	O
Name	O
header	O
for	O
the	O
package	B-Application
.	O
</s>
<s>
A	O
jar	B-Language
can	O
be	O
optionally	O
marked	O
as	O
a	O
multi-release	O
jar	B-Language
.	O
</s>
<s>
Using	O
the	O
multi-release	O
feature	O
allows	O
library	O
developers	O
to	O
load	O
different	O
code	O
depending	O
on	O
the	O
version	O
of	O
the	O
Java	B-Language
runtime	I-Language
.	O
</s>
<s>
A	O
multi-release	O
jar	B-Language
is	O
enabled	O
using	O
the	O
following	O
declaration	O
in	O
the	O
manifest	O
:	O
</s>
<s>
The	O
Apache	B-Application
Ant	I-Application
build	O
tool	O
has	O
its	O
own	O
package	B-Application
to	O
read	O
and	O
write	O
Zip	B-General_Concept
and	O
JAR	B-Language
archives	O
,	O
including	O
support	O
for	O
Unix	B-Application
filesystem	B-Application
extensions	O
.	O
</s>
<s>
The	O
org.apache.tools.zip	O
package	B-Application
is	O
released	O
under	O
the	O
Apache	B-Application
Software	I-Application
Foundation	I-Application
license	O
and	O
is	O
designed	O
to	O
be	O
usable	O
outside	O
Ant	B-Application
.	O
</s>
<s>
Several	O
related	O
file	O
formats	O
build	O
on	O
the	O
JAR	B-Language
format	O
:	O
</s>
<s>
WAR	B-Language
(	O
Web	B-Language
application	I-Language
archive	I-Language
)	O
files	O
,	O
also	O
Java	B-Language
archives	I-Language
,	O
store	O
XML	B-Protocol
files	O
,	O
Java	O
classes	O
,	O
JavaServer	B-Language
Pages	I-Language
and	O
other	O
objects	O
for	O
Web	O
Applications	O
.	O
</s>
<s>
RAR	B-Language
(	O
resource	B-Language
adapter	I-Language
archive	I-Language
)	O
files	O
(	O
not	O
to	O
be	O
confused	O
with	O
the	O
RAR	B-Language
file	O
format	O
)	O
,	O
also	O
Java	B-Language
archives	I-Language
,	O
store	O
XML	B-Protocol
files	O
,	O
Java	O
classes	O
and	O
other	O
objects	O
for	O
J2EE	B-Language
Connector	I-Language
Architecture	I-Language
(	O
JCA	O
)	O
applications	O
.	O
</s>
<s>
EAR	B-Language
(	O
enterprise	B-Language
archive	I-Language
)	O
files	O
provide	O
composite	O
Java	B-Language
archives	I-Language
that	O
combine	O
XML	B-Protocol
files	O
,	O
Java	O
classes	O
and	O
other	O
objects	O
including	O
JAR	B-Language
,	O
WAR	B-Language
and	O
RAR	B-Language
Java	B-Language
archive	I-Language
files	O
for	O
Enterprise	O
Applications	O
.	O
</s>
<s>
SAR	O
(	O
service	O
archive	B-Application
)	O
is	O
similar	O
to	O
EAR	B-Language
.	O
</s>
<s>
It	O
provides	O
a	O
service.xml	O
file	O
and	O
accompanying	O
JAR	B-Language
files	I-Language
.	O
</s>
<s>
APK	B-Application
(	O
Android	B-Application
application	I-Application
package	I-Application
)	O
,	O
a	O
variant	O
of	O
the	O
Java	B-Language
archive	I-Language
format	O
,	O
is	O
used	O
for	O
Android	B-Application
applications	I-Application
.	O
</s>
<s>
AAR	O
(	O
Android	B-Application
archive	B-Application
)	O
is	O
used	O
for	O
distribution	O
of	O
Android	B-Application
libraries	O
,	O
typically	O
via	O
Maven	B-Language
.	O
</s>
<s>
PAR	O
(	O
plan	O
archive	B-Application
)	O
-	O
supported	O
by	O
Eclipse	B-Language
Virgo	I-Language
OSGi	B-Application
application	O
server	O
,	O
allows	O
the	O
deployment	O
of	O
multi-bundle	O
OSGi	B-Application
applications	O
as	O
a	O
single	O
archive	B-Application
and	O
provides	O
isolation	O
from	O
other	O
PAR-based	O
applications	O
deployed	O
in	O
the	O
same	O
server	O
.	O
</s>
<s>
KAR	O
(	O
Karaf	O
archive	B-Application
)	O
-	O
supported	O
by	O
Apache	O
Karaf	O
OSGi	B-Application
application	O
server	O
,	O
allows	O
the	O
deployment	O
of	O
multi-bundle	O
,	O
multi-feature	O
OSGi	B-Application
applications	O
.	O
</s>
