'javah' is not recognized as an internal or external command, operable program or batch file

'javah' is not recognized as an internal or external command, operable program or batch file.

An error occurred when generating the Java header file. After querying, it was found that the new version of Java does not use the javah command, but uses javac -h
usage:

javac  –h  <directory>  <source files>

After cding the path to the folder where the header file needs to be generated, enter the command:

javac -h ./ Java2cpp.java

The header file can be generated. Among them, "-h ./" means that the header file is generated to the current directory.

Guess you like

Origin blog.csdn.net/Stars_in_rain/article/details/122662153