Java: File Format (1)

Source: Internet
Author: User

// Increase in 9.6.13

What are the differences between ear, jar, and war files? In which environments are they used?

There is no difference in the file structure between the three. They all adopt ZIP or JAR File compression formats. However, they have different purposes:

  JAR File(Extension:. Jar) containsJavaClassCommon Library, resources, auxiliary files, etc.

  War File(Extension:. War) contains all web applications. In this case, a Web application is defined as a separate set of files, classes, and resources. You can encapsulate the JAR file and use it as a small service program (servlet).

  Ear File(Extension:. Ear) contains all enterprise applications. In this case, an enterprise application is defined as a collection of multiple jar files, resources, classes, and Web applications.

Each file (. jar ,. war ,. ear can only be processed by application servers, servlet containers, and EJB containers.

 

Another popular point

From the perspective of the end customer ,. jar files are an encapsulation that they do not need to know. how many jar files are there. class files, the functions and functions of each file can also get the expected results. In addition to jar, there are war and ear for J2EE. The differences are as follows:

Jar: Java archive file
War: web archive file

Ear: Enterprise archive file. Contains the class and properties files, which are the smallest unit of file encapsulation (??). Such as servlet, JSP page, JSP tag library, Jar library file, HTML/XML file, and other public resource files, files, and audio files. In addition to jar and war, it also includes EJB components.
Deployment file application-client.xml web. XML application. xml
Level small medium large

 

 

// 2009.4.11

In the process of writing a Java program, you may encounter some extensions that you have never seen before. Sometimes these problems may affect developers' coding and testing, such as using JBuilder for Java development, one unexpected reason is that one of the java files is lost, or the modified java files are found to be wrong and the original code is to be retrieved. What should I do at this time? If you understand. Java ~ 1 ~ You can restore your work. Therefore, understanding the suffix is of great help to improve programming capabilities.

1 ,. jpr is a project file generated by the JBuilder system to record user information, such as name, company name, and project brief introduction. When you create a class, select generate header comments, JBuilder automatically adds a brief description above the code.

2 ,. JPX is a project description file generated by the JBuilder system. jpr is the same, but it uses more advanced language format XML, which provides great help for program developers to internationalize.

3.. jar is actually a compressed file. Its compression format is zip .. Jar files use jar commands to compress various types, images, sounds, and other Java program-related resources into one file, which speeds up download and facilitates system resource management.

 
4. Java is a source program file of the Java language. It can be opened and modified using the file editing tool and compiled using the javac command. The compiled class file can run on any platform.

5. The. Class is a Java class file, which is a compiled Java file. You can run this file using Java commands.

6. jsp is a program file on the server. It is based on the Java language and needs to be supported by the server.

7.. Java ~ 1 ~ Is the backup file of the JBuilder system. 1 indicates the first file to be written. The larger the number, the newer the file modification date.

82.16.html is a common Internet webpage format and has outstanding performance in Webpage layout and layout.

92.16.shtml is a branch format of HTML. It can be embedded into programs on the server side to combine web pages with databases.

10.. XML is an advanced and promising Internet data processing language.

11. WML is a Web page format based on WAP mobile phones. Due to the slow transmission speed of mobile phones, this web page format is not popular now.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.