JaciBrunning / Pathfinder

Cross-Platform, Multi-Use Motion Profiling and Trajectory Generation
MIT License
255 stars 78 forks source link

JDK 10 removed javah #51

Open Leo428 opened 6 years ago

Leo428 commented 6 years ago

I tried to build the master with JDK 10 on Mac OS High Sierra. Error like this will occur:

Unable to locate an executable at "/Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home/bin/javah" (-1)

I resolved this issue by changing line 112 in jni.gradle to

executable org.gradle.internal.jvm.Jvm.current().getExecutable('javap')

This problem is caused by the removal of javah I have not tested whether "javap" will work the same as "javah" in other JDK versions. Hope you can look into this.

duane701 commented 6 years ago

I think Kotlin replacement for javah answers the problem in the question with what may be needed here. (I haven't looked specifically at the use for javah in this case.)

The recommendation is to use javac -h in place of javah. The primary difference is that javah operates on .class files where javac operates on java source files.

Leo428 commented 6 years ago

I saw that solution too. I tried simply replacing "javah" to "javac -h" in that line. But since I have little knowledge about groovy and gradle, it did not work.