Skip to content

JEP 313: Remove the Native-Header Generation Tool (javah) | 删除本机标头生成工具(javah)

摘要

从 JDK 中移除 javah 工具。

动机

该工具已经被 JDK 8 中添加的 javac 的更高级功能所取代(JDK-7150368)。此功能提供了在编译 Java 源代码时编写原生头文件的能力,从而消除了对单独工具的需求。

专注于 javac 提供的支持,就无需升级 javah 以支持最近的新范式,如通过 javax.tools.* 中的 Compiler API 访问 API,或在 JDK 9 中添加的新 java.util.spi.ToolProvider SPI。

描述

实施移除将包括从 Mercurial 仓库中删除受影响的文件,包括文档文件,以及支持 Makefile 的变更。

测试

测试将仅限于验证 javah 命令不存在。

风险和假设

从 JDK 中移除 javah 并无工程问题,因为该工具在 JDK 或构建 JDK 时已不再使用。

自 JDK 9 起,每次调用 javah 工具时都会生成警告,用户已被告知即将删除。

依赖关系

javah 工具在 JDK 内部没有直接的依赖关系。在外部,有一些 javah 的衍生工具,如 Ant 的 javah 任务,但正如推荐使用 javac -h 替代 javah 命令的用户一样,这些依赖项的用户也建议使用为 javac 提供的相应支持。

Page Layout Max Width

Adjust the exact value of the page width of VitePress layout to adapt to different reading needs and screens.

Adjust the maximum width of the page layout
A ranged slider for user to choose and customize their desired width of the maximum width of the page layout can go.

Content Layout Max Width

Adjust the exact value of the document content width of VitePress layout to adapt to different reading needs and screens.

Adjust the maximum width of the content layout
A ranged slider for user to choose and customize their desired width of the maximum width of the content layout can go.