Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
JAR (file format)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
====Package Sealing==== Optionally, a package within a JAR file can be sealed, which means that all classes defined in that package are archived in the same JAR file. A package might be sealed to ensure version consistency among the classes in the software or as a security measure. To seal a package, a Name entry needs to appear, followed by a Sealed header, such as: <syntaxhighlight lang="properties"> Name: myCompany/myPackage/ Sealed: true </syntaxhighlight> The Name header's value is the package's relative pathname. Note that it ends with a '/' to distinguish it from a filename. Any headers following a Name header, without any intervening blank lines, apply to the file or package specified in the Name header. In the above example, because the <code>Sealed</code> header occurs after the <code>Name: myCompany/myPackage</code> header with no intervening blank lines, the <code>Sealed</code> header applies (only) to the package <code>myCompany/myPackage</code>. The feature of sealed packages is outmoded by the Java Platform Module System introduced in Java 9, in which modules cannot split packages.<ref name="JEP 261: Module System">{{cite web | url=https://openjdk.java.net/jeps/261 | title=JEP 261: Module System | access-date=2021-02-06}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)