Tech and Academic things for Chianshin

Saturday, March 21, 2009

Sealing Packages within a JAR File (The Java™ Tutorials > Deployment > Packaging Programs in JAR Files)

Sealing Packages within a JAR File (The Java™ Tutorials > Deployment > Packaging Programs in JAR Files): "Packages within JAR files can be optionally sealed, which means that all classes defined in that package must be archived in the same JAR file. You might want to seal a package, for example, to ensure version consistency among the classes in your software.

You seal a package in a JAR file by adding the Sealed header in the manifest, which has the general form:

Name: myCompany/myPackage/
Sealed: true

The value myCompany/myPackage/ is the name of the package to seal.

Note that the package name must end with a '/'"

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]



<< Home