how to make jni.h be found?

后端 未结 11 1308
轻奢々
轻奢々 2020-11-30 03:10

In Ubuntu 12.04, I have jdk7 from sun/oracle installed. When locate jni.h, it prints multiple locations

/usr/lib/jvm/java-6-openjdk-amd64/inclu         


        
11条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-30 03:22

    Use the following code:

    make -I/usr/lib/jvm/jdk*/include
    

    where jdk* is the directory name of your jdk installation (e.g. jdk1.7.0).

    And there wouldn't be a system-wide solution since the directory name would be different with different builds of JDK downloaded and installed. If you desire an automated solution, please include all commands in a single script and run the said script in Terminal.

提交回复
热议问题