简体   繁体   中英

javah is not a recognized as an internal or external command

I tried to fix this by executing in my cmd: "path=C:\\Program Files\\Java\\jdk1.8.0_65\\bin"

I'm working on windows. Is this wrong? I've been stuck for awhile so any help would much appreciated.

javah is removed in the latest JDK.

Before JDK 8, you need to compile the Java program using javac and generate C/C++ header using a dedicated javah utility. The javah utility is no longer available in JDK 10.

For those who are using the latest JDK, the javac -h command will compile and create a header file.

javah is under <JAVA_HOME>/bin folder, you have to ensure that you have that folder on your path

you can do something like (on unix system)

export PATH=<JAVA_HOME>/bin:$PATH

or follow this for windows

http://www.computerhope.com/issues/ch000549.htm

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM