timob / jnigi

Golang Java JNI library
BSD 2-Clause "Simplified" License
163 stars 44 forks source link

Attempt to load libjvm.dylib using JAVA_HOME on Darwin #15

Closed hscells closed 6 years ago

hscells commented 6 years ago

Hey there, I'd just like to submit this PR with the hopes of resolving #3. When loading libsvm.dylib on Darwin, I check to see if it can first be loaded using the JAVA_HOME environment variable, and then fall-back to the previous hard-coded string.

I haven't tested it but this approach could also probably be used for linux too.

timob commented 6 years ago

Hi thanks, seems like JAVA_HOME might be a good way to go on other platforms too.