Where does JAVA start

Source: Internet
Author: User
Tags java web jboss

to Figure outJavawhat it was that had to be fromJavaThe birth begins, as we intend to meet a person, and will ask where the person was born,SunCompany in1991years to set up aGreen, specializing in embedded applications of computers in home appliance products,C + +language is too complex and large, in addition to the use of consumer electronics products embedded processor chip variety, how to write programsCross-platformrunning is also a challenge, remember the cross-platform three words, which determines theJavagenes, are inherently cross-platform, in order to solve difficulties, they first focus on language development (cattle are cattle, the development of language is not appropriate to develop a language directly first),1992years of Summer,Oaklanguage Development Success, this isJavapredecessor, this guy who was born later than I was, after more than 20 years of development, has become the world's most popular development language, but also formed its own uniqueJAVATechnical System.

First, theJava architecture consists of four independent but related technologies

Java programming Language: The language of development that we most often refer to

Java class file format: All Java Language-developed code will be compiled into a . class file

Java API: Some pre-defined functions of Java

Java VM:The core of Java, because all Java Code is running on a Java virtual machine

through the above understanding, we know The general structure of Java , How is the Java language to be run? compiling the source code in the Java language, compiling it into a Java class file, and then running The class file in the Java VM , when writing the program, by calling the class (JAVA API) method to access system resources, and when the program runs, it satisfies the program's Java API calls by invoking a method that implements the Java API in the class file . Java VMS and Java APIs form a "platform" in which all Java programs are compiled and run, so they are sometimes referred to as the Java Runtime environment.

the primary task of a Java VM is to load a class file and execute the bytecode within it. The JAVAVM contains a class loader that can load class filesfrom programs and APIs, while the Java API Class is loaded only when it is needed in the execution of the program.

Java bytecode is executed by the execution engine. In different JAVAVM , implementations of their execution engines may vary. The simplest execution engine is not a one-time explanation of bytecode, while another execution engine called an "instant compiler (just-in-time compiler)" executes faster, but consumes more memory resources. In real-time compilation mode, the first byte code executed is compiled and cached for "reuse" by the machine code.

As the saying goes, a good picture is worth 10 words, no picture, no truth.

650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M01/8D/B9/wKioL1ipDCLwDrQMAAC2fK8yYjE975.jpg-wh_500x0-wm_ 3-wmp_4-s_3069833015.jpg "title=" JVM runs. jpg "alt=" wkiol1ipdclwdrqmaac2fk8yyje975.jpg-wh_50 "/>

is that the workflow of a Java Virtual machine is the class file of the loader loader in the JVM and the class file of the Java API into the execution engine. The class file that is executed by the execution engine to execute these loaded programs, and the Java API class file,

650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M01/8D/B9/wKioL1ipDDbgNbrkAAGu-VTonJs869.jpg-wh_500x0-wm_ 3-wmp_4-s_1476045300.jpg "Title=" Java Run process. jpg "alt=" wkiol1ipddbgnbrkaagu-vtonjs869.jpg-wh_50 "/>

is a specific ways to work with JVM virtual machines

I see. The architecture of Java technology, the reason why Java is so popular, is also related to its innate characteristics, pure object-oriented, multi-threading, structured error handling, garbage collection, dynamic linking, dynamic expansion,

1998 ,Sun spun out Java technology into three directions:

J2se:standard Edition

EE:Enterprise Edition

J2ME:Mobile Edition

2006years,SunOpen source.JavaTo follow the technology;Gpland established aOpenJDKThe organization manages this code;Jdkjust provided theJ2sethe standard implementation, can achieveCSchema Development Program, but if you want to provide content presentation in a Web page format,b/Ssite architecture mode, you must be able to output aHtmlLabel'sJavacode, for ease of development,SunThe company defines a specification thatServlet, but alsoJavaa proprietary class that the application can use toHTTP,Cgiformat to receive requests from users, and to understandHTTP,Cgion the basis of the request, you can also buildHTTP,CgiResponse message to the client, while theServletask the programmer to writeServletcode, you must use a hard-coded mechanism toHtmlare hard-coded inJavarequires programmers to understandJavacode, and the east front.Htmlstyle design, which undoubtedly brought a lot of difficulties to the programmer, so there is a split designJsp, the same is theJavaa special class, soHtmlit can be embeddedJavaprogram, there is a callJasperthe translation officer toJsptranslated intoServletcode, which is alsoJavaCode

650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M00/8D/BA/wKioL1ipDG6BLnCQAAN-j2yTxa4310.jpg-wh_500x0-wm_ 3-wmp_4-s_1848032615.jpg "title=" jdk.jpg "alt=" Wkiol1ipdg6blncqaan-j2ytxa4310.jpg-wh_50 "/>

that is The features provided by the JDK are the Java Development language, and the next layer is the Java SDK and Javaapi, all thewhile to the bottom java Virtual machine also Java virtual machine,Java can cross sloaris,Windows,Linux and other platforms, relying on the Java virtual machine to achieve.

Sunthe company created the firstServletcontainer, i.e.Java Web Server,butJWSjust to demonstrateServletthe corresponding function, so it is very unstable. Meanwhile,Asfcreated aJservproject, an ability to work withApacheIntegration ofServletcontainer. 1999years,SunputJWSdonated to theAsf, so two projects were merged into one, todayTomcatthe predecessor. First oneTomcatversion isTomcat 3.xseries, and released in2001yearsTomcat4.0was redesigned and implemented on a previous basis, and its code project was namedCatalina. Tomcatnot a complete sense ofJ2eeserver, and it doesn't even provide for even a majorJava EE APIimplementations, such asEjb,Jms,Jmx,JavaMailand so on, but due to complianceApacheOpen Source Agreement,Tomcatbut also for the numerousJavaApplication server embedded in its own product to build a commercialJavaapplication servers, such asJbossand theJOnAS.

despite Tomcat 's implementation of the Jave EE API is incomplete, but companies are increasingly abandoning the use of traditional Java EE Technologies, such as EJBs,to adopt open source components to build complex applications. such as Structs,Spring, and Hibernate, while Tomcat can provide perfect support for these components. This is why Tomcat is more popular, of course, in addition to open source projects, there are many business implementations, such as IBM 's WebSphere,Oracle acquired WebLogic,Glassfish, and Redhat -acquired Jboss


This article is from the "Spring" blog, please be sure to keep this source http://zhang0102003.blog.51cto.com/1087027/1899185

Where does JAVA start

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.