Skip to content
Advertisement

jni.h no such file or directory

To install leJos for NXJ brick i follow the documentation tutorial , i set the variables like this : `

JavaScript

` i go to build directory to make the ant command in the terminal and the build failed with the following error , i know the problem is surely in jni.h and i tried to fix it but i can’t :

JavaScript

Advertisement

Answer

Did you ever manage to get this working? I eventually got it to work and had to change the following line in build.xml:

JavaScript

To:

JavaScript

Apparently behaviour used to be to append /jre to JAVA_HOME hence the need for /../ but it appears this no longer happens.

Hope this helps and you haven’t given up.

Edit: I should also add that you will need to use Java 8. After installing OpenJDK 8 (and editing the build.xml) I was able to run ant to complete the build and then compile, link and upload from the terminal. If you want to use eclipse with the plugin you will need to use version 2018-09 as that’s the latest that works. Remeber to set the JRE to Java 8. After this everything works for me!

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement