Talk about what things java platform

If you let someone talk java platform, how would you say? java platform includes many things, have java language, java libraries, jvm, there are some java commonly used to frame ...... , but to say simply say, here are some of my ideas, be now stage a little summary of java, you can guide me forward to what.

(1) java language

java language is an object-oriented programming language, known as Write once, run anywhere, write once, run everywhere . In fact, the language itself and other java programming language makes no difference, the key is to let jvm java language environment running on different platforms only. JRE is java runtime environment, JDK is a superset of the JRE, in addition to including the java runtime environment, as well as java development environment and some diagnostic tools. We want to run java program must first install the JDK, which provides us with a unified programming environment, without concern for differences in operating systems, only concerned with programming techniques.

java has three properties, encapsulation, inheritance, polymorphism

Encapsulation is key information hidden within the class category, does not allow direct access to an external program, but to operate and access to hidden information provided by such a method.

Inheritance is the use of existing classes to build new classes of technology, a new class can add new properties and methods, providing common parent class, subclass provides specificity.

Polymorphism is a reference to a plurality of states under different conditions. By parent class pointer to invoke the implementation of different subclasses.

There generics, reflection, Lambda ......

(2) java virtual machine (JVM)

java language running processes: encoding -> compile -> Run -> Debug, we write java source file, first by javac compiled into .class byte code file, the machine does not recognize byte code file, but jvm by loading. class file, explained by an interpreter bytecode file line by line, while performing the corresponding line by line of code. And if the code is hot, jvm formed by the target machine code editor JIT (Just In Time Instant Editor) dynamically compiled code cached, the next time but this code is not machine code directly executed by the interpreter. Below is a diagram of a JIT work.

jvm at boot time, you can specify different parameters to select a different compilation mode.

-Xint: tell the JVM is only interpreted, not compiled code execution, this model may be abandoned superior performance JIT brings.

-Xcomp: tell the JVM is closed interpreter, compiling execution, execution does not need to explain that this is the greatest level of optimization, of course, this model also may not be efficient mode

-Xmixed: mixed compilation mode, JDK8 to support this model, typically run in JVM Server mode, it will be thousands of times a call to gather enough information for efficient compilation, JVM Client mode this threshold is 1500, Oracle Hotspot JVM built two different JIT compiler, C1 corresponds Client mode, startup speed suitable for sensitive applications, C2 correspond server model, long-running server suitable design.

In addition to the above conventional JVM compilation mode, there is a new compilation mode, i.e., AOT (Ahead-of-Time Compilation) mode, a direct bytecode into machine code, thus avoiding the overhead JIT aspects of the preheater . For example, it cites Oracle JDK9 AOT characteristic experimental.

(3) java library

  • Core class libraries, such as collections, IO / NIO, network, concurrency, and so utils
  • Security library
  • A flood of third-party libraries

(4) java / jvm ecology

java EE, Spring,Spring Boot,Spring Mvc, Hadoop, Spark, Maven......

The above is a little knowledge about the java platform I own summary, some details are not very clear , I hope my day at a time, starting toward success.

 

 

 

 

Published 19 original articles · won praise 0 · Views 1968

Guess you like

Origin blog.csdn.net/jiankangzhu/article/details/104339420