“Can't load javah” error in Eclipse

落花浮王杯 提交于 2019-12-22 10:33:08

问题


I am trying to use the javah task in an ant build file in Eclipse and I keep getting the following error:

BUILD FAILED

C:\sandbox\build-jni.xml:7: Can't load javah

Here is my build-jni.xml file:

<project>
<property name="bin" location="bin" />


<target name="generate-jni">
    <javah destdir="${bin}" classpath="${bin}">

        <class name="org.example.ExecJNI" />
    </javah>
</target>

Any thoughts as to why I'm getting that error? My project is pointing to the JDK and not the JRE


回答1:


Turned out I didn't have C:\Program Files\Java\jdk1.7.0_15\tools.jar in my Ant Home Entries in Window --> Preferences. That seemed to fix the problem.



来源:https://stackoverflow.com/questions/15032230/cant-load-javah-error-in-eclipse

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