惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Blog — PlanetScale
Blog — PlanetScale
B
Blog
A
About on SuperTechFans
大猫的无限游戏
大猫的无限游戏
爱范儿
爱范儿
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
H
Help Net Security
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - 三生石上(FineUI控件)
有赞技术团队
有赞技术团队
酷 壳 – CoolShell
酷 壳 – CoolShell
WordPress大学
WordPress大学
IT之家
IT之家
D
Docker
Google DeepMind News
Google DeepMind News
罗磊的独立博客
T
The Blog of Author Tim Ferriss
aimingoo的专栏
aimingoo的专栏
博客园 - 叶小钗
Recent Announcements
Recent Announcements
阮一峰的网络日志
阮一峰的网络日志
D
DataBreaches.Net
博客园 - 司徒正美
Engineering at Meta
Engineering at Meta

博客园 - JackYang

I walk alone句子结构中 alone 后置的原因及同类用法解析 《用了3个月Cursor后,我删掉了自己写了10年的工具库》:从“造轮子自豪”到“承认AI写得更好”的心理崩塌与重建 2026年AI Agent时代下如何打造新一代研发体系:从熵增困境到智能工厂的范式重构(基于2025年底文章重写) AgentScope-Java 深度实践:构建企业级生产就绪的智能体应用 传统软件的AI重生:大模型时代下的系统重构与智能升级(2026实践指南)——从代码理解到数据交互,构建安全、高效、可落地的企业级AI集成架构 浅析英文复合名词“X Recording / X Logging”的翻译逻辑与本地化策略——兼论“How + 复合名词 + Works”句式的处理 浅析英文句式“How + 名词 + Works”的翻译逻辑与应用场景 会员契约论新观察:从身份标签到价值博弈——解构与评估现代会员体系 深度剖析akshare-data:OpenClaw生态中的金融数据Skill构建之道——手把手教你用akshare-data搭建个人AI量化系统 DeepSeek-V4:中国大模型的新范式革命—— 万字深度技术全景解析 深入 Java I/O 核心:BufferedInputStream 全景式源码解析与工程实践——2026 高并发时代下的性能基石,从 JDK 源码到虚拟线程(Project Loom)的协同优化 2026年前端工程化的新纪元:从Rust工具链革命到AI Agent原生架构演进 万字详文:解构 SessionBindingService —— AI智能体的“会话粘合剂” Windows 本地部署 Hermes Agent 安装教程 + 飞书接入,会自我进化AI Agent 智能体(全程避坑,亲测有效) 2026年最新、最全、可用的Docker 国内镜像源加速(截至 2026 年 4月14日 亲测可用) Java 中Jar包冲突问题及解决方案 如何自定义Spring Boot的错误页面显示? Spring Boot的全局异常处理器如何配置? This application has no explicit mapping for /error “no main manifest attribute, in app.jar” 错误详解与解决方案 深度拆解三大 AI 核心协议:MCP、ACP、A2A,读懂智能代理全域通信底层逻辑—— 从技术原理、架构设计、落地场景到生态未来,全面揭秘 AI 智能体协作的底层标准 The Java® Virtual Machine Specification Java SE 26 Edition 中文版简介第一小节:A Bit of History Java 中 “Error: Could not find or load main class” 错误详解与全面解决方案 云原生时代,Docker和虚拟机谁才是王者?K8s架构下的终极选型指南 2026年全网最新、最全、最好用的Excel快捷键大全:提升工作效率的必备技巧 2026年全网最新、最全的Word快捷键大全:从入门到精通 WPS快捷键大全及使用技巧 2026年最新版IntelliJ IDEA 2026.1下载、安装与配置教程: IDEA 2026.1新手使用教程(万字详解) OpenClaw源码大揭秘:WhatsApp登录工具如何用50行代码破解AI智能体的移动端困局? 2026AI Agent:AI Agent从“工具箱”到“操作系统”——深度解构AI聚合化(Aggregation)、自动化(Automation)与普惠化(Democratization
The Java® Virtual Machine Specification Java SE 26 E...
JackYang · 2026-04-12 · via 博客园 - JackYang

原文:

1.2 The Java Virtual Machine

The Java Virtual Machine is the cornerstone of the Java platform. It is the component of the technology responsible for its hardware- and operating systemindependence, the small size of its compiled code, and its ability to protect users from malicious programs.

The Java Virtual Machine is an abstract computing machine. Like a real computingmachine, it has an instruction set and manipulates various memory areas at run time.It is reasonably common to implement a programming language using a virtualmachine; the best-known virtual machine may be the P-Code machine of UCSDPascal.

The first prototype implementation of the Java Virtual Machine, done at Sun Microsystems, Inc., emulated the Java Virtual Machine instruction set in software hosted by a handheld device that resembled a contemporary Personal Digital Assistant (PDA). Oracle's current implementations emulate the Java Virtual Machine on mobile, desktop and server devices, but the Java Virtual Machine does not assume any particular implementation technology, host hardware, or host operating system. It is not inherently interpreted, but can just as well be implemented by compiling its instruction set to that of a silicon CPU. It may also be implemented in microcode or directly in silicon.

The Java Virtual Machine knows nothing of the Java programming language, only of a particular binary format, the class file format. A class file contains Java Virtual Machine instructions (or bytecodes) and a symbol table, as well as other ancillary information.

For the sake of security, the Java Virtual Machine imposes strong syntactic and structural constraints on the code in a class file. However, any language with functionality that can be expressed in terms of a valid class file can be hosted by the Java Virtual Machine. Attracted by a generally available, machine-independent platform, implementors of other languages can turn to the Java Virtual Machine as a delivery vehicle for their languages.

The class file format is versioned: every class file declares a version number, of the form major.minor, which indicates the file's dependency on a particular release of Java SE, and influences the interpretation of the file by the Java Virtual Machine. The Java Virtual Machine specified here is compatible with Java SE 26, and supports the Java programming language specified in The Java Language Specification, Java SE 26 Edition. It supports class files with major version numbers 45 through 70, inclusive. Tools that generate class files will typically adopt the latest major version number in order to take advantage of the latest features; but a class file with an older major version number can generally expect to be supported in future Java Virtual Machine releases.

For reference, the following table shows the class file major version numbers supported by each release of Java SE, up to Java SE 26. The third column, "Earliest", shows the earliest class file major version number supported by the Java Virtual Machine in that release. The fourth column, "Latest", shows the latest class file major version number supported by the Java Virtual Machine in that release. (For very early releases, the JDK version is shown instead of the Java SE release.)


大意:

1.2 Java 虚拟机

Java 虚拟机(Java Virtual Machine,JVM)是 Java 平台的基石。它是该技术中负责实现硬件与操作系统无关性、编译后代码体积小巧,以及保护用户免受恶意程序侵害的核心组件。

Java 虚拟机是一种抽象的计算机器。与真实的计算机器类似,它拥有自己的指令集,并在运行时操作多种内存区域。使用虚拟机来实现编程语言的做法相当普遍;其中最著名的虚拟机或许是 UCSD Pascal 的 P-Code 机。

Java 虚拟机的第一个原型实现由 Sun Microsystems 公司完成,它通过软件模拟 Java 虚拟机指令集,运行在一款类似于当时个人数字助理(PDA)的手持设备上。如今,Oracle 的实现可在移动设备、桌面计算机和服务器上模拟 Java 虚拟机。但 Java 虚拟机本身并不依赖于任何特定的实现技术、宿主硬件或宿主操作系统。它并非天生就是解释执行的,同样也可以通过将它的指令集编译为硅基 CPU 的本地指令来实现。此外,它还可以用微码实现,甚至直接以硬件(硅片)形式实现。

Java 虚拟机对 Java 编程语言本身一无所知,它只认识一种特定的二进制格式——类文件格式(class file format)。类文件包含 Java 虚拟机指令(即字节码)、符号表以及其他辅助信息。

出于安全考虑,Java 虚拟机对类文件中的代码施加了严格的语法和结构约束。然而,任何语言只要其功能可以表达为合法的类文件格式,就可以运行在 Java 虚拟机之上。由于 Java 虚拟机提供了一个广泛可用且与机器无关的平台,其他语言的实现者纷纷将其作为自己语言的交付载体。

类文件格式是有版本号的:每个类文件都声明一个形如 major.minor 的版本号,用于表明该文件对特定 Java SE 发布版本的依赖关系,并影响 Java 虚拟机对该文件的解析方式。本文所规范的 Java 虚拟机兼容 Java SE 26,支持《The Java Language Specification, Java SE 26 Edition》中所规定的 Java 编程语言。它支持主版本号(major version number)从 45 到 70(含)的类文件。

通常,生成类文件的工具会采用最新的主版本号,以便利用最新的语言或虚拟机特性;而使用较早主版本号的类文件,一般也能在未来的 Java 虚拟机版本中继续得到支持。

为便于参考,下表列出了截至 Java SE 26 为止,各 Java SE 版本所支持的类文件主版本号范围。第三列“最早”(Earliest)表示该版本 Java 虚拟机所支持的最小类文件主版本号,第四列“最新”(Latest)表示其所支持的最大类文件主版本号。(对于非常早期的版本,表中列出的是 JDK 版本号而非 Java SE 版本号。)