jblas-project / jblas

Linear Algebra for Java
http://jblas.org
BSD 3-Clause "New" or "Revised" License
590 stars 149 forks source link

JAVA_HOME detection fails on Java 9 #89

Closed FauxFaux closed 6 years ago

FauxFaux commented 6 years ago

On Java 9, the configure script fails to automatically detect JAVA_HOME.

java -cp config PrintProperty java.home returns /usr/lib/jvm/java-9-openjdk-amd64, not /usr/lib/jvm/java-8-openjdk-amd64/jre. The script uses dirname to strip the trailing /jre, but actually ends up stripping the path down to /usr/lib/jvm.

Perhaps try both paths? Or strip the "/jre" suffix iff it's there?

mikiobraun commented 6 years ago

Interesting... Yeah seems like one should only strip /jre if it isn't there... .

Do you want to give it a shot?