In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Tomcat
1. Introduction to Tomcat Tomcat is a core project of the Jakarta project of the Apache Software Foundation (Apache Software Foundation), which is supported by
Developed by Apache, Sun and other companies and individuals.
Tomcat server is a free and open source Web application server, which is a lightweight application server. Currently, the latest version of Tomcat is 9.0. Java containers also include resin, weblogic, and so on.
Tomcat official website: http://tomcat.apache.org
2. Tomcat is a good helper-JDK
JDK is a software development kit of Java language, which is mainly used for java applications on mobile devices and embedded devices. JDK is the core of the whole java development, which includes the running environment of JAVA (JVM+Java system class library) and JAVA tools. Http://www.oracle.com/technetwork/java/javase/downloads/index.html
Port: the port served by tomcat itself: 8005
Port for tomcat to communicate with other applications: 8009 tomcat for client browsers to access pages: 8080
JVM Foundation
First, the general knowledge of JVM virtual machine as the beginning of understanding JVM virtual machine. It is necessary for us to understand the following two questions.
1. What is a JAVA virtual machine
The so-called virtual machine is a virtual computer. It is a piece of software that executes a series of virtual computer instructions. In general, virtual
Virtual machine can be divided into system virtual machine and program virtual machine. The famous VisualBox and VMware belong to the system virtual machine. They are complete simulations of physical computers. Provides a software platform that can run a complete operating system.
A typical example of a program virtual machine is the Java virtual machine, which is specially designed to execute a single computer program and executes in the Java virtual machine.
We call it the Java bytecode instruction. Whether it is a system virtual machine or a program virtual machine, the software running on it is limited to the resources provided by the virtual machine.
How to achieve Cross-platform in 2.JAVA
The same JAVA program (collection of JAVA bytecodes) runs on major operating system platforms such as Windows, CentOS, Ubuntu and so on through the JAVA virtual machine (JVM). The program uses a virtual machine as an intermediary to achieve cross-platform.
1/14
3. The basic structure of virtual machine we need to have a perceptual understanding of the structure of JVM virtual machine. After all, we are not programmers, and our awareness is not that deep.
1), class loading subsystem
It is responsible for loading Class information from the file system or network, and the loaded class information is stored in a memory space called the method area. In addition to class information, run-time pool information, including literal strings and numbers, may also be stored in the method area.
2/14
2), Java heap
Established when the virtual machine starts, it is the main memory working area of the Java program. Almost all Java object instances are placed in the Java heap. Heap space is shared by all threads, which is a memory interval that is closely related to Java applications.
3), NIO library of Java (direct memory)
Allow Java programs to use direct memory. Direct memory is the memory range outside the Java heap and requested directly from the system. Access to direct memory is usually faster than the Java heap. Therefore, for performance reasons, direct memory may be considered in situations where reads and writes are frequent. Due to direct memory
Outside the Java heap, so its size is not limited to the maximum heap size specified by Xmx. However, the system memory is limited, and the sum of Java heap and direct memory is still limited by the maximum memory that the operating system can give.
4), garbage collection system
The garbage collection system is an important part of the Java virtual machine. The garbage collector can return to the normal area, Java heap and direct memory.
Take it.
5), Java stack
Each Java virtual machine thread has a private Java stack. A thread's Java stack is created when the thread is created. Java stores frame information, local variables and method parameters are stored in Java stack, and it is closely related to the call and return of Java method.
4. Virtual machine heap memory structure
The heap space in JVM can be divided into three regions, the young generation, the old generation and the permanent generation (method zone).
Cenozoic: Cenozoic area
Classes are generated and applied here, and are finally garbage collected. All classes are new out in the Eden area. When the Eden area is full, GC destroys the objects that are not used in the area, and the rest of the useful ones go to the survival area.
Old age: the elderly area is used to store objects with a long generation cycle.
3/14
Permanent generation: the permanent zone stores the class,interface that comes with JDK.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.