The first time Java was released by Sun in 1995, it is both a programming language and a computing platform.
Java runtime version Java runtime Edition
When you're done downloading Java, you'll get a Java Runtime time (JRE). The JRE consists of three parts: The core class of the Jvm,java platform and the libraries that support the Java platform. These three parts are the basis for executing Java application operations.
Java programming language
Java is an object-oriented programming language that includes the following features:
Platform Standalone-Java applications are compiled into bytecode stored in the. class file and run inside the JVM. The Java application runs inside the JVM, so it can run on different machines and devices.
Object-oriented-slightly
Automatic garbage collection-Java automatically allocates and reclaims memory space, and applications are not tied to this issue.
A rich standard library-slightly
Java Development Kit
The JDK is a collection of tools for developing Java applications. With the JDK, you can compile programs written in the Java language and run them on the JVM. The JDK also provides tools for packaging and distributing Java applications.
The JDK and JRE share the same Java application programming Interfaces (Java API).
The Java API is a pre-packaged collection of libraries for creating Java applications. The Java API makes development easier by providing many common tools. Tools available for processing: string manipulation, time-date processing, network programming, data structure implementation (for example, list, map, stack, and queue)
Java Virtual Machine
Java Virtual Machine (JVM), is an abstract computer device. The JVM is a program, but for programs running inside, the JVM is similar to a machine. Java programs use the same set of interfaces and libraries, and the JVM implementations of each operating system translate the Java language instructions into the command commands of the current operating system. In this way, Java programming can achieve platform-independent purposes.
The JVM is completely unaware of the Java programming language and knows only a special library format, the. class file format. A. class file contains JVM instructions or bytecode, a symbol table, and other ancillary information.
JVM Architecture
The Java trademark is owned by Oracle, and Oracle's published JRE contains a single Oracle JVM named HotSpot. The architecture of the HotSpot is described below.
Key components of HotSpot
The three parts highlighted in this section are the three key components related to JVM performance. The focus is also on these three components for performance optimization.
Heap, which stores data for an object.
Garbage Collector, garbage collector, for managing memory in the Heap area. Which garbage collector is selected by the JVM at startup. Most optimization options are related to the size of the Heap, the choice of the garbage collector.
JIT Compiler, Instant compilers, and performance have a lot to do with, but there is little need for tuning for new versions of JVMs.
Performance Optimization Basics
Typically, performance tuning for a Java application focuses on one of two key goals: response speed or throughput.
Response Speed (responsiveness)
Response speed refers to how long an application or system responds to a request and provides the requested data.
For example:
How long does it take for a desktop program's UI to respond to an event
How long does it take for a website to return a page
How long does it take to return a database query
A long pause is unacceptable for an application that focuses on response speed. The focus here is that response time should be short.
Throughput (throughput)
Throughput, the focus is on making an application handle as many tasks as possible over a specified period of time.
For example:
Number of transactions that can be completed within a given time
How many batch processes can be completed within one hours
The number of database queries that can be completed within one hours.
Applications that focus on throughput can generally accept long pauses. Because high-throughput applications pay more attention to performance changes over time, the response speed is not a priority.
Resources
Java technology and the JVM, Java garbage Collection Basics, Oracle
[Java] Java Technology and JVM Fundamentals