Java语言特性与核心概念

Java 的主要特性有哪些?

Java 作为一门流行的编程语言,具有以下核心特性:

  1. 面向对象:支持封装、继承和多态三大特性,让代码结构更清晰
  2. 跨平台性:通过 JVM 实现"一次编写,到处运行",这是 Java 最显著的优势之一
  3. 内置多线程:语言层面原生支持多线程编程,而 C++ 需要依赖操作系统 API
  4. 自动内存管理:JVM 提供垃圾回收机制,程序员无需手动释放内存
  5. 安全机制:提供访问控制、类型检查等多层安全保障
  6. 丰富的类库:标准库功能强大,支持网络编程、数据库操作等
  7. 高性能优化:JIT 编译器在运行时优化热点代码,提升执行效率
  8. 异常处理机制:完善的异常体系让程序更健壮

补充说明:从 C++11 开始,C++ 也引入了标准多线程库(std::thread),可以跨平台使用。

值得一提的是,虽然"跨平台"曾是 Java 的最大卖点,但在容器技术(如 Docker)成熟的今天,跨平台已不再是 Java 的独特优势。Java 真正的核心竞争力在于其庞大而成熟的生态系统

Java SE 和 Java EE 有什么区别?

  • Java SE(Standard Edition):Java 标准平台,包含 Java 语言核心 API、JVM 等基础组件。适用于桌面应用和简单的服务端程序开发。
  • Java EE(Enterprise Edition):Java 企业平台,在 SE 基础上扩展了企业级开发规范,如 Servlet、JSP、JPA、EJB、JMS 等。专门用于构建大型分布式企业应用。

简而言之:SE 是基础版,EE 是增强版。SE 适合中小型应用,EE 适合复杂的企业级系统。

Java ME(Micro Edition)是 Java 微型版,主要用于嵌入式设备开发(如早期手机),现已基本淘汰。

JVM、JDK 和 JRE 的关系

JVM(Java Virtual Machine)

Java 虚拟机是执行 Java 字节码的运行环境。它针对不同操作系统(Windows/Linux/macOS)有特定实现,但能保证相同字节码产生相同结果,这正是 Java 跨平台的关键。

![](data:image/svg+xml;utf8,%3Csvg%20aria-roledescription%3D%22flowchart-v2%22%20role%3D%22graphics-document%20document%22%20viewBox%3D%22-8%20-8%20538.25%20504%22%20style%3D%22max-width%3A%20538.25px%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22538.25%22%20id%3D%22svg%22%20height%3D%22504%22%3E%3Cstyle%3E%23svg%7Bfont-family%3A%22trebuchet%20ms%22%2Cverdana%2Carial%2Csans-serif%3Bfont-size%3A16px%3Bfill%3A%23333%3B%7D%23svg%20.error-icon%7Bfill%3A%23552222%3B%7D%23svg%20.error-text%7Bfill%3A%23552222%3Bstroke%3A%23552222%3B%7D%23svg%20.edge-thickness-normal%7Bstroke-width%3A2px%3B%7D%23svg%20.edge-thickness-thick%7Bstroke-width%3A3.5px%3B%7D%23svg%20.edge-pattern-solid%7Bstroke-dasharray%3A0%3B%7D%23svg%20.edge-pattern-dashed%7Bstroke-dasharray%3A3%3B%7D%23svg%20.edge-pattern-dotted%7Bstroke-dasharray%3A2%3B%7D%23svg%20.marker%7Bfill%3A%23333333%3Bstroke%3A%23333333%3B%7D%23svg%20.marker.cross%7Bstroke%3A%23333333%3B%7D%23svg%20svg%7Bfont-family%3A%22trebuchet%20ms%22%2Cverdana%2Carial%2Csans-serif%3Bfont-size%3A16px%3B%7D%23svg%20.label%7Bfont-family%3A%22trebuchet%20ms%22%2Cverdana%2Carial%2Csans-serif%3Bcolor%3A%23333%3B%7D%23svg%20.cluster-label%20text%7Bfill%3A%23333%3B%7D%23svg%20.cluster-label%20span%2C%23svg%20p%7Bcolor%3A%23333%3B%7D%23svg%20.label%20text%2C%23svg%20span%2C%23svg%20p%7Bfill%3A%23333%3Bcolor%3A%23333%3B%7D%23svg%20.node%20rect%2C%23svg%20.node%20circle%2C%23svg%20.node%20ellipse%2C%23svg%20.node%20polygon%2C%23svg%20.node%20path%7Bfill%3A%23ECECFF%3Bstroke%3A%239370DB%3Bstroke-width%3A1px%3B%7D%23svg%20.flowchart-label%20text%7Btext-anchor%3Amiddle%3B%7D%23svg%20.node%20.katex%20path%7Bfill%3A%23000%3Bstroke%3A%23000%3Bstroke-width%3A1px%3B%7D%23svg%20.node%20.label%7Btext-align%3Acenter%3B%7D%23svg%20.node.clickable%7Bcursor%3Apointer%3B%7D%23svg%20.arrowheadPath%7Bfill%3A%23333333%3B%7D%23svg%20.edgePath%20.path%7Bstroke%3A%23333333%3Bstroke-width%3A2.0px%3B%7D%23svg%20.flowchart-link%7Bstroke%3A%23333333%3Bfill%3Anone%3B%7D%23svg%20.edgeLabel%7Bbackground-color%3A%23e8e8e8%3Btext-align%3Acenter%3B%7D%23svg%20.edgeLabel%20rect%7Bopacity%3A0.5%3Bbackground-color%3A%23e8e8e8%3Bfill%3A%23e8e8e8%3B%7D%23svg%20.labelBkg%7Bbackground-color%3Argba(232%2C%20232%2C%20232%2C%200.5)%3B%7D%23svg%20.cluster%20rect%7Bfill%3A%23ffffde%3Bstroke%3A%23aaaa33%3Bstroke-width%3A1px%3B%7D%23svg%20.cluster%20text%7Bfill%3A%23333%3B%7D%23svg%20.cluster%20span%2C%23svg%20p%7Bcolor%3A%23333%3B%7D%23svg%20div.mermaidTooltip%7Bposition%3Aabsolute%3Btext-align%3Acenter%3Bmax-width%3A200px%3Bpadding%3A2px%3Bfont-family%3A%22trebuchet%20ms%22%2Cverdana%2Carial%2Csans-serif%3Bfont-size%3A12px%3Bbackground%3Ahsl(80%2C%20100%25%2C%2096.2745098039%25)%3Bborder%3A1px%20solid%20%23aaaa33%3Bborder-radius%3A2px%3Bpointer-events%3Anone%3Bz-index%3A100%3B%7D%23svg%20.flowchartTitleText%7Btext-anchor%3Amiddle%3Bfont-size%3A18px%3Bfill%3A%23333%3B%7D%23svg%20.today%7Bdisplay%3Anone%3B%7D%23svg%20.label%20foreignObject%7Boverflow%3Avisible%3B%7D%23svg%20%3Aroot%7B--mermaid-font-family%3A%22trebuchet%20ms%22%2Cverdana%2Carial%2Csans-serif%3B%7D%23svg%20.langStyle%26gt%3B*%7Bfill%3A%234A90E2!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.langStyle%20span%7Bfill%3A%234A90E2!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.langStyle%20tspan%7Bfill%3A%23fff!important%3B%7D%23svg%20.byteStyle%26gt%3B*%7Bfill%3A%237B68EE!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.byteStyle%20span%7Bfill%3A%237B68EE!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.byteStyle%20tspan%7Bfill%3A%23fff!important%3B%7D%23svg%20.jvmStyle%26gt%3B*%7Bfill%3A%2350C878!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.jvmStyle%20span%7Bfill%3A%2350C878!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.jvmStyle%20tspan%7Bfill%3A%23fff!important%3B%7D%23svg%20.osStyle%26gt%3B*%7Bfill%3A%23E85D75!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.osStyle%20span%7Bfill%3A%23E85D75!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.osStyle%20tspan%7Bfill%3A%23fff!important%3B%7D%3C%2Fstyle%3E%3Cg%3E%3Cmarker%20orient%3D%22auto%22%20markerHeight%3D%2212%22%20markerWidth%3D%2212%22%20markerUnits%3D%22userSpaceOnUse%22%20refY%3D%225%22%20refX%3D%226%22%20viewBox%3D%220%200%2010%2010%22%20class%3D%22marker%20flowchart%22%20id%3D%22svg_flowchart-pointEnd%22%3E%3Cpath%20style%3D%22stroke-width%3A%201%3B%20stroke-dasharray%3A%201%2C%200%3B%22%20class%3D%22arrowMarkerPath%22%20d%3D%22M%200%200%20L%2010%205%20L%200%2010%20z%22%3E%3C%2Fpath%3E%3C%2Fmarker%3E%3Cmarker%20orient%3D%22auto%22%20markerHeight%3D%2212%22%20markerWidth%3D%2212%22%20markerUnits%3D%22userSpaceOnUse%22%20refY%3D%225%22%20refX%3D%224.5%22%20viewBox%3D%220%200%2010%2010%22%20class%3D%22marker%20flowchart%22%20id%3D%22svg_flowchart-pointStart%22%3E%3Cpath%20style%3D%22stroke-width%3A%201%3B%20stroke-dasharray%3A%201%2C%200%3B%22%20class%3D%22arrowMarkerPath%22%20d%3D%22M%200%205%20L%2010%2010%20L%2010%200%20z%22%3E%3C%2Fpath%3E%3C%2Fmarker%3E%3Cmarker%20orient%3D%22auto%22%20markerHeight%3D%2211%22%20markerWidth%3D%2211%22%20markerUnits%3D%22userSpaceOnUse%22%20refY%3D%225%22%20refX%3D%2211%22%20viewBox%3D%220%200%2010%2010%22%20class%3D%22marker%20flowchart%22%20id%3D%22svg_flowchart-circleEnd%22%3E%3Ccircle%20style%3D%22stroke-width%3A%201%3B%20stroke-dasharray%3A%201%2C%200%3B%22%20class%3D%22arrowMarkerPath%22%20r%3D%225%22%20cy%3D%225%22%20cx%3D%225%22%3E%3C%2Fcircle%3E%3C%2Fmarker%3E%3Cmarker%20orient%3D%22auto%22%20markerHeight%3D%2211%22%20markerWidth%3D%2211%22%20markerUnits%3D%22userSpaceOnUse%22%20refY%3D%225%22%20refX%3D%22-1%22%20viewBox%3D%220%200%2010%2010%22%20class%3D%22marker%20flowchart%22%20id%3D%22svg_flowchart-circleStart%22%3E%3Ccircle%20style%3D%22stroke-width%3A%201%3B%20stroke-dasharray%3A%201%2C%200%3B%22%20class%3D%22arrowMarkerPath%22%20r%3D%225%22%20cy%3D%225%22%20cx%3D%225%22%3E%3C%2Fcircle%3E%3C%2Fmarker%3E%3Cmarker%20orient%3D%22auto%22%20markerHeight%3D%2211%22%20markerWidth%3D%2211%22%20markerUnits%3D%22userSpaceOnUse%22%20refY%3D%225.2%22%20refX%3D%2212%22%20viewBox%3D%220%200%2011%2011%22%20class%3D%22marker%20cross%20flowchart%22%20id%3D%22svg_flowchart-crossEnd%22%3E%3Cpath%20style%3D%22stroke-width%3A%202%3B%20stroke-dasharray%3A%201%2C%200%3B%22%20class%3D%22arrowMarkerPath%22%20d%3D%22M%201%2C1%20l%209%2C9%20M%2010%2C1%20l%20-9%2C9%22%3E%3C%2Fpath%3E%3C%2Fmarker%3E%3Cmarker%20orient%3D%22auto%22%20markerHeight%3D%2211%22%20markerWidth%3D%2211%22%20markerUnits%3D%22userSpaceOnUse%22%20refY%3D%225.2%22%20refX%3D%22-1%22%20viewBox%3D%220%200%2011%2011%22%20class%3D%22marker%20cross%20flowchart%22%20id%3D%22svg_flowchart-crossStart%22%3E%3Cpath%20style%3D%22stroke-width%3A%202%3B%20stroke-dasharray%3A%201%2C%200%3B%22%20class%3D%22arrowMarkerPath%22%20d%3D%22M%201%2C1%20l%209%2C9%20M%2010%2C1%20l%20-9%2C9%22%3E%3C%2Fpath%3E%3C%2Fmarker%3E%3Cg%20class%3D%22root%22%3E%3Cg%20class%3D%22clusters%22%3E%3Cg%20id%3D%22%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%22%20class%3D%22cluster%20default%20flowchart-label%22%3E%3Crect%20height%3D%2284%22%20width%3D%22474.25%22%20y%3D%22404%22%20x%3D%2216.75%22%20ry%3D%220%22%20rx%3D%220%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(221.875%2C%20404)%22%20class%3D%22cluster-label%22%3E%3CforeignObject%20height%3D%2221%22%20width%3D%2264%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3E%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20id%3D%22subGraph2%22%20class%3D%22cluster%20default%20flowchart-label%22%3E%3Crect%20height%3D%2284%22%20width%3D%22494.375%22%20y%3D%22270%22%20x%3D%2227.875%22%20ry%3D%220%22%20rx%3D%220%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(241.5625%2C%20270)%22%20class%3D%22cluster-label%22%3E%3CforeignObject%20height%3D%2221%22%20width%3D%2267%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3EJVM%20%E5%AE%9E%E7%8E%B0%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20id%3D%22%E5%AD%97%E8%8A%82%E7%A0%81%22%20class%3D%22cluster%20default%20flowchart-label%22%3E%3Crect%20height%3D%2286%22%20width%3D%22464.75%22%20y%3D%22134%22%20x%3D%221.75%22%20ry%3D%220%22%20rx%3D%220%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(210.125%2C%20134)%22%20class%3D%22cluster-label%22%3E%3CforeignObject%20height%3D%2221%22%20width%3D%2248%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3E%E5%AD%97%E8%8A%82%E7%A0%81%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20id%3D%22%E7%BC%96%E7%A8%8B%E8%AF%AD%E8%A8%80%22%20class%3D%22cluster%20default%20flowchart-label%22%3E%3Crect%20height%3D%2284%22%20width%3D%22492%22%20y%3D%220%22%20x%3D%220%22%20ry%3D%220%22%20rx%3D%220%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(214%2C%200)%22%20class%3D%22cluster-label%22%3E%3CforeignObject%20height%3D%2221%22%20width%3D%2264%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3E%E7%BC%96%E7%A8%8B%E8%AF%AD%E8%A8%80%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgePaths%22%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-Java%20LE-ByteCode%22%20id%3D%22L-Java-ByteCode-0%22%20d%3D%22M63.75%2C59L63.75%2C63.167C63.75%2C67.333%2C63.75%2C75.667%2C63.75%2C84C63.75%2C92.333%2C63.75%2C100.667%2C63.75%2C109C63.75%2C117.333%2C63.75%2C125.667%2C95.046%2C135.142C126.342%2C144.617%2C188.933%2C155.234%2C220.229%2C160.543L251.525%2C165.851%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-Kotlin%20LE-ByteCode%22%20id%3D%22L-Kotlin-ByteCode-0%22%20d%3D%22M176.25%2C59L176.25%2C63.167C176.25%2C67.333%2C176.25%2C75.667%2C176.25%2C84C176.25%2C92.333%2C176.25%2C100.667%2C176.25%2C109C176.25%2C117.333%2C176.25%2C125.667%2C189.068%2C133.742C201.886%2C141.818%2C227.521%2C149.636%2C240.339%2C153.545L253.157%2C157.454%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-Groovy%20LE-ByteCode%22%20id%3D%22L-Groovy-ByteCode-0%22%20d%3D%22M300.25%2C59L300.25%2C63.167C300.25%2C67.333%2C300.25%2C75.667%2C300.25%2C84C300.25%2C92.333%2C300.25%2C100.667%2C300.25%2C109C300.25%2C117.333%2C300.25%2C125.667%2C301.573%2C133.179C302.895%2C140.69%2C305.54%2C147.381%2C306.863%2C150.726L308.185%2C154.071%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-Scala%20LE-ByteCode%22%20id%3D%22L-Scala-ByteCode-0%22%20d%3D%22M423.75%2C59L423.75%2C63.167C423.75%2C67.333%2C423.75%2C75.667%2C423.75%2C84C423.75%2C92.333%2C423.75%2C100.667%2C423.75%2C109C423.75%2C117.333%2C423.75%2C125.667%2C414.249%2C133.669C404.749%2C141.672%2C385.747%2C149.344%2C376.247%2C153.18L366.746%2C157.016%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-ByteCode%20LE-HotSpot%22%20id%3D%22L-ByteCode-HotSpot-0%22%20d%3D%22M256.75%2C191.823L237.583%2C196.519C218.417%2C201.216%2C180.083%2C210.608%2C160.917%2C219.471C141.75%2C228.333%2C141.75%2C236.667%2C141.75%2C245C141.75%2C253.333%2C141.75%2C261.667%2C141.75%2C269.117C141.75%2C276.567%2C141.75%2C283.133%2C141.75%2C286.417L141.75%2C289.7%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-ByteCode%20LE-J9%22%20id%3D%22L-ByteCode-J9-0%22%20d%3D%22M311.703%2C195L310.42%2C199.167C309.136%2C203.333%2C306.568%2C211.667%2C305.284%2C220C304%2C228.333%2C304%2C236.667%2C304%2C245C304%2C253.333%2C304%2C261.667%2C304%2C269.117C304%2C276.567%2C304%2C283.133%2C304%2C286.417L304%2C289.7%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-ByteCode%20LE-Zing%22%20id%3D%22L-ByteCode-Zing-0%22%20d%3D%22M368.215%2C195L380.013%2C199.167C391.81%2C203.333%2C415.405%2C211.667%2C427.203%2C220C439%2C228.333%2C439%2C236.667%2C439%2C245C439%2C253.333%2C439%2C261.667%2C439%2C269.117C439%2C276.567%2C439%2C283.133%2C439%2C286.417L439%2C289.7%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-HotSpot%20LE-Windows%22%20id%3D%22L-HotSpot-Windows-0%22%20d%3D%22M118.679%2C329L113.024%2C333.167C107.369%2C337.333%2C96.06%2C345.667%2C90.405%2C354C84.75%2C362.333%2C84.75%2C370.667%2C84.75%2C379C84.75%2C387.333%2C84.75%2C395.667%2C85.88%2C403.164C87.01%2C410.66%2C89.27%2C417.321%2C90.399%2C420.651L91.529%2C423.981%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-HotSpot%20LE-Linux%22%20id%3D%22L-HotSpot-Linux-0%22%20d%3D%22M165.631%2C329L171.484%2C333.167C177.337%2C337.333%2C189.044%2C345.667%2C194.897%2C354C200.75%2C362.333%2C200.75%2C370.667%2C200.75%2C379C200.75%2C387.333%2C200.75%2C395.667%2C221.062%2C405.174C241.375%2C414.681%2C281.999%2C425.361%2C302.312%2C430.702L322.624%2C436.042%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-HotSpot%20LE-MacOS%22%20id%3D%22L-HotSpot-MacOS-0%22%20d%3D%22M173.726%2C329L181.563%2C333.167C189.401%2C337.333%2C205.075%2C345.667%2C212.913%2C354C220.75%2C362.333%2C220.75%2C370.667%2C220.75%2C379C220.75%2C387.333%2C220.75%2C395.667%2C222.043%2C403.176C223.337%2C410.686%2C225.923%2C417.371%2C227.217%2C420.714L228.51%2C424.057%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-J9%20LE-Windows%22%20id%3D%22L-J9-Windows-0%22%20d%3D%22M278.399%2C329L272.124%2C333.167C265.849%2C337.333%2C253.3%2C345.667%2C247.025%2C354C240.75%2C362.333%2C240.75%2C370.667%2C240.75%2C379C240.75%2C387.333%2C240.75%2C395.667%2C225.847%2C404.249C210.944%2C412.831%2C181.138%2C421.663%2C166.235%2C426.079L151.332%2C430.494%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-J9%20LE-Linux%22%20id%3D%22L-J9-Linux-0%22%20d%3D%22M324.946%2C329L330.08%2C333.167C335.214%2C337.333%2C345.482%2C345.667%2C350.616%2C354C355.75%2C362.333%2C355.75%2C370.667%2C355.75%2C379C355.75%2C387.333%2C355.75%2C395.667%2C356.122%2C403.122C356.494%2C410.578%2C357.238%2C417.156%2C357.61%2C420.445L357.982%2C423.734%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-Zing%20LE-Linux%22%20id%3D%22L-Zing-Linux-0%22%20d%3D%22M439%2C329L439%2C333.167C439%2C337.333%2C439%2C345.667%2C439%2C354C439%2C362.333%2C439%2C370.667%2C439%2C379C439%2C387.333%2C439%2C395.667%2C431.991%2C403.583C424.982%2C411.5%2C410.965%2C419%2C403.956%2C422.75L396.947%2C426.5%22%3E%3C%2Fpath%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabels%22%3E%3Cg%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(0%2C%200)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%220%22%20width%3D%220%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(0%2C%200)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%220%22%20width%3D%220%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(0%2C%200)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%220%22%20width%3D%220%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(0%2C%200)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%220%22%20width%3D%220%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(0%2C%200)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%220%22%20width%3D%220%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(0%2C%200)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%220%22%20width%3D%220%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(0%2C%200)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%220%22%20width%3D%220%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(0%2C%200)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%220%22%20width%3D%220%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(0%2C%200)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%220%22%20width%3D%220%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(0%2C%200)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%220%22%20width%3D%220%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(0%2C%200)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%220%22%20width%3D%220%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(0%2C%200)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%220%22%20width%3D%220%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(0%2C%200)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%220%22%20width%3D%220%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22nodes%22%3E%3Cg%20transform%3D%22translate(99%2C%20446)%22%20data-id%3D%22Windows%22%20data-node%3D%22true%22%20id%3D%22flowchart-Windows-8%22%20class%3D%22node%20default%20osStyle%20flowchart-label%22%3E%3Crect%20height%3D%2234%22%20width%3D%2294.5%22%20y%3D%22-17%22%20x%3D%22-47.25%22%20ry%3D%2217%22%20rx%3D%2217%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-35.5%2C%20-9.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2219%22%20width%3D%2271%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3EWindows%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(360.5%2C%20446)%22%20data-id%3D%22Linux%22%20data-node%3D%22true%22%20id%3D%22flowchart-Linux-9%22%20class%3D%22node%20default%20osStyle%20flowchart-label%22%3E%3Crect%20height%3D%2234%22%20width%3D%2265.5%22%20y%3D%22-17%22%20x%3D%22-32.75%22%20ry%3D%2217%22%20rx%3D%2217%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-21%2C%20-9.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2219%22%20width%3D%2242%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3ELinux%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(237%2C%20446)%22%20data-id%3D%22MacOS%22%20data-node%3D%22true%22%20id%3D%22flowchart-MacOS-10%22%20class%3D%22node%20default%20osStyle%20flowchart-label%22%3E%3Crect%20height%3D%2234%22%20width%3D%2281.5%22%20y%3D%22-17%22%20x%3D%22-40.75%22%20ry%3D%2217%22%20rx%3D%2217%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-29%2C%20-9.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2219%22%20width%3D%2258%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3EmacOS%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(141.75%2C%20312)%22%20data-id%3D%22HotSpot%22%20data-node%3D%22true%22%20id%3D%22flowchart-HotSpot-5%22%20class%3D%22node%20default%20jvmStyle%20flowchart-label%22%3E%3Crect%20height%3D%2234%22%20width%3D%22117.5%22%20y%3D%22-17%22%20x%3D%22-58.75%22%20ry%3D%2217%22%20rx%3D%2217%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-47%2C%20-9.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2219%22%20width%3D%2294%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3EHotSpot%20VM%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(304%2C%20312)%22%20data-id%3D%22J9%22%20data-node%3D%22true%22%20id%3D%22flowchart-J9-6%22%20class%3D%22node%20default%20jvmStyle%20flowchart-label%22%3E%3Crect%20height%3D%2234%22%20width%3D%2273.5%22%20y%3D%22-17%22%20x%3D%22-36.75%22%20ry%3D%2217%22%20rx%3D%2217%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-25%2C%20-9.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2219%22%20width%3D%2250%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3EIBM%20J9%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(439%2C%20312)%22%20data-id%3D%22Zing%22%20data-node%3D%22true%22%20id%3D%22flowchart-Zing-7%22%20class%3D%22node%20default%20jvmStyle%20flowchart-label%22%3E%3Crect%20height%3D%2234%22%20width%3D%2296.5%22%20y%3D%22-17%22%20x%3D%22-48.25%22%20ry%3D%2217%22%20rx%3D%2217%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-36.5%2C%20-9.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2219%22%20width%3D%2273%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3EAzul%20Zing%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(317.25%2C%20177)%22%20data-id%3D%22ByteCode%22%20data-node%3D%22true%22%20id%3D%22flowchart-ByteCode-4%22%20class%3D%22node%20default%20byteStyle%20flowchart-label%22%3E%3Crect%20height%3D%2236%22%20width%3D%22121%22%20y%3D%22-18%22%20x%3D%22-60.5%22%20ry%3D%2218%22%20rx%3D%2218%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-48.5%2C%20-10.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2221%22%20width%3D%2297%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3E.class%20%E5%AD%97%E8%8A%82%E7%A0%81%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(63.75%2C%2042)%22%20data-id%3D%22Java%22%20data-node%3D%22true%22%20id%3D%22flowchart-Java-0%22%20class%3D%22node%20default%20langStyle%20flowchart-label%22%3E%3Crect%20height%3D%2234%22%20width%3D%2257.5%22%20y%3D%22-17%22%20x%3D%22-28.75%22%20ry%3D%2217%22%20rx%3D%2217%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-17%2C%20-9.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2219%22%20width%3D%2234%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3EJava%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(176.25%2C%2042)%22%20data-id%3D%22Kotlin%22%20data-node%3D%22true%22%20id%3D%22flowchart-Kotlin-1%22%20class%3D%22node%20default%20langStyle%20flowchart-label%22%3E%3Crect%20height%3D%2234%22%20width%3D%2267.5%22%20y%3D%22-17%22%20x%3D%22-33.75%22%20ry%3D%2217%22%20rx%3D%2217%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-22%2C%20-9.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2219%22%20width%3D%2244%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3EKotlin%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(300.25%2C%2042)%22%20data-id%3D%22Groovy%22%20data-node%3D%22true%22%20id%3D%22flowchart-Groovy-2%22%20class%3D%22node%20default%20langStyle%20flowchart-label%22%3E%3Crect%20height%3D%2234%22%20width%3D%2280.5%22%20y%3D%22-17%22%20x%3D%22-40.25%22%20ry%3D%2217%22%20rx%3D%2217%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-28.5%2C%20-9.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2219%22%20width%3D%2257%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3EGroovy%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(423.75%2C%2042)%22%20data-id%3D%22Scala%22%20data-node%3D%22true%22%20id%3D%22flowchart-Scala-3%22%20class%3D%22node%20default%20langStyle%20flowchart-label%22%3E%3Crect%20height%3D%2234%22%20width%3D%2266.5%22%20y%3D%22-17%22%20x%3D%22-33.25%22%20ry%3D%2217%22%20rx%3D%2217%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-21.5%2C%20-9.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2219%22%20width%3D%2243%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3EScala%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E)

如图所示,不仅 Java,Kotlin、Groovy、Scala 等语言都可以编译成 .class 字节码在 JVM 上运行。

JVM 的实现并非唯一。除了最常用的 HotSpot VM,还有 IBM J9、Azul Zing、Oracle JRockit 等多种实现,只要符合 JVM 规范即可。

JDK(Java Development Kit)

JDK 是 Java 开发工具包,包含:

  • JRE(运行环境)
  • 编译器(javac)
  • 调试器(jdb)
  • 文档生成器(javadoc)
  • 其他开发工具

JRE(Java Runtime Environment)

JRE 是 Java 运行环境,包含:

  • JVM
  • Java 核心类库

三者关系:JDK = JRE + 开发工具,JRE = JVM + 类库

![](data:image/svg+xml;utf8,%3Csvg%20aria-roledescription%3D%22flowchart-v2%22%20role%3D%22graphics-document%20document%22%20viewBox%3D%22-8%20-8%201027.25%20361%22%20style%3D%22max-width%3A%201027.25px%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%221027.25%22%20id%3D%22svg%22%20height%3D%22361%22%3E%3Cstyle%3E%23svg%7Bfont-family%3A%22trebuchet%20ms%22%2Cverdana%2Carial%2Csans-serif%3Bfont-size%3A16px%3Bfill%3A%23333%3B%7D%23svg%20.error-icon%7Bfill%3A%23552222%3B%7D%23svg%20.error-text%7Bfill%3A%23552222%3Bstroke%3A%23552222%3B%7D%23svg%20.edge-thickness-normal%7Bstroke-width%3A2px%3B%7D%23svg%20.edge-thickness-thick%7Bstroke-width%3A3.5px%3B%7D%23svg%20.edge-pattern-solid%7Bstroke-dasharray%3A0%3B%7D%23svg%20.edge-pattern-dashed%7Bstroke-dasharray%3A3%3B%7D%23svg%20.edge-pattern-dotted%7Bstroke-dasharray%3A2%3B%7D%23svg%20.marker%7Bfill%3A%23333333%3Bstroke%3A%23333333%3B%7D%23svg%20.marker.cross%7Bstroke%3A%23333333%3B%7D%23svg%20svg%7Bfont-family%3A%22trebuchet%20ms%22%2Cverdana%2Carial%2Csans-serif%3Bfont-size%3A16px%3B%7D%23svg%20.label%7Bfont-family%3A%22trebuchet%20ms%22%2Cverdana%2Carial%2Csans-serif%3Bcolor%3A%23333%3B%7D%23svg%20.cluster-label%20text%7Bfill%3A%23333%3B%7D%23svg%20.cluster-label%20span%2C%23svg%20p%7Bcolor%3A%23333%3B%7D%23svg%20.label%20text%2C%23svg%20span%2C%23svg%20p%7Bfill%3A%23333%3Bcolor%3A%23333%3B%7D%23svg%20.node%20rect%2C%23svg%20.node%20circle%2C%23svg%20.node%20ellipse%2C%23svg%20.node%20polygon%2C%23svg%20.node%20path%7Bfill%3A%23ECECFF%3Bstroke%3A%239370DB%3Bstroke-width%3A1px%3B%7D%23svg%20.flowchart-label%20text%7Btext-anchor%3Amiddle%3B%7D%23svg%20.node%20.katex%20path%7Bfill%3A%23000%3Bstroke%3A%23000%3Bstroke-width%3A1px%3B%7D%23svg%20.node%20.label%7Btext-align%3Acenter%3B%7D%23svg%20.node.clickable%7Bcursor%3Apointer%3B%7D%23svg%20.arrowheadPath%7Bfill%3A%23333333%3B%7D%23svg%20.edgePath%20.path%7Bstroke%3A%23333333%3Bstroke-width%3A2.0px%3B%7D%23svg%20.flowchart-link%7Bstroke%3A%23333333%3Bfill%3Anone%3B%7D%23svg%20.edgeLabel%7Bbackground-color%3A%23e8e8e8%3Btext-align%3Acenter%3B%7D%23svg%20.edgeLabel%20rect%7Bopacity%3A0.5%3Bbackground-color%3A%23e8e8e8%3Bfill%3A%23e8e8e8%3B%7D%23svg%20.labelBkg%7Bbackground-color%3Argba(232%2C%20232%2C%20232%2C%200.5)%3B%7D%23svg%20.cluster%20rect%7Bfill%3A%23ffffde%3Bstroke%3A%23aaaa33%3Bstroke-width%3A1px%3B%7D%23svg%20.cluster%20text%7Bfill%3A%23333%3B%7D%23svg%20.cluster%20span%2C%23svg%20p%7Bcolor%3A%23333%3B%7D%23svg%20div.mermaidTooltip%7Bposition%3Aabsolute%3Btext-align%3Acenter%3Bmax-width%3A200px%3Bpadding%3A2px%3Bfont-family%3A%22trebuchet%20ms%22%2Cverdana%2Carial%2Csans-serif%3Bfont-size%3A12px%3Bbackground%3Ahsl(80%2C%20100%25%2C%2096.2745098039%25)%3Bborder%3A1px%20solid%20%23aaaa33%3Bborder-radius%3A2px%3Bpointer-events%3Anone%3Bz-index%3A100%3B%7D%23svg%20.flowchartTitleText%7Btext-anchor%3Amiddle%3Bfont-size%3A18px%3Bfill%3A%23333%3B%7D%23svg%20.today%7Bdisplay%3Anone%3B%7D%23svg%20.label%20foreignObject%7Boverflow%3Avisible%3B%7D%23svg%20%3Aroot%7B--mermaid-font-family%3A%22trebuchet%20ms%22%2Cverdana%2Carial%2Csans-serif%3B%7D%23svg%20.jdkStyle%26gt%3B*%7Bfill%3A%234A90E2!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.jdkStyle%20span%7Bfill%3A%234A90E2!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.jdkStyle%20tspan%7Bfill%3A%23fff!important%3B%7D%23svg%20.jreStyle%26gt%3B*%7Bfill%3A%23E85D75!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.jreStyle%20span%7Bfill%3A%23E85D75!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.jreStyle%20tspan%7Bfill%3A%23fff!important%3B%7D%23svg%20.jvmStyle%26gt%3B*%7Bfill%3A%239B59B6!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.jvmStyle%20span%7Bfill%3A%239B59B6!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.jvmStyle%20tspan%7Bfill%3A%23fff!important%3B%7D%23svg%20.toolStyle%26gt%3B*%7Bfill%3A%2350C878!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.toolStyle%20span%7Bfill%3A%2350C878!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.toolStyle%20tspan%7Bfill%3A%23fff!important%3B%7D%23svg%20.libStyle%26gt%3B*%7Bfill%3A%233498DB!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.libStyle%20span%7Bfill%3A%233498DB!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.libStyle%20tspan%7Bfill%3A%23fff!important%3B%7D%3C%2Fstyle%3E%3Cg%3E%3Cmarker%20orient%3D%22auto%22%20markerHeight%3D%2212%22%20markerWidth%3D%2212%22%20markerUnits%3D%22userSpaceOnUse%22%20refY%3D%225%22%20refX%3D%226%22%20viewBox%3D%220%200%2010%2010%22%20class%3D%22marker%20flowchart%22%20id%3D%22svg_flowchart-pointEnd%22%3E%3Cpath%20style%3D%22stroke-width%3A%201%3B%20stroke-dasharray%3A%201%2C%200%3B%22%20class%3D%22arrowMarkerPath%22%20d%3D%22M%200%200%20L%2010%205%20L%200%2010%20z%22%3E%3C%2Fpath%3E%3C%2Fmarker%3E%3Cmarker%20orient%3D%22auto%22%20markerHeight%3D%2212%22%20markerWidth%3D%2212%22%20markerUnits%3D%22userSpaceOnUse%22%20refY%3D%225%22%20refX%3D%224.5%22%20viewBox%3D%220%200%2010%2010%22%20class%3D%22marker%20flowchart%22%20id%3D%22svg_flowchart-pointStart%22%3E%3Cpath%20style%3D%22stroke-width%3A%201%3B%20stroke-dasharray%3A%201%2C%200%3B%22%20class%3D%22arrowMarkerPath%22%20d%3D%22M%200%205%20L%2010%2010%20L%2010%200%20z%22%3E%3C%2Fpath%3E%3C%2Fmarker%3E%3Cmarker%20orient%3D%22auto%22%20markerHeight%3D%2211%22%20markerWidth%3D%2211%22%20markerUnits%3D%22userSpaceOnUse%22%20refY%3D%225%22%20refX%3D%2211%22%20viewBox%3D%220%200%2010%2010%22%20class%3D%22marker%20flowchart%22%20id%3D%22svg_flowchart-circleEnd%22%3E%3Ccircle%20style%3D%22stroke-width%3A%201%3B%20stroke-dasharray%3A%201%2C%200%3B%22%20class%3D%22arrowMarkerPath%22%20r%3D%225%22%20cy%3D%225%22%20cx%3D%225%22%3E%3C%2Fcircle%3E%3C%2Fmarker%3E%3Cmarker%20orient%3D%22auto%22%20markerHeight%3D%2211%22%20markerWidth%3D%2211%22%20markerUnits%3D%22userSpaceOnUse%22%20refY%3D%225%22%20refX%3D%22-1%22%20viewBox%3D%220%200%2010%2010%22%20class%3D%22marker%20flowchart%22%20id%3D%22svg_flowchart-circleStart%22%3E%3Ccircle%20style%3D%22stroke-width%3A%201%3B%20stroke-dasharray%3A%201%2C%200%3B%22%20class%3D%22arrowMarkerPath%22%20r%3D%225%22%20cy%3D%225%22%20cx%3D%225%22%3E%3C%2Fcircle%3E%3C%2Fmarker%3E%3Cmarker%20orient%3D%22auto%22%20markerHeight%3D%2211%22%20markerWidth%3D%2211%22%20markerUnits%3D%22userSpaceOnUse%22%20refY%3D%225.2%22%20refX%3D%2212%22%20viewBox%3D%220%200%2011%2011%22%20class%3D%22marker%20cross%20flowchart%22%20id%3D%22svg_flowchart-crossEnd%22%3E%3Cpath%20style%3D%22stroke-width%3A%202%3B%20stroke-dasharray%3A%201%2C%200%3B%22%20class%3D%22arrowMarkerPath%22%20d%3D%22M%201%2C1%20l%209%2C9%20M%2010%2C1%20l%20-9%2C9%22%3E%3C%2Fpath%3E%3C%2Fmarker%3E%3Cmarker%20orient%3D%22auto%22%20markerHeight%3D%2211%22%20markerWidth%3D%2211%22%20markerUnits%3D%22userSpaceOnUse%22%20refY%3D%225.2%22%20refX%3D%22-1%22%20viewBox%3D%220%200%2011%2011%22%20class%3D%22marker%20cross%20flowchart%22%20id%3D%22svg_flowchart-crossStart%22%3E%3Cpath%20style%3D%22stroke-width%3A%202%3B%20stroke-dasharray%3A%201%2C%200%3B%22%20class%3D%22arrowMarkerPath%22%20d%3D%22M%201%2C1%20l%209%2C9%20M%2010%2C1%20l%20-9%2C9%22%3E%3C%2Fpath%3E%3C%2Fmarker%3E%3Cg%20class%3D%22root%22%3E%3Cg%20class%3D%22clusters%22%3E%3C%2Fg%3E%3Cg%20class%3D%22edgePaths%22%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-JDK%20LE-JRE%22%20id%3D%22L-JDK-JRE-0%22%20d%3D%22M356.063%2C47.44L330.25%2C52.534C304.438%2C57.627%2C252.813%2C67.813%2C227%2C76.19C201.188%2C84.567%2C201.188%2C91.133%2C201.188%2C94.417L201.188%2C97.7%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-JDK%20LE-Tools%22%20id%3D%22L-JDK-Tools-0%22%20d%3D%22M568.313%2C46.626L595.885%2C51.855C623.458%2C57.084%2C678.604%2C67.542%2C706.177%2C77.471C733.75%2C87.4%2C733.75%2C96.8%2C733.75%2C101.5L733.75%2C106.2%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-Tools%20LE-JavaC%22%20id%3D%22L-Tools-JavaC-0%22%20d%3D%22M689.75%2C137.71L651.083%2C144.925C612.417%2C152.14%2C535.083%2C166.57%2C496.417%2C178.485C457.75%2C190.4%2C457.75%2C199.8%2C457.75%2C204.5L457.75%2C209.2%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-Tools%20LE-JavaDoc%22%20id%3D%22L-Tools-JavaDoc-0%22%20d%3D%22M702.643%2C147.5L692.994%2C153.083C683.345%2C158.667%2C664.048%2C169.833%2C654.399%2C180.117C644.75%2C190.4%2C644.75%2C199.8%2C644.75%2C204.5L644.75%2C209.2%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-Tools%20LE-Jdb%22%20id%3D%22L-Tools-Jdb-0%22%20d%3D%22M764.857%2C147.5L774.506%2C153.083C784.155%2C158.667%2C803.452%2C169.833%2C813.101%2C180.117C822.75%2C190.4%2C822.75%2C199.8%2C822.75%2C204.5L822.75%2C209.2%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-Tools%20LE-Other%22%20id%3D%22L-Tools-Other-0%22%20d%3D%22M777.75%2C139.204L809.333%2C146.17C840.917%2C153.136%2C904.083%2C167.068%2C935.667%2C178.734C967.25%2C190.4%2C967.25%2C199.8%2C967.25%2C204.5L967.25%2C209.2%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-JRE%20LE-JVM%22%20id%3D%22L-JRE-JVM-0%22%20d%3D%22M149.956%2C156L141.901%2C160.167C133.846%2C164.333%2C117.735%2C172.667%2C109.68%2C180.117C101.625%2C187.567%2C101.625%2C194.133%2C101.625%2C197.417L101.625%2C200.7%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-JRE%20LE-Lib%22%20id%3D%22L-JRE-Lib-0%22%20d%3D%22M252.419%2C156L260.474%2C160.167C268.529%2C164.333%2C284.64%2C172.667%2C292.695%2C181.533C300.75%2C190.4%2C300.75%2C199.8%2C300.75%2C204.5L300.75%2C209.2%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-Lib%20LE-CoreLib%22%20id%3D%22L-Lib-CoreLib-0%22%20d%3D%22M276.633%2C250.5L269.153%2C256.083C261.672%2C261.667%2C246.711%2C272.833%2C239.231%2C281.7C231.75%2C290.567%2C231.75%2C297.133%2C231.75%2C300.417L231.75%2C303.7%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-Lib%20LE-ExtLib%22%20id%3D%22L-Lib-ExtLib-0%22%20d%3D%22M324.867%2C250.5L332.347%2C256.083C339.828%2C261.667%2C354.789%2C272.833%2C362.269%2C281.7C369.75%2C290.567%2C369.75%2C297.133%2C369.75%2C300.417L369.75%2C303.7%22%3E%3C%2Fpath%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabels%22%3E%3Cg%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(0%2C%200)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%220%22%20width%3D%220%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(0%2C%200)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%220%22%20width%3D%220%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(0%2C%200)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%220%22%20width%3D%220%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(0%2C%200)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%220%22%20width%3D%220%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(0%2C%200)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%220%22%20width%3D%220%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(0%2C%200)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%220%22%20width%3D%220%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(0%2C%200)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%220%22%20width%3D%220%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(0%2C%200)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%220%22%20width%3D%220%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(0%2C%200)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%220%22%20width%3D%220%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(0%2C%200)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%220%22%20width%3D%220%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22nodes%22%3E%3Cg%20transform%3D%22translate(462.1875%2C%2026.5)%22%20data-id%3D%22JDK%22%20data-node%3D%22true%22%20id%3D%22flowchart-JDK-0%22%20class%3D%22node%20default%20jdkStyle%20flowchart-label%22%3E%3Crect%20height%3D%2253%22%20width%3D%22212.25%22%20y%3D%22-26.5%22%20x%3D%22-106.125%22%20ry%3D%2226.5%22%20rx%3D%2226.5%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-92%2C%20-19)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2238%22%20width%3D%22184%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3EJDK%3Cbr%2F%3E(Java%20Development%20Kit)%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(201.1875%2C%20129.5)%22%20data-id%3D%22JRE%22%20data-node%3D%22true%22%20id%3D%22flowchart-JRE-1%22%20class%3D%22node%20default%20jreStyle%20flowchart-label%22%3E%3Crect%20height%3D%2253%22%20width%3D%22252.25%22%20y%3D%22-26.5%22%20x%3D%22-126.125%22%20ry%3D%2226.5%22%20rx%3D%2226.5%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-112%2C%20-19)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2238%22%20width%3D%22224%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3EJRE%3Cbr%2F%3E(Java%20Runtime%20Environment)%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(101.625%2C%20232.5)%22%20data-id%3D%22JVM%22%20data-node%3D%22true%22%20id%3D%22flowchart-JVM-2%22%20class%3D%22node%20default%20jvmStyle%20flowchart-label%22%3E%3Crect%20height%3D%2253%22%20width%3D%22203.25%22%20y%3D%22-26.5%22%20x%3D%22-101.625%22%20ry%3D%2226.5%22%20rx%3D%2226.5%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-87.5%2C%20-19)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2238%22%20width%3D%22175%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3EJVM%3Cbr%2F%3E(Java%20Virtual%20Machine)%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(733.75%2C%20129.5)%22%20data-id%3D%22Tools%22%20data-node%3D%22true%22%20id%3D%22flowchart-Tools-3%22%20class%3D%22node%20default%20toolStyle%20flowchart-label%22%3E%3Crect%20height%3D%2236%22%20width%3D%2288%22%20y%3D%22-18%22%20x%3D%22-44%22%20ry%3D%2218%22%20rx%3D%2218%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-32%2C%20-10.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2221%22%20width%3D%2264%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3E%E5%BC%80%E5%8F%91%E5%B7%A5%E5%85%B7%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(457.75%2C%20232.5)%22%20data-id%3D%22JavaC%22%20data-node%3D%22true%22%20id%3D%22flowchart-JavaC-4%22%20class%3D%22node%20default%20toolStyle%20flowchart-label%22%3E%3Crect%20height%3D%2236%22%20width%3D%22119%22%20y%3D%22-18%22%20x%3D%22-59.5%22%20ry%3D%2218%22%20rx%3D%2218%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-47.5%2C%20-10.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2221%22%20width%3D%2295%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3Ejavac%20%E7%BC%96%E8%AF%91%E5%99%A8%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(644.75%2C%20232.5)%22%20data-id%3D%22JavaDoc%22%20data-node%3D%22true%22%20id%3D%22flowchart-JavaDoc-5%22%20class%3D%22node%20default%20toolStyle%20flowchart-label%22%3E%3Crect%20height%3D%2236%22%20width%3D%22155%22%20y%3D%22-18%22%20x%3D%22-77.5%22%20ry%3D%2218%22%20rx%3D%2218%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-65.5%2C%20-10.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2221%22%20width%3D%22131%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3Ejavadoc%20%E6%96%87%E6%A1%A3%E7%94%9F%E6%88%90%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(822.75%2C%20232.5)%22%20data-id%3D%22Jdb%22%20data-node%3D%22true%22%20id%3D%22flowchart-Jdb-6%22%20class%3D%22node%20default%20toolStyle%20flowchart-label%22%3E%3Crect%20height%3D%2236%22%20width%3D%22101%22%20y%3D%22-18%22%20x%3D%22-50.5%22%20ry%3D%2218%22%20rx%3D%2218%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-38.5%2C%20-10.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2221%22%20width%3D%2277%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3Ejdb%20%E8%B0%83%E8%AF%95%E5%99%A8%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(967.25%2C%20232.5)%22%20data-id%3D%22Other%22%20data-node%3D%22true%22%20id%3D%22flowchart-Other-7%22%20class%3D%22node%20default%20toolStyle%20flowchart-label%22%3E%3Crect%20height%3D%2236%22%20width%3D%2288%22%20y%3D%22-18%22%20x%3D%22-44%22%20ry%3D%2218%22%20rx%3D%2218%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-32%2C%20-10.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2221%22%20width%3D%2264%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3E%E5%85%B6%E4%BB%96%E5%B7%A5%E5%85%B7%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(300.75%2C%20232.5)%22%20data-id%3D%22Lib%22%20data-node%3D%22true%22%20id%3D%22flowchart-Lib-8%22%20class%3D%22node%20default%20libStyle%20flowchart-label%22%3E%3Crect%20height%3D%2236%22%20width%3D%2295%22%20y%3D%22-18%22%20x%3D%22-47.5%22%20ry%3D%2218%22%20rx%3D%2218%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-35.5%2C%20-10.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2221%22%20width%3D%2271%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3EJava%20%E7%B1%BB%E5%BA%93%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(231.75%2C%20327)%22%20data-id%3D%22CoreLib%22%20data-node%3D%22true%22%20id%3D%22flowchart-CoreLib-9%22%20class%3D%22node%20default%20libStyle%20flowchart-label%22%3E%3Crect%20height%3D%2236%22%20width%3D%2288%22%20y%3D%22-18%22%20x%3D%22-44%22%20ry%3D%2218%22%20rx%3D%2218%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-32%2C%20-10.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2221%22%20width%3D%2264%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3E%E6%A0%B8%E5%BF%83%E7%B1%BB%E5%BA%93%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(369.75%2C%20327)%22%20data-id%3D%22ExtLib%22%20data-node%3D%22true%22%20id%3D%22flowchart-ExtLib-10%22%20class%3D%22node%20default%20libStyle%20flowchart-label%22%3E%3Crect%20height%3D%2236%22%20width%3D%2288%22%20y%3D%22-18%22%20x%3D%22-44%22%20ry%3D%2218%22%20rx%3D%2218%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-32%2C%20-10.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2221%22%20width%3D%2264%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3E%E6%89%A9%E5%B1%95%E7%B1%BB%E5%BA%93%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E)

重要变化:从 JDK 9 开始引入模块化系统,配合 jlink 工具可以创建定制化的运行时环境。从 JDK 11 起,Oracle 不再单独提供 JRE 下载。

什么是字节码?为什么要使用字节码?

字节码(Bytecode)是 JVM 能够理解的中间代码,存储在 .class 文件中。它不针对特定处理器,只面向虚拟机,这使得 Java 兼具解释型语言的可移植性和编译型语言的高效性。

Java 程序执行流程:

![](data:image/svg+xml;utf8,%3Csvg%20aria-roledescription%3D%22flowchart-v2%22%20role%3D%22graphics-document%20document%22%20viewBox%3D%22-8%20-8%201026.5%2071%22%20style%3D%22max-width%3A%201026.5px%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%221026.5%22%20id%3D%22svg%22%20height%3D%2271%22%3E%3Cstyle%3E%23svg%7Bfont-family%3A%22trebuchet%20ms%22%2Cverdana%2Carial%2Csans-serif%3Bfont-size%3A16px%3Bfill%3A%23333%3B%7D%23svg%20.error-icon%7Bfill%3A%23552222%3B%7D%23svg%20.error-text%7Bfill%3A%23552222%3Bstroke%3A%23552222%3B%7D%23svg%20.edge-thickness-normal%7Bstroke-width%3A2px%3B%7D%23svg%20.edge-thickness-thick%7Bstroke-width%3A3.5px%3B%7D%23svg%20.edge-pattern-solid%7Bstroke-dasharray%3A0%3B%7D%23svg%20.edge-pattern-dashed%7Bstroke-dasharray%3A3%3B%7D%23svg%20.edge-pattern-dotted%7Bstroke-dasharray%3A2%3B%7D%23svg%20.marker%7Bfill%3A%23333333%3Bstroke%3A%23333333%3B%7D%23svg%20.marker.cross%7Bstroke%3A%23333333%3B%7D%23svg%20svg%7Bfont-family%3A%22trebuchet%20ms%22%2Cverdana%2Carial%2Csans-serif%3Bfont-size%3A16px%3B%7D%23svg%20.label%7Bfont-family%3A%22trebuchet%20ms%22%2Cverdana%2Carial%2Csans-serif%3Bcolor%3A%23333%3B%7D%23svg%20.cluster-label%20text%7Bfill%3A%23333%3B%7D%23svg%20.cluster-label%20span%2C%23svg%20p%7Bcolor%3A%23333%3B%7D%23svg%20.label%20text%2C%23svg%20span%2C%23svg%20p%7Bfill%3A%23333%3Bcolor%3A%23333%3B%7D%23svg%20.node%20rect%2C%23svg%20.node%20circle%2C%23svg%20.node%20ellipse%2C%23svg%20.node%20polygon%2C%23svg%20.node%20path%7Bfill%3A%23ECECFF%3Bstroke%3A%239370DB%3Bstroke-width%3A1px%3B%7D%23svg%20.flowchart-label%20text%7Btext-anchor%3Amiddle%3B%7D%23svg%20.node%20.katex%20path%7Bfill%3A%23000%3Bstroke%3A%23000%3Bstroke-width%3A1px%3B%7D%23svg%20.node%20.label%7Btext-align%3Acenter%3B%7D%23svg%20.node.clickable%7Bcursor%3Apointer%3B%7D%23svg%20.arrowheadPath%7Bfill%3A%23333333%3B%7D%23svg%20.edgePath%20.path%7Bstroke%3A%23333333%3Bstroke-width%3A2.0px%3B%7D%23svg%20.flowchart-link%7Bstroke%3A%23333333%3Bfill%3Anone%3B%7D%23svg%20.edgeLabel%7Bbackground-color%3A%23e8e8e8%3Btext-align%3Acenter%3B%7D%23svg%20.edgeLabel%20rect%7Bopacity%3A0.5%3Bbackground-color%3A%23e8e8e8%3Bfill%3A%23e8e8e8%3B%7D%23svg%20.labelBkg%7Bbackground-color%3Argba(232%2C%20232%2C%20232%2C%200.5)%3B%7D%23svg%20.cluster%20rect%7Bfill%3A%23ffffde%3Bstroke%3A%23aaaa33%3Bstroke-width%3A1px%3B%7D%23svg%20.cluster%20text%7Bfill%3A%23333%3B%7D%23svg%20.cluster%20span%2C%23svg%20p%7Bcolor%3A%23333%3B%7D%23svg%20div.mermaidTooltip%7Bposition%3Aabsolute%3Btext-align%3Acenter%3Bmax-width%3A200px%3Bpadding%3A2px%3Bfont-family%3A%22trebuchet%20ms%22%2Cverdana%2Carial%2Csans-serif%3Bfont-size%3A12px%3Bbackground%3Ahsl(80%2C%20100%25%2C%2096.2745098039%25)%3Bborder%3A1px%20solid%20%23aaaa33%3Bborder-radius%3A2px%3Bpointer-events%3Anone%3Bz-index%3A100%3B%7D%23svg%20.flowchartTitleText%7Btext-anchor%3Amiddle%3Bfont-size%3A18px%3Bfill%3A%23333%3B%7D%23svg%20.today%7Bdisplay%3Anone%3B%7D%23svg%20.label%20foreignObject%7Boverflow%3Avisible%3B%7D%23svg%20%3Aroot%7B--mermaid-font-family%3A%22trebuchet%20ms%22%2Cverdana%2Carial%2Csans-serif%3B%7D%23svg%20.sourceStyle%26gt%3B*%7Bfill%3A%234A90E2!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.sourceStyle%20span%7Bfill%3A%234A90E2!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.sourceStyle%20tspan%7Bfill%3A%23fff!important%3B%7D%23svg%20.byteStyle%26gt%3B*%7Bfill%3A%23E85D75!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.byteStyle%20span%7Bfill%3A%23E85D75!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.byteStyle%20tspan%7Bfill%3A%23fff!important%3B%7D%23svg%20.memStyle%26gt%3B*%7Bfill%3A%239B59B6!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.memStyle%20span%7Bfill%3A%239B59B6!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.memStyle%20tspan%7Bfill%3A%23fff!important%3B%7D%23svg%20.codeStyle%26gt%3B*%7Bfill%3A%2350C878!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.codeStyle%20span%7Bfill%3A%2350C878!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.codeStyle%20tspan%7Bfill%3A%23fff!important%3B%7D%3C%2Fstyle%3E%3Cg%3E%3Cmarker%20orient%3D%22auto%22%20markerHeight%3D%2212%22%20markerWidth%3D%2212%22%20markerUnits%3D%22userSpaceOnUse%22%20refY%3D%225%22%20refX%3D%226%22%20viewBox%3D%220%200%2010%2010%22%20class%3D%22marker%20flowchart%22%20id%3D%22svg_flowchart-pointEnd%22%3E%3Cpath%20style%3D%22stroke-width%3A%201%3B%20stroke-dasharray%3A%201%2C%200%3B%22%20class%3D%22arrowMarkerPath%22%20d%3D%22M%200%200%20L%2010%205%20L%200%2010%20z%22%3E%3C%2Fpath%3E%3C%2Fmarker%3E%3Cmarker%20orient%3D%22auto%22%20markerHeight%3D%2212%22%20markerWidth%3D%2212%22%20markerUnits%3D%22userSpaceOnUse%22%20refY%3D%225%22%20refX%3D%224.5%22%20viewBox%3D%220%200%2010%2010%22%20class%3D%22marker%20flowchart%22%20id%3D%22svg_flowchart-pointStart%22%3E%3Cpath%20style%3D%22stroke-width%3A%201%3B%20stroke-dasharray%3A%201%2C%200%3B%22%20class%3D%22arrowMarkerPath%22%20d%3D%22M%200%205%20L%2010%2010%20L%2010%200%20z%22%3E%3C%2Fpath%3E%3C%2Fmarker%3E%3Cmarker%20orient%3D%22auto%22%20markerHeight%3D%2211%22%20markerWidth%3D%2211%22%20markerUnits%3D%22userSpaceOnUse%22%20refY%3D%225%22%20refX%3D%2211%22%20viewBox%3D%220%200%2010%2010%22%20class%3D%22marker%20flowchart%22%20id%3D%22svg_flowchart-circleEnd%22%3E%3Ccircle%20style%3D%22stroke-width%3A%201%3B%20stroke-dasharray%3A%201%2C%200%3B%22%20class%3D%22arrowMarkerPath%22%20r%3D%225%22%20cy%3D%225%22%20cx%3D%225%22%3E%3C%2Fcircle%3E%3C%2Fmarker%3E%3Cmarker%20orient%3D%22auto%22%20markerHeight%3D%2211%22%20markerWidth%3D%2211%22%20markerUnits%3D%22userSpaceOnUse%22%20refY%3D%225%22%20refX%3D%22-1%22%20viewBox%3D%220%200%2010%2010%22%20class%3D%22marker%20flowchart%22%20id%3D%22svg_flowchart-circleStart%22%3E%3Ccircle%20style%3D%22stroke-width%3A%201%3B%20stroke-dasharray%3A%201%2C%200%3B%22%20class%3D%22arrowMarkerPath%22%20r%3D%225%22%20cy%3D%225%22%20cx%3D%225%22%3E%3C%2Fcircle%3E%3C%2Fmarker%3E%3Cmarker%20orient%3D%22auto%22%20markerHeight%3D%2211%22%20markerWidth%3D%2211%22%20markerUnits%3D%22userSpaceOnUse%22%20refY%3D%225.2%22%20refX%3D%2212%22%20viewBox%3D%220%200%2011%2011%22%20class%3D%22marker%20cross%20flowchart%22%20id%3D%22svg_flowchart-crossEnd%22%3E%3Cpath%20style%3D%22stroke-width%3A%202%3B%20stroke-dasharray%3A%201%2C%200%3B%22%20class%3D%22arrowMarkerPath%22%20d%3D%22M%201%2C1%20l%209%2C9%20M%2010%2C1%20l%20-9%2C9%22%3E%3C%2Fpath%3E%3C%2Fmarker%3E%3Cmarker%20orient%3D%22auto%22%20markerHeight%3D%2211%22%20markerWidth%3D%2211%22%20markerUnits%3D%22userSpaceOnUse%22%20refY%3D%225.2%22%20refX%3D%22-1%22%20viewBox%3D%220%200%2011%2011%22%20class%3D%22marker%20cross%20flowchart%22%20id%3D%22svg_flowchart-crossStart%22%3E%3Cpath%20style%3D%22stroke-width%3A%202%3B%20stroke-dasharray%3A%201%2C%200%3B%22%20class%3D%22arrowMarkerPath%22%20d%3D%22M%201%2C1%20l%209%2C9%20M%2010%2C1%20l%20-9%2C9%22%3E%3C%2Fpath%3E%3C%2Fmarker%3E%3Cg%20class%3D%22root%22%3E%3Cg%20class%3D%22clusters%22%3E%3C%2Fg%3E%3Cg%20class%3D%22edgePaths%22%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-A%20LE-B%22%20id%3D%22L-A-B-0%22%20d%3D%22M115.75%2C27.5L126.5%2C27.5C137.25%2C27.5%2C158.75%2C27.5%2C179.367%2C27.5C199.983%2C27.5%2C219.717%2C27.5%2C229.583%2C27.5L239.45%2C27.5%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-B%20LE-C%22%20id%3D%22L-B-C-0%22%20d%3D%22M321.5%2C27.5L331%2C27.5C340.5%2C27.5%2C359.5%2C27.5%2C377.617%2C27.5C395.733%2C27.5%2C412.967%2C27.5%2C421.583%2C27.5L430.2%2C27.5%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-C%20LE-D%22%20id%3D%22L-C-D-0%22%20d%3D%22M526.5%2C27.5L534.667%2C27.5C542.833%2C27.5%2C559.167%2C27.5%2C574.617%2C27.5C590.067%2C27.5%2C604.633%2C27.5%2C611.917%2C27.5L619.2%2C27.5%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-D%20LE-E%22%20id%3D%22L-D-E-0%22%20d%3D%22M744.5%2C27.5L748.667%2C27.5C752.833%2C27.5%2C761.167%2C27.5%2C768.617%2C27.5C776.067%2C27.5%2C782.633%2C27.5%2C785.917%2C27.5L789.2%2C27.5%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-E%20LE-F%22%20id%3D%22L-E-F-0%22%20d%3D%22M866.5%2C27.5L870.667%2C27.5C874.833%2C27.5%2C883.167%2C27.5%2C890.617%2C27.5C898.067%2C27.5%2C904.633%2C27.5%2C907.917%2C27.5L911.2%2C27.5%22%3E%3C%2Fpath%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabels%22%3E%3Cg%20transform%3D%22translate(180.25%2C%2027.5)%22%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(-39.5%2C%20-10.5)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%2221%22%20width%3D%2279%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3Ejavac%20%E7%BC%96%E8%AF%91%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(378.5%2C%2027.5)%22%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(-32%2C%20-10.5)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%2221%22%20width%3D%2264%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%E7%B1%BB%E5%8A%A0%E8%BD%BD%E5%99%A8%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(575.5%2C%2027.5)%22%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(-24%2C%20-10.5)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%2221%22%20width%3D%2248%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%E8%A7%A3%E9%87%8A%E5%99%A8%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(0%2C%200)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%220%22%20width%3D%220%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(0%2C%200)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%220%22%20width%3D%220%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22nodes%22%3E%3Cg%20transform%3D%22translate(57.875%2C%2027.5)%22%20data-id%3D%22A%22%20data-node%3D%22true%22%20id%3D%22flowchart-A-0%22%20class%3D%22node%20default%20sourceStyle%20flowchart-label%22%3E%3Crect%20height%3D%2255%22%20width%3D%22115.75%22%20y%3D%22-27.5%22%20x%3D%22-57.875%22%20ry%3D%2227.5%22%20rx%3D%2227.5%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-43.5%2C%20-20)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2240%22%20width%3D%2287%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3EJava%20%E6%BA%90%E4%BB%A3%E7%A0%81%3Cbr%2F%3E.java%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(283.125%2C%2027.5)%22%20data-id%3D%22B%22%20data-node%3D%22true%22%20id%3D%22flowchart-B-1%22%20class%3D%22node%20default%20byteStyle%20flowchart-label%22%3E%3Crect%20height%3D%2255%22%20width%3D%2276.75%22%20y%3D%22-27.5%22%20x%3D%22-38.375%22%20ry%3D%2227.5%22%20rx%3D%2227.5%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-24%2C%20-20)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2240%22%20width%3D%2248%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3E%E5%AD%97%E8%8A%82%E7%A0%81%3Cbr%2F%3E.class%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(481%2C%2027.5)%22%20data-id%3D%22C%22%20data-node%3D%22true%22%20id%3D%22flowchart-C-3%22%20class%3D%22node%20default%20memStyle%20flowchart-label%22%3E%3Crect%20height%3D%2236%22%20width%3D%2291%22%20y%3D%22-18%22%20x%3D%22-45.5%22%20ry%3D%2218%22%20rx%3D%2218%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-33.5%2C%20-10.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2221%22%20width%3D%2267%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3EJVM%20%E5%86%85%E5%AD%98%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(684.5%2C%2027.5)%22%20data-id%3D%22D%22%20data-node%3D%22true%22%20id%3D%22flowchart-D-5%22%20class%3D%22node%20default%20memStyle%20flowchart-label%22%3E%3Crect%20height%3D%2236%22%20width%3D%22120%22%20y%3D%22-18%22%20x%3D%22-60%22%20ry%3D%2218%22%20rx%3D%2218%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-48%2C%20-10.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2221%22%20width%3D%2296%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3E%E9%80%90%E8%A1%8C%E8%A7%A3%E9%87%8A%E6%89%A7%E8%A1%8C%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(830.5%2C%2027.5)%22%20data-id%3D%22E%22%20data-node%3D%22true%22%20id%3D%22flowchart-E-7%22%20class%3D%22node%20default%20codeStyle%20flowchart-label%22%3E%3Crect%20height%3D%2236%22%20width%3D%2272%22%20y%3D%22-18%22%20x%3D%22-36%22%20ry%3D%2218%22%20rx%3D%2218%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-24%2C%20-10.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2221%22%20width%3D%2248%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3E%E6%9C%BA%E5%99%A8%E7%A0%81%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(963.5%2C%2027.5)%22%20data-id%3D%22F%22%20data-node%3D%22true%22%20id%3D%22flowchart-F-9%22%20class%3D%22node%20default%20codeStyle%20flowchart-label%22%3E%3Crect%20height%3D%2236%22%20width%3D%2294%22%20y%3D%22-18%22%20x%3D%22-47%22%20ry%3D%2218%22%20rx%3D%2218%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-35%2C%20-10.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2221%22%20width%3D%2270%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3ECPU%20%E6%89%A7%E8%A1%8C%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E)

关键在于 .class → 机器码 这一步:

  1. 类加载器加载字节码
  2. 解释器逐行执行(较慢)
  3. JIT 编译器发现热点代码后编译成机器码缓存,下次直接使用(快速)

这就是为什么说 Java 是编译与解释并存的语言

![](data:image/svg+xml;utf8,%3Csvg%20aria-roledescription%3D%22flowchart-v2%22%20role%3D%22graphics-document%20document%22%20viewBox%3D%22-8%20-8%20284.5%20942%22%20style%3D%22max-width%3A%20284.5px%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22284.5%22%20id%3D%22svg%22%20height%3D%22942%22%3E%3Cstyle%3E%23svg%7Bfont-family%3A%22trebuchet%20ms%22%2Cverdana%2Carial%2Csans-serif%3Bfont-size%3A16px%3Bfill%3A%23333%3B%7D%23svg%20.error-icon%7Bfill%3A%23552222%3B%7D%23svg%20.error-text%7Bfill%3A%23552222%3Bstroke%3A%23552222%3B%7D%23svg%20.edge-thickness-normal%7Bstroke-width%3A2px%3B%7D%23svg%20.edge-thickness-thick%7Bstroke-width%3A3.5px%3B%7D%23svg%20.edge-pattern-solid%7Bstroke-dasharray%3A0%3B%7D%23svg%20.edge-pattern-dashed%7Bstroke-dasharray%3A3%3B%7D%23svg%20.edge-pattern-dotted%7Bstroke-dasharray%3A2%3B%7D%23svg%20.marker%7Bfill%3A%23333333%3Bstroke%3A%23333333%3B%7D%23svg%20.marker.cross%7Bstroke%3A%23333333%3B%7D%23svg%20svg%7Bfont-family%3A%22trebuchet%20ms%22%2Cverdana%2Carial%2Csans-serif%3Bfont-size%3A16px%3B%7D%23svg%20.label%7Bfont-family%3A%22trebuchet%20ms%22%2Cverdana%2Carial%2Csans-serif%3Bcolor%3A%23333%3B%7D%23svg%20.cluster-label%20text%7Bfill%3A%23333%3B%7D%23svg%20.cluster-label%20span%2C%23svg%20p%7Bcolor%3A%23333%3B%7D%23svg%20.label%20text%2C%23svg%20span%2C%23svg%20p%7Bfill%3A%23333%3Bcolor%3A%23333%3B%7D%23svg%20.node%20rect%2C%23svg%20.node%20circle%2C%23svg%20.node%20ellipse%2C%23svg%20.node%20polygon%2C%23svg%20.node%20path%7Bfill%3A%23ECECFF%3Bstroke%3A%239370DB%3Bstroke-width%3A1px%3B%7D%23svg%20.flowchart-label%20text%7Btext-anchor%3Amiddle%3B%7D%23svg%20.node%20.katex%20path%7Bfill%3A%23000%3Bstroke%3A%23000%3Bstroke-width%3A1px%3B%7D%23svg%20.node%20.label%7Btext-align%3Acenter%3B%7D%23svg%20.node.clickable%7Bcursor%3Apointer%3B%7D%23svg%20.arrowheadPath%7Bfill%3A%23333333%3B%7D%23svg%20.edgePath%20.path%7Bstroke%3A%23333333%3Bstroke-width%3A2.0px%3B%7D%23svg%20.flowchart-link%7Bstroke%3A%23333333%3Bfill%3Anone%3B%7D%23svg%20.edgeLabel%7Bbackground-color%3A%23e8e8e8%3Btext-align%3Acenter%3B%7D%23svg%20.edgeLabel%20rect%7Bopacity%3A0.5%3Bbackground-color%3A%23e8e8e8%3Bfill%3A%23e8e8e8%3B%7D%23svg%20.labelBkg%7Bbackground-color%3Argba(232%2C%20232%2C%20232%2C%200.5)%3B%7D%23svg%20.cluster%20rect%7Bfill%3A%23ffffde%3Bstroke%3A%23aaaa33%3Bstroke-width%3A1px%3B%7D%23svg%20.cluster%20text%7Bfill%3A%23333%3B%7D%23svg%20.cluster%20span%2C%23svg%20p%7Bcolor%3A%23333%3B%7D%23svg%20div.mermaidTooltip%7Bposition%3Aabsolute%3Btext-align%3Acenter%3Bmax-width%3A200px%3Bpadding%3A2px%3Bfont-family%3A%22trebuchet%20ms%22%2Cverdana%2Carial%2Csans-serif%3Bfont-size%3A12px%3Bbackground%3Ahsl(80%2C%20100%25%2C%2096.2745098039%25)%3Bborder%3A1px%20solid%20%23aaaa33%3Bborder-radius%3A2px%3Bpointer-events%3Anone%3Bz-index%3A100%3B%7D%23svg%20.flowchartTitleText%7Btext-anchor%3Amiddle%3Bfont-size%3A18px%3Bfill%3A%23333%3B%7D%23svg%20.today%7Bdisplay%3Anone%3B%7D%23svg%20.label%20foreignObject%7Boverflow%3Avisible%3B%7D%23svg%20%3Aroot%7B--mermaid-font-family%3A%22trebuchet%20ms%22%2Cverdana%2Carial%2Csans-serif%3B%7D%23svg%20.sourceStyle%26gt%3B*%7Bfill%3A%234A90E2!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.sourceStyle%20span%7Bfill%3A%234A90E2!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.sourceStyle%20tspan%7Bfill%3A%23fff!important%3B%7D%23svg%20.jvmStyle%26gt%3B*%7Bfill%3A%239B59B6!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.jvmStyle%20span%7Bfill%3A%239B59B6!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.jvmStyle%20tspan%7Bfill%3A%23fff!important%3B%7D%23svg%20.jitStyle%26gt%3B*%7Bfill%3A%23E85D75!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.jitStyle%20span%7Bfill%3A%23E85D75!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.jitStyle%20tspan%7Bfill%3A%23fff!important%3B%7D%23svg%20.cacheStyle%26gt%3B*%7Bfill%3A%2350C878!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.cacheStyle%20span%7Bfill%3A%2350C878!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.cacheStyle%20tspan%7Bfill%3A%23fff!important%3B%7D%3C%2Fstyle%3E%3Cg%3E%3Cmarker%20orient%3D%22auto%22%20markerHeight%3D%2212%22%20markerWidth%3D%2212%22%20markerUnits%3D%22userSpaceOnUse%22%20refY%3D%225%22%20refX%3D%226%22%20viewBox%3D%220%200%2010%2010%22%20class%3D%22marker%20flowchart%22%20id%3D%22svg_flowchart-pointEnd%22%3E%3Cpath%20style%3D%22stroke-width%3A%201%3B%20stroke-dasharray%3A%201%2C%200%3B%22%20class%3D%22arrowMarkerPath%22%20d%3D%22M%200%200%20L%2010%205%20L%200%2010%20z%22%3E%3C%2Fpath%3E%3C%2Fmarker%3E%3Cmarker%20orient%3D%22auto%22%20markerHeight%3D%2212%22%20markerWidth%3D%2212%22%20markerUnits%3D%22userSpaceOnUse%22%20refY%3D%225%22%20refX%3D%224.5%22%20viewBox%3D%220%200%2010%2010%22%20class%3D%22marker%20flowchart%22%20id%3D%22svg_flowchart-pointStart%22%3E%3Cpath%20style%3D%22stroke-width%3A%201%3B%20stroke-dasharray%3A%201%2C%200%3B%22%20class%3D%22arrowMarkerPath%22%20d%3D%22M%200%205%20L%2010%2010%20L%2010%200%20z%22%3E%3C%2Fpath%3E%3C%2Fmarker%3E%3Cmarker%20orient%3D%22auto%22%20markerHeight%3D%2211%22%20markerWidth%3D%2211%22%20markerUnits%3D%22userSpaceOnUse%22%20refY%3D%225%22%20refX%3D%2211%22%20viewBox%3D%220%200%2010%2010%22%20class%3D%22marker%20flowchart%22%20id%3D%22svg_flowchart-circleEnd%22%3E%3Ccircle%20style%3D%22stroke-width%3A%201%3B%20stroke-dasharray%3A%201%2C%200%3B%22%20class%3D%22arrowMarkerPath%22%20r%3D%225%22%20cy%3D%225%22%20cx%3D%225%22%3E%3C%2Fcircle%3E%3C%2Fmarker%3E%3Cmarker%20orient%3D%22auto%22%20markerHeight%3D%2211%22%20markerWidth%3D%2211%22%20markerUnits%3D%22userSpaceOnUse%22%20refY%3D%225%22%20refX%3D%22-1%22%20viewBox%3D%220%200%2010%2010%22%20class%3D%22marker%20flowchart%22%20id%3D%22svg_flowchart-circleStart%22%3E%3Ccircle%20style%3D%22stroke-width%3A%201%3B%20stroke-dasharray%3A%201%2C%200%3B%22%20class%3D%22arrowMarkerPath%22%20r%3D%225%22%20cy%3D%225%22%20cx%3D%225%22%3E%3C%2Fcircle%3E%3C%2Fmarker%3E%3Cmarker%20orient%3D%22auto%22%20markerHeight%3D%2211%22%20markerWidth%3D%2211%22%20markerUnits%3D%22userSpaceOnUse%22%20refY%3D%225.2%22%20refX%3D%2212%22%20viewBox%3D%220%200%2011%2011%22%20class%3D%22marker%20cross%20flowchart%22%20id%3D%22svg_flowchart-crossEnd%22%3E%3Cpath%20style%3D%22stroke-width%3A%202%3B%20stroke-dasharray%3A%201%2C%200%3B%22%20class%3D%22arrowMarkerPath%22%20d%3D%22M%201%2C1%20l%209%2C9%20M%2010%2C1%20l%20-9%2C9%22%3E%3C%2Fpath%3E%3C%2Fmarker%3E%3Cmarker%20orient%3D%22auto%22%20markerHeight%3D%2211%22%20markerWidth%3D%2211%22%20markerUnits%3D%22userSpaceOnUse%22%20refY%3D%225.2%22%20refX%3D%22-1%22%20viewBox%3D%220%200%2011%2011%22%20class%3D%22marker%20cross%20flowchart%22%20id%3D%22svg_flowchart-crossStart%22%3E%3Cpath%20style%3D%22stroke-width%3A%202%3B%20stroke-dasharray%3A%201%2C%200%3B%22%20class%3D%22arrowMarkerPath%22%20d%3D%22M%201%2C1%20l%209%2C9%20M%2010%2C1%20l%20-9%2C9%22%3E%3C%2Fpath%3E%3C%2Fmarker%3E%3Cg%20class%3D%22root%22%3E%3Cg%20class%3D%22clusters%22%3E%3C%2Fg%3E%3Cg%20class%3D%22edgePaths%22%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-A%20LE-B%22%20id%3D%22L-A-B-0%22%20d%3D%22M126.25%2C36L126.25%2C41.75C126.25%2C47.5%2C126.25%2C59%2C126.25%2C69.617C126.25%2C80.233%2C126.25%2C89.967%2C126.25%2C94.833L126.25%2C99.7%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-B%20LE-C%22%20id%3D%22L-B-C-0%22%20d%3D%22M126.25%2C141L126.25%2C145.167C126.25%2C149.333%2C126.25%2C157.667%2C126.25%2C165.117C126.25%2C172.567%2C126.25%2C179.133%2C126.25%2C182.417L126.25%2C185.7%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-C%20LE-D%22%20id%3D%22L-C-D-0%22%20d%3D%22M126.25%2C227L126.25%2C231.167C126.25%2C235.333%2C126.25%2C243.667%2C126.25%2C251.117C126.25%2C258.567%2C126.25%2C265.133%2C126.25%2C268.417L126.25%2C271.7%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-D%20LE-E%22%20id%3D%22L-D-E-0%22%20d%3D%22M126.25%2C313L126.25%2C317.167C126.25%2C321.333%2C126.25%2C329.667%2C126.316%2C337.2C126.382%2C344.734%2C126.514%2C351.467%2C126.58%2C354.834L126.646%2C358.201%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-E%20LE-F%22%20id%3D%22L-E-F-0%22%20d%3D%22M94.591%2C487.341L86.596%2C498.534C78.602%2C509.727%2C62.614%2C532.114%2C54.619%2C553.973C46.625%2C575.833%2C46.625%2C597.167%2C46.625%2C616.75C46.625%2C636.333%2C46.625%2C654.167%2C46.625%2C666.367C46.625%2C678.567%2C46.625%2C685.133%2C46.625%2C688.417L46.625%2C691.7%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-E%20LE-G%22%20id%3D%22L-E-G-0%22%20d%3D%22M158.909%2C487.341L166.737%2C498.534C174.564%2C509.727%2C190.22%2C532.114%2C198.047%2C548.34C205.875%2C564.567%2C205.875%2C574.633%2C205.875%2C579.667L205.875%2C584.7%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-F%20LE-H%22%20id%3D%22L-F-H-0%22%20d%3D%22M46.625%2C754L46.625%2C758.167C46.625%2C762.333%2C46.625%2C770.667%2C53.563%2C778.58C60.502%2C786.494%2C74.378%2C793.988%2C81.317%2C797.735L88.255%2C801.482%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-G%20LE-I%22%20id%3D%22L-G-I-0%22%20d%3D%22M205.875%2C647L205.875%2C651.167C205.875%2C655.333%2C205.875%2C663.667%2C205.875%2C671.117C205.875%2C678.567%2C205.875%2C685.133%2C205.875%2C688.417L205.875%2C691.7%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-I%20LE-H%22%20id%3D%22L-I-H-0%22%20d%3D%22M205.875%2C754L205.875%2C758.167C205.875%2C762.333%2C205.875%2C770.667%2C198.937%2C778.58C191.998%2C786.494%2C178.122%2C793.988%2C171.183%2C797.735L164.245%2C801.482%22%3E%3C%2Fpath%3E%3Cpath%20marker-end%3D%22url(%23svg_flowchart-pointEnd)%22%20style%3D%22fill%3Anone%3B%22%20class%3D%22edge-thickness-normal%20edge-pattern-solid%20flowchart-link%20LS-H%20LE-J%22%20id%3D%22L-H-J-0%22%20d%3D%22M126.25%2C840L126.25%2C844.167C126.25%2C848.333%2C126.25%2C856.667%2C126.25%2C864.117C126.25%2C871.567%2C126.25%2C878.133%2C126.25%2C881.417L126.25%2C884.7%22%3E%3C%2Fpath%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabels%22%3E%3Cg%20transform%3D%22translate(126.25%2C%2070.5)%22%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(-21%2C%20-9.5)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%2219%22%20width%3D%2242%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3Ejavac%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(0%2C%200)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%220%22%20width%3D%220%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(0%2C%200)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%220%22%20width%3D%220%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(0%2C%200)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%220%22%20width%3D%220%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(46.625%2C%20618.5)%22%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(-8%2C%20-10.5)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%2221%22%20width%3D%2216%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%E5%90%A6%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(205.875%2C%20554.5)%22%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(-8%2C%20-10.5)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%2221%22%20width%3D%2216%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%E6%98%AF%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(0%2C%200)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%220%22%20width%3D%220%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(0%2C%200)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%220%22%20width%3D%220%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(0%2C%200)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%220%22%20width%3D%220%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabel%22%3E%3Cg%20transform%3D%22translate(0%2C%200)%22%20class%3D%22label%22%3E%3CforeignObject%20height%3D%220%22%20width%3D%220%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22edgeLabel%22%3E%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22nodes%22%3E%3Cg%20transform%3D%22translate(126.25%2C%2018)%22%20data-id%3D%22A%22%20data-node%3D%22true%22%20id%3D%22flowchart-A-0%22%20class%3D%22node%20default%20sourceStyle%20flowchart-label%22%3E%3Crect%20height%3D%2236%22%20width%3D%22111%22%20y%3D%22-18%22%20x%3D%22-55.5%22%20ry%3D%2218%22%20rx%3D%2218%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-43.5%2C%20-10.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2221%22%20width%3D%2287%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3EJava%20%E6%BA%90%E4%BB%A3%E7%A0%81%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(126.25%2C%20123)%22%20data-id%3D%22B%22%20data-node%3D%22true%22%20id%3D%22flowchart-B-1%22%20class%3D%22node%20default%20sourceStyle%20flowchart-label%22%3E%3Crect%20height%3D%2236%22%20width%3D%22121%22%20y%3D%22-18%22%20x%3D%22-60.5%22%20ry%3D%2218%22%20rx%3D%2218%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-48.5%2C%20-10.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2221%22%20width%3D%2297%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3E%E5%AD%97%E8%8A%82%E7%A0%81%20.class%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(126.25%2C%20209)%22%20data-id%3D%22C%22%20data-node%3D%22true%22%20id%3D%22flowchart-C-3%22%20class%3D%22node%20default%20jvmStyle%20flowchart-label%22%3E%3Crect%20height%3D%2236%22%20width%3D%2288%22%20y%3D%22-18%22%20x%3D%22-44%22%20ry%3D%2218%22%20rx%3D%2218%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-32%2C%20-10.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2221%22%20width%3D%2264%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3E%E7%B1%BB%E5%8A%A0%E8%BD%BD%E5%99%A8%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(126.25%2C%20295)%22%20data-id%3D%22D%22%20data-node%3D%22true%22%20id%3D%22flowchart-D-5%22%20class%3D%22node%20default%20jvmStyle%20flowchart-label%22%3E%3Crect%20height%3D%2236%22%20width%3D%2291%22%20y%3D%22-18%22%20x%3D%22-45.5%22%20ry%3D%2218%22%20rx%3D%2218%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-33.5%2C%20-10.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2221%22%20width%3D%2267%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3EJVM%20%E5%86%85%E5%AD%98%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(126.25%2C%20441)%22%20data-id%3D%22E%22%20data-node%3D%22true%22%20id%3D%22flowchart-E-7%22%20class%3D%22node%20default%20default%20flowchart-label%22%3E%3Cpolygon%20style%3D%22%22%20transform%3D%22translate(-78%2C78)%22%20class%3D%22label-container%22%20points%3D%2278%2C0%20156%2C-78%2078%2C-156%200%2C-78%22%3E%3C%2Fpolygon%3E%3Cg%20transform%3D%22translate(-52.5%2C%20-10.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2221%22%20width%3D%22105%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3E%E6%98%AF%E5%90%A6%E7%83%AD%E7%82%B9%E4%BB%A3%E7%A0%81%3F%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(46.625%2C%20725.5)%22%20data-id%3D%22F%22%20data-node%3D%22true%22%20id%3D%22flowchart-F-9%22%20class%3D%22node%20default%20jvmStyle%20flowchart-label%22%3E%3Crect%20height%3D%2257%22%20width%3D%2293.25%22%20y%3D%22-28.5%22%20x%3D%22-46.625%22%20ry%3D%2228.5%22%20rx%3D%2228.5%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-32%2C%20-21)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2242%22%20width%3D%2264%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3E%E8%A7%A3%E9%87%8A%E5%99%A8%3Cbr%2F%3E%E9%80%90%E8%A1%8C%E8%A7%A3%E9%87%8A%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(205.875%2C%20618.5)%22%20data-id%3D%22G%22%20data-node%3D%22true%22%20id%3D%22flowchart-G-11%22%20class%3D%22node%20default%20jitStyle%20flowchart-label%22%3E%3Crect%20height%3D%2257%22%20width%3D%22125.25%22%20y%3D%22-28.5%22%20x%3D%22-62.625%22%20ry%3D%2228.5%22%20rx%3D%2228.5%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-48%2C%20-21)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2242%22%20width%3D%2296%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3EJIT%20%E7%BC%96%E8%AF%91%E5%99%A8%3Cbr%2F%3E%E7%BC%96%E8%AF%91%E4%B8%BA%E6%9C%BA%E5%99%A8%E7%A0%81%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(126.25%2C%20822)%22%20data-id%3D%22H%22%20data-node%3D%22true%22%20id%3D%22flowchart-H-13%22%20class%3D%22node%20default%20codeStyle%20flowchart-label%22%3E%3Crect%20height%3D%2236%22%20width%3D%2272%22%20y%3D%22-18%22%20x%3D%22-36%22%20ry%3D%2218%22%20rx%3D%2218%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-24%2C%20-10.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2221%22%20width%3D%2248%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3E%E6%9C%BA%E5%99%A8%E7%A0%81%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(205.875%2C%20725.5)%22%20data-id%3D%22I%22%20data-node%3D%22true%22%20id%3D%22flowchart-I-15%22%20class%3D%22node%20default%20cacheStyle%20flowchart-label%22%3E%3Crect%20height%3D%2257%22%20width%3D%22125.25%22%20y%3D%22-28.5%22%20x%3D%22-62.625%22%20ry%3D%2228.5%22%20rx%3D%2228.5%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-48%2C%20-21)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2242%22%20width%3D%2296%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3E%E6%9C%BA%E5%99%A8%E7%A0%81%E7%BC%93%E5%AD%98%3Cbr%2F%3E%E4%B8%8B%E6%AC%A1%E7%9B%B4%E6%8E%A5%E4%BD%BF%E7%94%A8%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(126.25%2C%20908)%22%20data-id%3D%22J%22%20data-node%3D%22true%22%20id%3D%22flowchart-J-19%22%20class%3D%22node%20default%20codeStyle%20flowchart-label%22%3E%3Crect%20height%3D%2236%22%20width%3D%2294%22%20y%3D%22-18%22%20x%3D%22-47%22%20ry%3D%2218%22%20rx%3D%2218%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-35%2C%20-10.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2221%22%20width%3D%2270%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3ECPU%20%E6%89%A7%E8%A1%8C%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E)

HotSpot VM 采用惰性评估策略,只编译热点代码(基于二八定律),执行次数越多,优化效果越好。

JDK/JRE/JVM/JIT 关系图:

![](data:image/svg+xml;utf8,%3Csvg%20aria-roledescription%3D%22flowchart-v2%22%20role%3D%22graphics-document%20document%22%20viewBox%3D%22-7.5%20-8%20724%20327%22%20style%3D%22max-width%3A%20724px%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22724%22%20id%3D%22svg%22%20height%3D%22327%22%3E%3Cstyle%3E%23svg%7Bfont-family%3A%22trebuchet%20ms%22%2Cverdana%2Carial%2Csans-serif%3Bfont-size%3A16px%3Bfill%3A%23333%3B%7D%23svg%20.error-icon%7Bfill%3A%23552222%3B%7D%23svg%20.error-text%7Bfill%3A%23552222%3Bstroke%3A%23552222%3B%7D%23svg%20.edge-thickness-normal%7Bstroke-width%3A2px%3B%7D%23svg%20.edge-thickness-thick%7Bstroke-width%3A3.5px%3B%7D%23svg%20.edge-pattern-solid%7Bstroke-dasharray%3A0%3B%7D%23svg%20.edge-pattern-dashed%7Bstroke-dasharray%3A3%3B%7D%23svg%20.edge-pattern-dotted%7Bstroke-dasharray%3A2%3B%7D%23svg%20.marker%7Bfill%3A%23333333%3Bstroke%3A%23333333%3B%7D%23svg%20.marker.cross%7Bstroke%3A%23333333%3B%7D%23svg%20svg%7Bfont-family%3A%22trebuchet%20ms%22%2Cverdana%2Carial%2Csans-serif%3Bfont-size%3A16px%3B%7D%23svg%20.label%7Bfont-family%3A%22trebuchet%20ms%22%2Cverdana%2Carial%2Csans-serif%3Bcolor%3A%23333%3B%7D%23svg%20.cluster-label%20text%7Bfill%3A%23333%3B%7D%23svg%20.cluster-label%20span%2C%23svg%20p%7Bcolor%3A%23333%3B%7D%23svg%20.label%20text%2C%23svg%20span%2C%23svg%20p%7Bfill%3A%23333%3Bcolor%3A%23333%3B%7D%23svg%20.node%20rect%2C%23svg%20.node%20circle%2C%23svg%20.node%20ellipse%2C%23svg%20.node%20polygon%2C%23svg%20.node%20path%7Bfill%3A%23ECECFF%3Bstroke%3A%239370DB%3Bstroke-width%3A1px%3B%7D%23svg%20.flowchart-label%20text%7Btext-anchor%3Amiddle%3B%7D%23svg%20.node%20.katex%20path%7Bfill%3A%23000%3Bstroke%3A%23000%3Bstroke-width%3A1px%3B%7D%23svg%20.node%20.label%7Btext-align%3Acenter%3B%7D%23svg%20.node.clickable%7Bcursor%3Apointer%3B%7D%23svg%20.arrowheadPath%7Bfill%3A%23333333%3B%7D%23svg%20.edgePath%20.path%7Bstroke%3A%23333333%3Bstroke-width%3A2.0px%3B%7D%23svg%20.flowchart-link%7Bstroke%3A%23333333%3Bfill%3Anone%3B%7D%23svg%20.edgeLabel%7Bbackground-color%3A%23e8e8e8%3Btext-align%3Acenter%3B%7D%23svg%20.edgeLabel%20rect%7Bopacity%3A0.5%3Bbackground-color%3A%23e8e8e8%3Bfill%3A%23e8e8e8%3B%7D%23svg%20.labelBkg%7Bbackground-color%3Argba(232%2C%20232%2C%20232%2C%200.5)%3B%7D%23svg%20.cluster%20rect%7Bfill%3A%23ffffde%3Bstroke%3A%23aaaa33%3Bstroke-width%3A1px%3B%7D%23svg%20.cluster%20text%7Bfill%3A%23333%3B%7D%23svg%20.cluster%20span%2C%23svg%20p%7Bcolor%3A%23333%3B%7D%23svg%20div.mermaidTooltip%7Bposition%3Aabsolute%3Btext-align%3Acenter%3Bmax-width%3A200px%3Bpadding%3A2px%3Bfont-family%3A%22trebuchet%20ms%22%2Cverdana%2Carial%2Csans-serif%3Bfont-size%3A12px%3Bbackground%3Ahsl(80%2C%20100%25%2C%2096.2745098039%25)%3Bborder%3A1px%20solid%20%23aaaa33%3Bborder-radius%3A2px%3Bpointer-events%3Anone%3Bz-index%3A100%3B%7D%23svg%20.flowchartTitleText%7Btext-anchor%3Amiddle%3Bfont-size%3A18px%3Bfill%3A%23333%3B%7D%23svg%20.today%7Bdisplay%3Anone%3B%7D%23svg%20.label%20foreignObject%7Boverflow%3Avisible%3B%7D%23svg%20%3Aroot%7B--mermaid-font-family%3A%22trebuchet%20ms%22%2Cverdana%2Carial%2Csans-serif%3B%7D%23svg%20.jdkStyle%26gt%3B*%7Bfill%3A%234A90E2!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.jdkStyle%20span%7Bfill%3A%234A90E2!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.jdkStyle%20tspan%7Bfill%3A%23fff!important%3B%7D%23svg%20.jreStyle%26gt%3B*%7Bfill%3A%23E85D75!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.jreStyle%20span%7Bfill%3A%23E85D75!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.jreStyle%20tspan%7Bfill%3A%23fff!important%3B%7D%23svg%20.jvmStyle%26gt%3B*%7Bfill%3A%239B59B6!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.jvmStyle%20span%7Bfill%3A%239B59B6!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.jvmStyle%20tspan%7Bfill%3A%23fff!important%3B%7D%23svg%20.jitStyle%26gt%3B*%7Bfill%3A%23E74C3C!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.jitStyle%20span%7Bfill%3A%23E74C3C!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.jitStyle%20tspan%7Bfill%3A%23fff!important%3B%7D%23svg%20.toolStyle%26gt%3B*%7Bfill%3A%2350C878!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.toolStyle%20span%7Bfill%3A%2350C878!important%3Bstroke%3Anone!important%3Bcolor%3A%23fff!important%3B%7D%23svg%20.toolStyle%20tspan%7Bfill%3A%23fff!important%3B%7D%3C%2Fstyle%3E%3Cg%3E%3Cmarker%20orient%3D%22auto%22%20markerHeight%3D%2212%22%20markerWidth%3D%2212%22%20markerUnits%3D%22userSpaceOnUse%22%20refY%3D%225%22%20refX%3D%226%22%20viewBox%3D%220%200%2010%2010%22%20class%3D%22marker%20flowchart%22%20id%3D%22svg_flowchart-pointEnd%22%3E%3Cpath%20style%3D%22stroke-width%3A%201%3B%20stroke-dasharray%3A%201%2C%200%3B%22%20class%3D%22arrowMarkerPath%22%20d%3D%22M%200%200%20L%2010%205%20L%200%2010%20z%22%3E%3C%2Fpath%3E%3C%2Fmarker%3E%3Cmarker%20orient%3D%22auto%22%20markerHeight%3D%2212%22%20markerWidth%3D%2212%22%20markerUnits%3D%22userSpaceOnUse%22%20refY%3D%225%22%20refX%3D%224.5%22%20viewBox%3D%220%200%2010%2010%22%20class%3D%22marker%20flowchart%22%20id%3D%22svg_flowchart-pointStart%22%3E%3Cpath%20style%3D%22stroke-width%3A%201%3B%20stroke-dasharray%3A%201%2C%200%3B%22%20class%3D%22arrowMarkerPath%22%20d%3D%22M%200%205%20L%2010%2010%20L%2010%200%20z%22%3E%3C%2Fpath%3E%3C%2Fmarker%3E%3Cmarker%20orient%3D%22auto%22%20markerHeight%3D%2211%22%20markerWidth%3D%2211%22%20markerUnits%3D%22userSpaceOnUse%22%20refY%3D%225%22%20refX%3D%2211%22%20viewBox%3D%220%200%2010%2010%22%20class%3D%22marker%20flowchart%22%20id%3D%22svg_flowchart-circleEnd%22%3E%3Ccircle%20style%3D%22stroke-width%3A%201%3B%20stroke-dasharray%3A%201%2C%200%3B%22%20class%3D%22arrowMarkerPath%22%20r%3D%225%22%20cy%3D%225%22%20cx%3D%225%22%3E%3C%2Fcircle%3E%3C%2Fmarker%3E%3Cmarker%20orient%3D%22auto%22%20markerHeight%3D%2211%22%20markerWidth%3D%2211%22%20markerUnits%3D%22userSpaceOnUse%22%20refY%3D%225%22%20refX%3D%22-1%22%20viewBox%3D%220%200%2010%2010%22%20class%3D%22marker%20flowchart%22%20id%3D%22svg_flowchart-circleStart%22%3E%3Ccircle%20style%3D%22stroke-width%3A%201%3B%20stroke-dasharray%3A%201%2C%200%3B%22%20class%3D%22arrowMarkerPath%22%20r%3D%225%22%20cy%3D%225%22%20cx%3D%225%22%3E%3C%2Fcircle%3E%3C%2Fmarker%3E%3Cmarker%20orient%3D%22auto%22%20markerHeight%3D%2211%22%20markerWidth%3D%2211%22%20markerUnits%3D%22userSpaceOnUse%22%20refY%3D%225.2%22%20refX%3D%2212%22%20viewBox%3D%220%200%2011%2011%22%20class%3D%22marker%20cross%20flowchart%22%20id%3D%22svg_flowchart-crossEnd%22%3E%3Cpath%20style%3D%22stroke-width%3A%202%3B%20stroke-dasharray%3A%201%2C%200%3B%22%20class%3D%22arrowMarkerPath%22%20d%3D%22M%201%2C1%20l%209%2C9%20M%2010%2C1%20l%20-9%2C9%22%3E%3C%2Fpath%3E%3C%2Fmarker%3E%3Cmarker%20orient%3D%22auto%22%20markerHeight%3D%2211%22%20markerWidth%3D%2211%22%20markerUnits%3D%22userSpaceOnUse%22%20refY%3D%225.2%22%20refX%3D%22-1%22%20viewBox%3D%220%200%2011%2011%22%20class%3D%22marker%20cross%20flowchart%22%20id%3D%22svg_flowchart-crossStart%22%3E%3Cpath%20style%3D%22stroke-width%3A%202%3B%20stroke-dasharray%3A%201%2C%200%3B%22%20class%3D%22arrowMarkerPath%22%20d%3D%22M%201%2C1%20l%209%2C9%20M%2010%2C1%20l%20-9%2C9%22%3E%3C%2Fpath%3E%3C%2Fmarker%3E%3Cg%20class%3D%22root%22%3E%3Cg%20class%3D%22clusters%22%3E%3C%2Fg%3E%3Cg%20class%3D%22edgePaths%22%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabels%22%3E%3C%2Fg%3E%3Cg%20class%3D%22nodes%22%3E%3Cg%20transform%3D%22translate(-7.5%2C%20-8)%22%20class%3D%22root%22%3E%3Cg%20class%3D%22clusters%22%3E%3Cg%20id%3D%22JDK%22%20class%3D%22cluster%20default%20flowchart-label%22%3E%3Crect%20height%3D%22311%22%20width%3D%22708%22%20y%3D%228%22%20x%3D%228%22%20ry%3D%220%22%20rx%3D%220%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(280.5%2C%208)%22%20class%3D%22cluster-label%22%3E%3CforeignObject%20height%3D%2221%22%20width%3D%22163%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3EJDK%20-%20Java%20%E5%BC%80%E5%8F%91%E5%B7%A5%E5%85%B7%E5%8C%85%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgePaths%22%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabels%22%3E%3C%2Fg%3E%3Cg%20class%3D%22nodes%22%3E%3Cg%20transform%3D%22translate(25.5%2C%2035)%22%20class%3D%22root%22%3E%3Cg%20class%3D%22clusters%22%3E%3Cg%20id%3D%22JRE%22%20class%3D%22cluster%20default%20flowchart-label%22%3E%3Crect%20height%3D%22136%22%20width%3D%22658%22%20y%3D%228%22%20x%3D%228%22%20ry%3D%220%22%20rx%3D%220%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(264.5%2C%208)%22%20class%3D%22cluster-label%22%3E%3CforeignObject%20height%3D%2221%22%20width%3D%22145%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3EJRE%20-%20Java%20%E8%BF%90%E8%A1%8C%E7%8E%AF%E5%A2%83%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgePaths%22%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabels%22%3E%3C%2Fg%3E%3Cg%20class%3D%22nodes%22%3E%3Cg%20transform%3D%22translate(35.5%2C%2025)%22%20class%3D%22root%22%3E%3Cg%20class%3D%22clusters%22%3E%3Cg%20id%3D%22JVM%22%20class%3D%22cluster%20default%20flowchart-label%22%3E%3Crect%20height%3D%2286%22%20width%3D%22443%22%20y%3D%228%22%20x%3D%228%22%20ry%3D%220%22%20rx%3D%220%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(163%2C%208)%22%20class%3D%22cluster-label%22%3E%3CforeignObject%20height%3D%2221%22%20width%3D%22133%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3EJVM%20-%20Java%20%E8%99%9A%E6%8B%9F%E6%9C%BA%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20class%3D%22edgePaths%22%3E%3C%2Fg%3E%3Cg%20class%3D%22edgeLabels%22%3E%3C%2Fg%3E%3Cg%20class%3D%22nodes%22%3E%3Cg%20transform%3D%22translate(79%2C%2051)%22%20data-id%3D%22Interpreter%22%20data-node%3D%22true%22%20id%3D%22flowchart-Interpreter-0%22%20class%3D%22node%20default%20jvmStyle%20flowchart-label%22%3E%3Crect%20height%3D%2236%22%20width%3D%2272%22%20y%3D%22-18%22%20x%3D%22-36%22%20ry%3D%2218%22%20rx%3D%2218%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-24%2C%20-10.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2221%22%20width%3D%2248%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3E%E8%A7%A3%E9%87%8A%E5%99%A8%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(213.5%2C%2051)%22%20data-id%3D%22JIT%22%20data-node%3D%22true%22%20id%3D%22flowchart-JIT-1%22%20class%3D%22node%20default%20jitStyle%20flowchart-label%22%3E%3Crect%20height%3D%2236%22%20width%3D%2297%22%20y%3D%22-18%22%20x%3D%22-48.5%22%20ry%3D%2218%22%20rx%3D%2218%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-36.5%2C%20-10.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2221%22%20width%3D%2273%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3EJIT%20%E7%BC%96%E8%AF%91%E5%99%A8%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(364%2C%2051)%22%20data-id%3D%22GC%22%20data-node%3D%22true%22%20id%3D%22flowchart-GC-2%22%20class%3D%22node%20default%20jvmStyle%20flowchart-label%22%3E%3Crect%20height%3D%2236%22%20width%3D%22104%22%20y%3D%22-18%22%20x%3D%22-52%22%20ry%3D%2218%22%20rx%3D%2218%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-40%2C%20-10.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2221%22%20width%3D%2280%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3E%E5%9E%83%E5%9C%BE%E5%9B%9E%E6%94%B6%E5%99%A8%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(583.5%2C%2076)%22%20data-id%3D%22JavaLib%22%20data-node%3D%22true%22%20id%3D%22flowchart-JavaLib-3%22%20class%3D%22node%20default%20toolStyle%20flowchart-label%22%3E%3Crect%20height%3D%2236%22%20width%3D%2295%22%20y%3D%22-18%22%20x%3D%22-47.5%22%20ry%3D%2218%22%20rx%3D%2218%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-35.5%2C%20-10.5)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2221%22%20width%3D%2271%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3EJava%20%E7%B1%BB%E5%BA%93%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(362%2C%20256.5)%22%20data-id%3D%22DevTools%22%20data-node%3D%22true%22%20id%3D%22flowchart-DevTools-4%22%20class%3D%22node%20default%20toolStyle%20flowchart-label%22%3E%3Crect%20height%3D%2255%22%20width%3D%22166.75%22%20y%3D%22-27.5%22%20x%3D%22-83.375%22%20ry%3D%2227.5%22%20rx%3D%2227.5%22%20style%3D%22%22%3E%3C%2Frect%3E%3Cg%20transform%3D%22translate(-69%2C%20-20)%22%20style%3D%22%22%20class%3D%22label%22%3E%3Crect%3E%3C%2Frect%3E%3CforeignObject%20height%3D%2240%22%20width%3D%22138%22%3E%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20white-space%3A%20nowrap%3B%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cspan%20class%3D%22nodeLabel%22%3E%E5%BC%80%E5%8F%91%E5%B7%A5%E5%85%B7%3Cbr%2F%3Ejavac%2Fjavadoc%2Fjdb%3C%2Fspan%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E)

为什么说 Java 是"编译与解释并存"?

高级语言的执行方式通常分为两类:

  • 编译型(如 C++/Go/Rust):通过编译器一次性将源码翻译成机器码。优点是执行速度快,缺点是开发效率低。
  • 解释型(如 Python/JavaScript):通过解释器逐行翻译执行。优点是开发效率高,缺点是执行速度慢。

Java 结合了两者优势:

  1. 编译阶段:javac 将 .java 编译成 .class 字节码
  2. 运行阶段:解释器执行字节码 + JIT 编译器优化热点代码

这种混合模式让 Java 既保持了可移植性,又获得了不错的性能。

AOT 编译有什么优势?为何不全面采用?

JDK 9 引入了 AOT(Ahead of Time Compilation) 提前编译模式。它在程序运行前就将代码编译成机器码,属于静态编译。

JIT vs AOT 对比:

指标 JIT(即时编译) AOT(提前编译)
启动速度 慢(需预热)
内存占用 较大 较小
峰值性能 高(优化充分) 一般
打包体积 较大 较小
适用场景 长时间运行的应用 云原生/微服务

为什么不全用 AOT?

虽然 AOT 在启动速度和内存占用上有优势,但存在局限:

  1. 不支持 Java 动态特性:反射、动态代理、JNI、动态加载等特性无法使用
  2. 影响框架使用:Spring、Hibernate 等依赖动态特性的框架需要特殊适配
  3. 性能上限较低:缺少运行时优化,极限性能不如 JIT

因此,AOT 更适合云原生、Serverless 等对启动速度敏感的场景,而传统应用仍以 JIT 为主。

GraalVM:一个支持 AOT 和 JIT 的高性能 JDK,既能提前编译,也能即时编译,是当前 AOT 技术的代表。

Oracle JDK 与 OpenJDK 的差异

发展历史:

  • 2006 年:Sun 公司开源 Java,诞生 OpenJDK
  • 2009 年:Oracle 收购 Sun,基于 OpenJDK 推出 Oracle JDK

主要区别:

  1. 开源性
    • OpenJDK:完全开源,遵循 GPL v2 协议
    • Oracle JDK:部分闭源,使用 BCL/OTN 协议
  2. 费用
    • OpenJDK:完全免费
    • Oracle JDK:商业使用收费(JDK 8u221 之前的版本可免费,JDK 17+ 仅 3 年免费期)
  3. 功能特性
    • JDK 11 之前:Oracle JDK 有独占功能(如 JFR、JMC)
    • JDK 11 之后:功能基本一致,Oracle 将私有组件捐赠给开源社区
  4. 支持周期
    • OpenJDK:不提供 LTS 长期支持
    • Oracle JDK:每三年发布一个 LTS 版本

虽然 OpenJDK 官方不提供 LTS,但 Alibaba Dragonwell、Amazon Corretto、Azul Zulu 等基于 OpenJDK 的发行版提供了长期支持。

如何选择?

建议使用 OpenJDK 或其商业发行版(如 Alibaba Dragonwell、Amazon Corretto),原因:

  • 完全免费
  • 可自由修改定制
  • 更新更频繁
  • 商业发行版提供专业支持

Java 与 C++ 的主要区别

Java 和 C++ 都是面向对象语言,但差异明显:

特性 Java C++
指针 不支持,更安全 支持,灵活但易出错
继承 单继承,接口多实现 支持多重继承
内存管理 自动 GC 手动管理
运算符重载 不支持 支持
跨平台 JVM 保证跨平台 需重新编译
性能 略慢于 C++ 更接近硬件,性能更高

基本语法要点

Java 的注释形式

Java 支持三种注释:

// 1. 单行注释:用于解释单行代码逻辑

/*
 * 2. 多行注释:用于解释代码块
 * 实际开发中较少使用
 */

/**
 * 3. 文档注释:用于生成 JavaDoc 文档
 * @author 作者名
 * @param 参数说明
 * @return 返回值说明
 */

注意事项:

  • 编译器会在编译前移除所有注释,字节码中不包含注释
  • 好的代码应该自解释,减少不必要的注释
  • 《Clean Code》建议:用清晰的命名和代码结构代替复杂注释

示例:

// 不好的写法
// 检查员工是否有资格获得全部福利
if ((employee.flags & HOURLY_FLAG) && (employee.age > 65))

// 好的写法
if (employee.isEligibleForFullBenefits())

标识符与关键字的区别

  • 标识符:程序中用于命名类、变量、方法等的名称
  • 关键字:被 Java 赋予特殊含义的保留标识符,不能用作普通标识符

类比:开店要起名字(标识符),但不能叫"警察局"(关键字)。

Java 关键字一览

分类 关键字
访问控制 private、protected、public
类与方法修饰 abstract、class、extends、final、implements、interface、native、new、static、strictfp、synchronized、transient、volatile、enum
流程控制 if、else、switch、case、default、for、while、do、break、continue、return、instanceof、assert
异常处理 try、catch、throw、throws、finally
包管理 package、import
基本类型 byte、short、int、long、float、double、char、boolean
变量引用 super、this、void
保留字 goto、const

注意:truefalsenull 看起来像关键字,但实际上是字面值。

自增自减运算符详解

Java 提供 ++-- 运算符简化自增自减操作:

int x = 5;
int a = x++;  // a=5, x=6 (先赋值后自增)
int b = ++x;  // b=7, x=7 (先自增后赋值)

记忆口诀:符号在前先运算,符号在后后运算。

经典面试题:

int x = 5;
int y = x++ + ++x + x--;
// 执行过程:
// x++ -> 使用5,x变成6
// ++x -> x变成7,使用7
// x-- -> 使用7,x变成6
// y = 5 + 7 + 7 = 19
// 最终: y=19, x=6

移位运算符的应用

移位运算符在源码中广泛使用,如 HashMap 的 hash 方法:

static final int hash(Object key) {
    int h;
    return (key == null) ? 0 : (h = key.hashCode()) ^ (h >>> 16);
}

Java 提供三种移位运算符:

运算符 说明 示例
<< 左移,低位补0 5 << 2 等价于 5×2² = 20
>> 带符号右移,高位补符号位 -8 >> 2 等价于 -8÷2² = -2
>>> 无符号右移,高位补0 -8 >>> 2 结果为大正数

使用场景:

  1. 快速乘除:x << 3x * 8 更快
  2. 位标志操作:用一个 int 存储 32 个布尔值
  3. 哈希计算:混淆数据提高分布均匀性
  4. 权限控制:用位运算表示多种权限组合
// 权限位运算示例
final int READ = 1 << 0;    // 0001
final int WRITE = 1 << 1;   // 0010
final int EXECUTE = 1 << 2; // 0100

int permission = READ | WRITE;  // 授予读写权限
boolean canRead = (permission & READ) != 0;  // 检查是否有读权限

注意:

  • 移位位数超过类型位数会先取模:int 类型移位 33 位等于移位 1 位(33%32=1)
  • 不能对 float、double 使用移位运算
  • short、byte、char 移位前会先转换为 int

continue、break 和 return 的区别

在循环控制中:

  • continue:跳过本次循环,继续下一次循环
  • break:跳出整个循环体
  • return:结束整个方法的执行
for (int i = 0; i < 5; i++) {
    if (i == 2) continue;  // 跳过 i=2
    if (i == 4) break;     // i=4 时退出循环
    System.out.println(i); // 输出: 0 1 3
}
System.out.println("循环结束");

数据类型详解

Java 的基本数据类型

Java 有 8 种基本类型:

类型 字节 位数 默认值 取值范围
byte 1 8 0 -128 ~ 127
short 2 16 0 -32768 ~ 32767
int 4 32 0 -231 ~ 231-1
long 8 64 0L -263 ~ 263-1
float 4 32 0.0f 1.4E-45 ~ 3.4E38
double 8 64 0.0d 4.9E-324 ~ 1.8E308
char 2 16 '\u0000' 0 ~ 65535
boolean 1 - false true/false

为什么最大值要减1?

因为在补码表示法中,最高位是符号位(0 正 1 负),剩余位表示数值。比如 byte:

  • 最小值:10000000 = -128
  • 最大值:01111111 = 127

如果再加 1 就会溢出变成负数。

注意事项:

long num = 10000000000L;  // 长整型必须加 L
float pi = 3.14f;          // 浮点型必须加 f
char letter = 'A';         // 字符用单引号
String text = "Hello";     // 字符串用双引号

基本类型与包装类的区别

对比项 基本类型 包装类型
使用场景 局部变量、常量 集合、泛型、对象属性
存储位置 栈(局部变量)或堆(成员变量)
默认值 有默认值(0/false/null) null
比较方式 <mark> 比较值 </mark> 比较地址,equals() 比较值
空间占用 大(对象头+字段)
是否可用于泛型
// 基本类型
int age = 25;              // 存储在栈上
System.out.println(age);   // 25

// 包装类型
Integer score = 90;        // 自动装箱
Integer score2 = 90;
System.out.println(score == score2);      // true (缓存)
System.out.println(score.equals(score2)); // true

Integer num1 = 200;
Integer num2 = 200;
System.out.println(num1 == num2);         // false (超出缓存)

包装类的缓存机制

为了优化性能,部分包装类实现了缓存:

包装类 缓存范围 是否可配置
Byte -128~127
Short -128~127
Integer -128~127 是(-XX:AutoBoxCacheMax)
Long -128~127
Character 0~127
Boolean true/false
Float -
Double -

Integer 缓存源码:

public static Integer valueOf(int i) {
    if (i >= IntegerCache.low && i <= IntegerCache.high)
        return IntegerCache.cache[i + (-IntegerCache.low)];
    return new Integer(i);
}

面试陷阱:

Integer a = 100;
Integer b = 100;
System.out.println(a == b);  // true (缓存)

Integer c = 200;
Integer d = 200;
System.out.println(c == d);  // false (超出缓存)

Integer e = 100;
Integer f = new Integer(100);
System.out.println(e == f);  // false (new 强制创建新对象)

最佳实践:包装类型比较永远用 equals()

自动装箱与拆箱

  • 装箱:基本类型 → 包装类型,调用 valueOf()
  • 拆箱:包装类型 → 基本类型,调用 xxxValue()
Integer num = 100;    // 自动装箱,等价于 Integer.valueOf(100)
int value = num;      // 自动拆箱,等价于 num.intValue()

性能陷阱:

// 错误写法:频繁拆装箱影响性能
private static long sum() {
    Long sum = 0L;  // 应该用 long 而非 Long
    for (long i = 0; i <= Integer.MAX_VALUE; i++)
        sum += i;   // 每次循环都会拆箱、计算、装箱
    return sum;
}

// 正确写法
private static long sum() {
    long sum = 0L;  // 使用基本类型
    for (long i = 0; i <= Integer.MAX_VALUE; i++)
        sum += i;
    return sum;
}

浮点数精度丢失问题

浮点数在计算机中用二进制表示,很多十进制小数无法精确表示:

float a = 0.3f - 0.2f;  // 0.100000024
float b = 0.2f - 0.1f;  // 0.099999905
System.out.println(a == b);  // false

原因:0.2 转二进制是无限循环小数:

0.2 × 2 = 0.40
0.4 × 2 = 0.80
0.8 × 2 = 1.61
0.6 × 2 = 1.21
0.2 × 2 = 0.40  (循环)

解决方案:使用 BigDecimal

BigDecimal a = new BigDecimal("0.3");
BigDecimal b = new BigDecimal("0.2");
BigDecimal result = a.subtract(b);
System.out.println(result);  // 0.1

// 比较值用 compareTo,返回 0 表示相等
BigDecimal x = new BigDecimal("1.0");
BigDecimal y = new BigDecimal("1.00");
System.out.println(x.equals(y));      // false (精度不同)
System.out.println(x.compareTo(y) == 0);  // true (值相等)

超大整数如何表示?

long 的最大值是 \(2^{63}-1\),超过后会溢出:

long max = Long.MAX_VALUE;
System.out.println(max + 1);  // -9223372036854775808 (溢出变最小值)

解决方案:使用 BigInteger

BigInteger big = new BigInteger("9223372036854775808");
BigInteger result = big.add(BigInteger.ONE);
System.out.println(result);  // 9223372036854775809

BigInteger 内部用 int[] 数组存储,理论上可以表示任意大小的整数,但性能比基本类型差。

变量详解

成员变量与局部变量的区别

对比项 成员变量 局部变量
定义位置 类内,方法外 方法内或方法参数
修饰符 可用 public/private/static 等 不能用访问修饰符
存储位置 堆(对象属性)或方法区(static)
生命周期 与对象或类同生死 方法调用时创建,结束时销毁
默认值 有默认值 无默认值,必须初始化
public class Demo {
    private int age;        // 成员变量,默认值 0
    private static String name;  // 静态成员变量,默认值 null

    public void test() {
        int count;          // 局部变量,无默认值
        // System.out.println(count);  // 编译错误:未初始化
        count = 0;
        System.out.println(count);  // 0
    }
}

为什么成员变量有默认值?

  1. 安全性:避免读取到垃圾值导致程序异常
  2. 编译器控制力:局部变量生命周期短,编译器能检查是否初始化;成员变量生命周期长,可能在多处赋值,编译器无法预测,因此提供默认值作为兜底

静态变量的作用

静态变量被 static 修饰,特点:

  • 属于类,不属于对象
  • 所有实例共享同一份数据
  • 可通过类名直接访问
  • 存储在方法区/元空间
public class Counter {
    private static int count = 0;  // 静态变量
    private int id;                // 实例变量
    
    public Counter() {
        count++;  // 每创建一个对象,count 加 1
        id = count;
    }
    
    public static void main(String[] args) {
        Counter c1 = new Counter();
        Counter c2 = new Counter();
        Counter c3 = new Counter();
        System.out.println(Counter.count);  // 3
    }
}

常见用法:定义常量


public class Constants {
    public static final String APP_NAME = "MyApp";
    public static final int MAX_SIZE = 1000;
}

字符常量与字符串常量的区别

char letter = 'A';          // 字符常量:单引号,占 2 字节
String text = "Hello";      // 字符串常量:双引号,占多字节

System.out.println('A' + 1);      // 66 (字符可参与运算)
System.out.println("A" + 1);      // "A1" (字符串拼接)

// 内存占用
System.out.println(Character.BYTES);  // 2
System.out.println("Hello".getBytes().length);  // 5

方法详解

方法的分类

按参数和返回值可分为四类:

// 1. 无参无返回值
public void printHello() {
    System.out.println("Hello");
}

// 2. 有参无返回值  
public void printMessage(String msg) {
    System.out.println(msg);
}

// 3. 无参有返回值
public int getRandomNumber() {
    return (int)(Math.random() * 100);
}

// 4. 有参有返回值
public int add(int a, int b) {
    return a + b;
}

静态方法与实例方法

调用方式差异:

public class MathUtil {
    // 静态方法
    public static int add(int a, int b) {
        return a + b;
    }
    
    // 实例方法
    public int multiply(int a, int b) {
        return a * b;
    }
}

// 使用
int sum = MathUtil.add(3, 5);        // 静态方法:类名调用

MathUtil util = new MathUtil();
int product = util.multiply(3, 5);   // 实例方法:对象调用

访问限制:

public class Demo {
    private int instanceVar = 1;       // 实例变量
    private static int staticVar = 2;  // 静态变量
    
    // 静态方法
    public static void staticMethod() {
        System.out.println(staticVar);      // OK:访问静态变量
        // System.out.println(instanceVar);  // Error:不能访问实例变量
        // instanceMethod();                 // Error:不能调用实例方法
    }
    
    // 实例方法  
    public void instanceMethod() {
        System.out.println(instanceVar);  // OK:可以访问实例变量
        System.out.println(staticVar);    // OK:可以访问静态变量
        staticMethod();                   // OK:可以调用静态方法
    }
}

为什么静态方法不能访问非静态成员?

因为静态方法属于类,类加载时就存在,而实例成员属于对象,对象创建后才存在。在静态方法执行时,可能还没有对象实例,自然无法访问实例成员。

方法重载(Overload)

在同一个类中,方法名相同但参数不同(类型、个数、顺序),称为重载。

public class Calculator {
    // 重载方法
    public int add(int a, int b) {
        return a + b;
    }
    
    public double add(double a, double b) {
        return a + b;
    }
    
    public int add(int a, int b, int c) {
        return a + b + c;
    }
}

注意:

  • 重载与返回值类型无关
  • 编译器根据参数列表选择最匹配的方法

方法重写(Override)

子类重新实现父类的方法,要求:

  1. 方法名、参数列表必须相同
  2. 返回值类型:相同或子类
  3. 访问权限:不能更严格
  4. 抛出异常:不能更多更宽泛

class Animal {
    public Animal eat() {
        System.out.println("动物吃东西");
        return this;
    }
}

class Dog extends Animal {
    @Override
    public Dog eat() {  // 返回值改为子类 Dog
        System.out.println("狗吃骨头");
        return this;
    }
}

重载 vs 重写:

对比项 重载(Overload) 重写(Override)
发生范围 同一个类 父子类
方法名 相同 相同
参数列表 不同 相同
返回值 无关 相同或子类
访问修饰符 无关 不能更严格
绑定时期 编译期(静态绑定) 运行期(动态绑定)

可变长参数

Java 5 引入可变参数,语法为 类型...:

public void printNumbers(int... numbers) {
    for (int num : numbers) {
        System.out.println(num);
    }
}

// 调用
printNumbers(1, 2, 3, 4, 5);  // 传入多个参数
printNumbers(1);              // 传入一个参数
printNumbers();               // 不传参数也行

限制:

  • 可变参数必须是最后一个参数
  • 一个方法最多一个可变参数
// 错误写法
public void method(int... a, String... b) { }  // Error

// 正确写法
public void method(String name, int... scores) { }  // OK

重载优先级:

可变参数方法的优先级最低,编译器会优先匹配固定参数的方法:

public class Test {
    public static void print(String a, String b) {
        System.out.println("固定参数");
    }

    public static void print(String... args) {
        System.out.println("可变参数");
    }

    public static void main(String[] args) {
        print("A", "B");        // 输出:固定参数
        print("A", "B", "C");  // 输出:可变参数
    }
}