FACTOID # 105: The United States tops the world in plastic surgery procedures. Next comes Mexico.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

SEARCH ALL

FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:

 

 

(* = Graphable)

 

 


Encyclopedia > Jar (file format)
Java Archive
KDE JAR file icon
File extension: .jar
MIME type: application/java-archive
Uniform Type Identifier: com.sun.java-archive
Developed by: Sun Microsystems
Type of format: file archive, data compression
Extended from: ZIP

In computing, a JAR file (or Java ARchive) file used to distribute a set of Java classes. It is used to store compiled Java classes and associated metadata that can constitute a program. Should not be called a ZIP file foo.... Please go to the SUN - JAVA pages to find out why. All file compression formats should not be classified as "zip".... Image File history File links No higher resolution available. ... A filename extension is a suffix to the name of a computer file applied to show its format. ... Multipurpose Internet Mail Extensions (MIME) is an Internet Standard that extends the format of e-mail to support: text in character sets other than US-ASCII; non-text attachments; multi-part message bodies; and header information in non-ASCII character sets. ... A Uniform Type Identifier (UTI) is a string that uniquely identifies the type of a class of items. ... Sun Microsystems, Inc. ... A file archiver is a computer program that combines a number of files together into one archive file, or a series of archive files, for easier transportation or storage. ... In computer science and information theory, data compression or source coding is the process of encoding information using fewer bits (or other information-bearing units) than an unencoded representation would use through use of specific encoding schemes. ... The ZIP file format is a popular data compression and archival format. ... Memory (Random Access Memory) Look up computing in Wiktionary, the free dictionary. ... The Java platform is the name for a computing environment, or platform, from Sun Microsystems which can run applications developed using the Java programming language and set of development tools. ... The Java source files (.java files) get compiled into . ... Metadata (Greek meta after and Latin data information) are data that describe other data. ...

  • WAR (file format) (Web Application aRchive) files are also Java archives which store XML files, java classes, Java Server Pages and other objects for Web Applications.
  • EAR (file format) (Enterprise ARchive) files are also Java archives which store XML files, java classes and other objects for Enterprise Applications.
  • RAR (file format) (Resource Adapter aRchive) files are also Java archives which store XML files, java classes and other objects for J2EE Connector Architecture (JCA) applications.

JAR files can be created and extracted using the "jar" command that comes with the JDK. It can be done using zip tools, but as WinZip has a habit of renaming all-uppercase directories and files in lower case, this can raise support calls with whoever created the JAR or the tool authors themselves. WinRAR, on the other hand, retains the original case of filenames. In computing, a WAR file (short for Web Application Archive) is a ZIP file used to distribute a set of Java classes. ... The Extensible Markup Language (XML) is a general-purpose markup language. ... JavaServer Pages (JSP) is a Java technology that allows software developers to dynamically generate HTML, XML or other types of documents in response to a Web client request. ... This article or section is in need of attention from an expert on the subject. ... The Extensible Markup Language (XML) is a general-purpose markup language. ... In computing, RAR is a proprietary file format for data compression and archiving, developed by Eugene Roshal (hence the name RAR: Roshal ARchive). ... The Extensible Markup Language (XML) is a general-purpose markup language. ... Java Platform, Enterprise Edition or Java EE (formerly known as Java 2 Platform, Enterprise Edition or J2EE up to version 1. ... Java EE Connector Architecture (JCA) is a Java-based technology solution for connecting application servers and enterprise information systems (EIS) as part of enterprise application integration (EAI) solutions. ... The Java Development Kit (JDK) is a Sun product aimed at Java developers. ... WinZip Computing Inc. ... WinRAR is a shareware file archiver and data compression utility by Eugene Roshal. ...


A JAR file has a manifest file located in the path META-INF/MANIFEST.MF. The entries in the manifest file determine how the JAR file will be used. JAR files which are intended to be executed as standalone programs will have one of their classes specified as the "main" class. The manifest file would have an entry such as

 Main-Class: myPrograms.MyClass 

Such JAR files are typically started with a command similar to

 java -jar foo.jar 

These files can also include a Classpath entry, which identifies other JAR files to be loaded with the JAR. This entry consists of a list of absolute or relative paths to other JAR files. Although intended to simplify JAR use, in practice, it turns out to be notoriously brittle as it depends on all the relevant JARs being in the exact locations specified when the entry-point JAR was built. To change versions or locations of libraries, a new manifest is needed. The Classpath is an argument set on the command-line that tells the Java Virtual Machine where to look for user-defined classes and packages in Java programs. ...


A JAR file can be digitally signed. If so, the signature information is added to the manifest file. The JAR itself is not signed, but instead every file inside the archive is listed along with its checksum; it is these checksums that are signed. Multiple entities may sign the JAR file, changing the JAR file itself with each signing -but the signed files themselves remain valid. When the Java runtime loads signed JAR files, it can validate the signatures and refuse to load classes that do not match the signature. It can also support 'sealed' packages, in which the classloader will only permit Java classes to be loaded into the same package if they are all signed by the same entities. This prevents malicious code from being inserted into an existing package, and so gain access to package-scoped classes and data. In cryptography, a digital signature or digital signature scheme is a type of asymmetric cryptography used to simulate the security properties of a signature in digital, rather than written, form. ... The Java Classloader is a part of the Java Runtime Environment that dynamically loads Java classes into the Java Virtual Machine. ...


JAR files can be obfuscated so that a user of the JAR file doesn't get much information regarding the code it contains, or to reduce its size, which is useful in mobile phone applications. Obfuscate redirects here; for the Discipline from the Vampire: The Masquerade/World of Darkness fictional setting please see Discipline (World of Darkness)#Obfuscate. ...


For those Microsoft Windows users who prefer having Windows EXE files, tools such as JSmooth can be used to wrap JAR files into executables. Eclipse uses a small EXE launcher (eclipse.exe) to display the splash screen on startup and launch the application from the main JAR (startup.jar). Microsoft Windows is the name of several families of proprietary software operating systems by Microsoft. ... EXE is the common filename extension for denoting an executable file (a program) in the MS-DOS, Microsoft Windows, and OS/2 operating systems. ... JSmooth is a tool for wrapping Java JAR files into Windows Portable Executable EXE files. ... Eclipse is an open-source, platform-independent software framework, written primarily in Java, for delivering what the project calls rich-client applications, as opposed to thin client browser-based applications. ...

Contents

GNU jar or fastjar

The GNU Project has implemented the jar command by a program written in C. This variant claims to be much faster than the original Sun Microsystems jar program (written in the Java programming language). GNU jar is released under GNU General Public License (GPL). The GNU logo, drawn by Etienne Suvasa The GNU Project was announced in 1983 by Richard Stallman. ... The C Programming Language, Brian Kernighan and Dennis Ritchie, the original edition that served for many years as an informal specification of the language The C programming language is a low_level standardized programming language developed in the early 1970s by Ken Thompson and Dennis Ritchie for use on the UNIX... Sun Microsystems, Inc. ... Java is an object-oriented applications programming language developed by Sun Microsystems in the early 1990s. ... The GNU logo The GNU General Public License (GNU GPL or simply GPL) is a widely-used free software license, originally written by Richard Stallman for the GNU project. ...


There is not much documentation around for this utility. GNU Project has this brief introduction. However, this is the jar version distributed with many Linux distributions and also with Cygwin for windows. The GNU logo, drawn by Etienne Suvasa The GNU Project was announced in 1983 by Richard Stallman. ... It has been suggested that Criticism of Linux be merged into this article or section. ... Cygwin is a collection of free software tools originally developed by Cygnus Solutions to allow various versions of Microsoft Windows to act somewhat like a Unix system. ...


Apache Ant Zip/JAR support

The Apache Ant build tool has its own package to read and write the Zip and JAR archives, including support for the Unix filesystem extensions. The org.apache.tools.zip package is released under the Apache Software Foundation license and is designed to be usable outside Ant. This code is fast and widely used. It creates most JAR files that are not created with Sun's utility, so could be considered fairly mature. Apache Ant is a software tool for automating software build processes. ... Apache Software Foundation Logo The Apache Software Foundation (ASF) is a non-profit corporation (classified as 501(c)(3) in the United States) to support Apache software projects, including the Apache HTTP Server. ...


Problems with the JAR format

The Ant team find that most of their support calls related to JAR file creation have two underlying causes.

  • The first is manifest creation, specifically how long lines in the manifest are wrapped. This is a complex and somewhat ambiguous part of the specification. Ant wraps long lines at 68 characters and continues on the following line with a space at the front to indicate a continuation. This is viewed as erroneous by people that have not read the specification in detail and believe that the classpath should be split at a file boundary, instead of partly across a file name. Unfortunately, if that is done, the Java runtime does not detect a split line as the first line ends before the 68 character boundary.
  • The second is WinZip converting upper-case files and directories to lower case. If a user views the contents of a JAR file using WinZip, a file such as MANIFEST/MANIFEST.MF is converted to manifest/manifest.mf. Some mobile phone Java runtimes appear to parse the manifest in ways that are incompatible with the specification, and require a strict ordering of entries in the manifest. They also do not implement the line wrapping algorithm correctly. This may imply a problem in the test suite for the J2ME mobile java runtime.

WinZip Computing Inc. ...

See also

The Classpath is an argument set on the command-line that tells the Java Virtual Machine where to look for user-defined classes and packages in Java programs. ... JAR Hell usually occurs when a class file located in a JAR file can not be found or an older version from another JAR file is loaded. ...

External links

  • JAR File Specification
  • Using JAR files: The Basics (from Sun)
  • Lesson: Packaging Programs in JAR Files (from Sun)
  • Jar File Overview (from Sun)

  Results from FactBites:
 
Lesson: Packaging Programs in JAR Files (The Java™ Tutorials > Deployment) (390 words)
Sealing a package within a JAR file means that all classes defined in that package must be found in the same JAR file.
Portability: The mechanism for handling JAR files is a standard part of the Java platform's core API.
The JAR file format is an important part of the Java platform's extension mechanism.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.