Java Package
Jump to navigation
Jump to search
A Java Package is a file that can contain related Java Classes, Java Interfaces, Jave Enumerated Types or Java Annotation.
- AKA: JAR File.
- Context:
- It can be references by a Java Import Statement.
- It can be operated on with a jar Command, such as
jar tf MyPackage.jar
. - It can be associated with JAR Arguments.
- Example(s):
- java.lang basic language functionality and fundamental types
- java.util collection data structure classes
- java.io file operations
- java.math multiprecision arithmetics
- java.sql Java Database Connectivity (JDBC) to access databases
- a Spark JAR Package.
- …
- Counter-Example(s):
- …
- See: Java Class Library, Java Import Command.
References
2011
- http://en.wikipedia.org/wiki/Java_package
- A Java package is a mechanism for organizing Java classes into namespaces similar to the modules of Modula. Java packages can be stored in compressed files called JAR files, allowing classes to download faster as a group rather than one at a time. Programmers also typically use packages to organize classes belonging to the same category or providing similar functionality. A package provides a unique namespace for the types it contains. Classes in the same package can access each other's package-access members.
In general, a package can contain the following kinds of types.
- A Java package is a mechanism for organizing Java classes into namespaces similar to the modules of Modula. Java packages can be stored in compressed files called JAR files, allowing classes to download faster as a group rather than one at a time. Programmers also typically use packages to organize classes belonging to the same category or providing similar functionality. A package provides a unique namespace for the types it contains. Classes in the same package can access each other's package-access members.
2010
- http://java.sun.com/developer/Books/javaprogramming/JAR/basics
- JAR files are packaged with the ZIP file format, so you can use them for "ZIP-like" tasks such as lossless data compression, archiving, decompression, and archive unpacking. These are among the most common uses of JAR files, and you can realize many JAR file benefits using only these basic features. Even if you want to take advantage of advanced functionality provided by the JAR file format such as electronic signing, you'll first need to become familiar with the fundamental operations. To perform basic tasks with JAR files, you use the Java Archive Tool provided as part of the Java Development Kit. Because the Java Archive tool is invoked by using the jar command, for convenience we'll call it the "Jar tool".