The concept of the JVM
JVM is short for Java Virtual Machine means Java Virtual Machine, refers to the software simulation with complete hardware system functions, running in a completely isolated environment of the complete computer system
Which VMS are available
Vm Name Implementation Method VMWare Uses software to simulate the instruction set of physical cpus. Visual Box Uses software to simulate the instruction set of physical cpus. The JVM uses software to simulate the instruction set of Java bytecodeCopy the code
The history of the JVM
1996 SUN JDK 1.0 Classic VM, pure interpreted running, using a plug-in for JIT
1997 JDK1.1 released AWT, inner classes, JDBC, RMI, reflection
1998 JDK1.2 Solaris Exact VM JIT interpreter hybrid Accurate Memory Management, data type sensitive improved GC performance. From this point on, called Java2 J2SE J2EE, J2ME had to appear to join Swing Collections
In 2000 JDK 1.3 Hotspot was released as the default VIRTUAL machine to add JavaSound
In 2002 the JDK 1.4 Classic VM retired from the Assert regular expression NIO IpV6 logging API encryption class library
In 2004, JDK1.5 was released: JDK5, J2SE 5, Java 5 generics, annotations, boxing, enumerations, variable-length arguments, Foreach loops
JDK1.6 JDK6, scripting language support, JDBC 4.0, Java compiler API
The JDK7 release Delay project was introduced to JDK8, G1, Dynamic Language Enhancement, Compressed pointer in 64-bit systems, NIO 2.0
In 2014, JDK8 released Lambda expressions, syntax enhancements, and Java type annotations
JDK9 modular in 2016
History of the JVM – Memorabilia
The most widely used JVM is HotSpot
HotSpot developed for Longview Technologies was acquired by SUN
In 2006, Java opened source and established OpenJDK HotSpot, which became the virtual machine with Sun JDK and OpenJDK
In 2008 Oracle acquired BEA and acquired JRockit VM
Oracle acquired Hotspot in 2010 when it acquired Sun
Oracle has announced that JRockit and Hotspot will be integrated in JDK8 to complement Hotspot and port the best features of JRockit
Introduction to JVMS – Various JVMS
KVM: released by SUN, widely used in mobile phone systems before IOS and Android
CDC/CLDC HotSpot: an important part of J2ME to establish a unified Java programming interface for mobile phones, e-books, PDAs and other devices
JRockit :BEA
IBM J9 VM: Inside IBM
Apache Harmony : Compatible with JDK 1.5 and JDK 1.6 Java program running platform and Oracle bad relationship exit JCP, Java community split after the emergence of OpenJDK, challenged to retire in 2011 without large-scale commercial experience for the development of Android has a positive role
Introduction to the JVM – specification
Java language specification
Syntax variable type grammarCopy the code
The JVM specification
Class file type Runtime data frame stack Virtual machine start virtual machine instruction setCopy the code
The Java language specification defines what the Java language is, and the Java language is relatively independent of the JVM. Groovy, Clojure, and Scala all run on the JVM. The JVM mainly defines binary class files and JVM instruction sets
Integer expression
Source code: the first bit is a sign bit (0 is positive, 1 is negative)
Reverse code: the symbol bit does not move, the original code to reverse
Negative complement: if the sign bit does not move, the inverse is added by 1
Positive complement: same as the original code
Print the binary representation of the integer int a=-6; for(int i=0; i<32; i++){ int t=(a & 0x80000000>>>i)>>>(31-i); System.out.print(t); }
Why do we use the complement? Because in people’s concept of computing zero is not positive or negative, the unified processing of zero unified processing of addition and subtraction, without adding subtracter operation