Content deleted Content added
Cleaned up (ahem re-written) following comments in the cleanup page |
Clemens vi (talk | contribs) No edit summary |
||
Line 1:
Java Source Files belonging to the same category or provide similar functionality can be packed into a Java Package. Java Packages are stored in compressed files called [[Jar (file format)|jar]] Files. Inside the package the files can be stored hierachically, therefore it is possible to combine several subdirectories into one package.
*A package provides a unique [[namespace|namespace]] for the types it contains.
*A package facilitates access protection.
Line 8 ⟶ 9:
**Annotations
▲import java.awt.event.*;
This imports all files from the directory java/awt/event
==Packages in Java 1.5==
* java.lang, java.util: These packages provide basic language functionality like regular expressions, the Reflection API
* java.math: provides mathematical functions
* New I/O: the new I/O framework for Java
* I/O: File Operations
* Networking: Networking Operations, Sockets, DNS lookups,...
* Security: key generation, encryption and decryption
* Java Database Connectivity (JDBC): to access databases
* Java AWT: set of packages for GUI
* Java Swing: native Java GUI components
== Creation of Jar Files==
In the Java Source Files the package the file shall belong to must be specified with the package keyword, e.g.
Jar Files are created with the jar command-line utility. The command
▲/java/awt/event
jar cf myPackage.jar *.class
compresses all *.class files into the Jar File myPackage.tar.
{{compu-lang-stub}}
|