Javah missing after JDK install (Linux)

▼魔方 西西 提交于 2019-12-11 02:19:07

问题


I'm trying to setup Android development with Eclipse (Indigo), on Fedora17. Almost everything seems to work, just the javah is missing, to build the C headers with, for native (NDK / JNI) modules.

On my windows install of the tool chain it was in the same folder javac was in, but this is not the case on the Linux machine.

I previously installed Oracle's JDK1.7, found out that it's to new for something else I wanted to do (but also there, no javah), uninstalled it, now JDK1.6 is installed.

What might be wrong?


回答1:


In linux machines, JavaH is normally located in /usr/bin/javah.

If you try to find this file with locate, it is normally a good idea to run before updatedb, since the database is not updated unless this command is run either by the user or a cron job. You could try finding the file with find / |grep javah

P.S. Sorry to post this as an asnwer. I suppose the corret way to go would have been a comment, but still don't have enough reputation to post a comment




回答2:


Try gjavah rather than javah?




回答3:


It turns out that javah link is not created during JDK install. You have to create it manually:

Check where is installed java:

$ ls -l `which java`
lrwxrwxrwx root root 26 15 juil. 02:05 /usr/bin/java -> /usr/java/default/bin/java

Create the symlink in the same directory:

$ su
# cd /usr/bin
# ln -s /usr/java/default/bin/javah


来源:https://stackoverflow.com/questions/13526701/javah-missing-after-jdk-install-linux

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!