pythonjavapyjnius

Pyjnius looking for libjvm.so in wrong folder - Ubuntu 16.04


I'm somewhat new to Ubuntu (16.04, armhf) and am trying to use pytimeextractor which requires both cython and pyjnius to enable the Java/Python interaction, but am running into the following error with pyjnius:

SystemError: Error calling dlopen(b'/usr/lib/jvm/jdk1.8.0-openjdk-armhf/jre/lib/arm/server/libjvm.so': b'/usr/lib/jvm/jdk1.8.0-openjdk-armhf/jre/lib/arm/server/libjvm.so: cannot open shared object file: No such file or directory'

I was initially having issues with setting JAVA_HOME (getting a KeyError), which lead me to purge existing Java installations such as the folder referenced in the SystemError above: "*/jdk1.8.0-openjdk-armhf/..."

After reinstalling Java and setting JAVA_HOME in etc/environment, then uninstalling and reinstalling pyjnius, it is still pointing to this old, now non-existent Java installation... rather than the JAVA_HOME now set (/usr/lib/jvm/java-1.8.0-openjdk-armhf) and I have not the slightest idea why.

Could someone please help point me in the right direction of resolving this issue? I feel out of my depth with the extent of Ubuntu knowledge required to accurately diagnose the errors in front of me and swiftly resolve them. Thank you.


Solution

  • I have managed to resolve this issue. As far as I can tell, I had set the JAVA_HOME to point at the correct installation of Java but needed to log out and back in for the changes to take effect.