JDK中javah已废弃,用javac -h替代时如何处理.class文件问题?
Hey folks, let's break down the status of the javah tool first: it's been deprecated since JDK 8 and was fully removed in JDK 10.
Per JEP 313 and official deprecation guidelines, the official recommended replacement is the javac tool paired with the -h parameter. Here's the official warning for reference:
【警告】javah工具计划在下一个主要JDK版本中移除,该工具已被JDK 8中新增的javac '-h'选项取代,建议用户迁移至使用javac '-h'选项,更多信息可查看javac手册页。
One critical difference to keep in mind between the two tools: javah operates on compiled .class files, while javac -h directly processes .java source files and generates the necessary header files in a single step. That's a core workflow distinction you'll want to account for when making the switch.
内容的提问来源于stack exchange,提问作者Salem

