java Javah 未找到错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15507269/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-31 19:50:33  来源:igfitidea点击:

Javah not found error

javafedorajava-7

提问by Rohit

I had installed Java 7 in fedora but when i tried javahfrom command prompt it is showing as javah:command not foundwhere as javac,java else are working. When i searched in /usr/bin, executables are there for javac,java,javaws but not for javah. Javah is visible in Java/JDK/bin folder. How can i run javah command.

我已经在 Fedora 中安装了 Java 7,但是当我从命令提示符尝试javah 时,它显示为javah:command not foundwhere javac,java else 正在工作。当我在 /usr/bin 中搜索时,javac、java、javaws 中有可执行文件,但 javah 没有。Javah 在 Java/JDK/bin 文件夹中可见。我如何运行 javah 命令。

Thanx in advance.

提前谢谢。

回答by w4etwetewtwet

Either type the full path of the file (or add that folder where it's in) to your path environment variable using export PATH=$PATH:/path/to/java/JDK/bin/folder. To have that permanently in your path you could add that line to your .bashrc.

使用export PATH=$PATH:/path/to/java/JDK/bin/folder. 要将其永久存在于您的路径中,您可以将该行添加到您的 .bashrc 中。

回答by David

For anyone using more recent versions of java (this post is 6 years old as of my writing this) javahno longer exists in the your Java/JDK/bin folder. Instead, use the command javac -h

对于使用更新版本 java 的任何人(这篇文章在我撰写本文时已有 6 年历史)javah不再存在于您的 Java/JDK/bin 文件夹中。相反,使用命令javac -h