jpype icon indicating copy to clipboard operation
jpype copied to clipboard

No JVM DLL when using jpype

Open rnartallo opened this issue 1 year ago • 3 comments

When trying to start the virtual machine, I get the error,

FileNotFoundError: [Errno 2] JVM DLL not found: /Library/Java/JavaVirtualMachines/jdk-21.jdk/Contents/Home/lib/libjli.dylib

I have set Java Home to the correct directory and the .dylib file appears to be there but it does not recognise it.

I am using a Mac ARM architecture and a conda virtual environment. I have checked that both python and java are set to the correct architecture.

rnartallo avatar Dec 19 '23 10:12 rnartallo

i am having also similar issue. It was working fine 4 weeks ago.

tserenjamts avatar Jan 08 '24 07:01 tserenjamts

I believe I saw traffic regarding this on another thread. I will try to find it and reference it here.

The issue that was given is that Python and Java have different security permissions on the system and thus when Python attempts to open the shared livery it gives a security fault. The reason for the recent change is that an upgrade to the OS activates those privilege checks which is not causing a failure. The privileges were mismatching before, but it wasn't until recently that it triggers an issue.

The solution that was listed was to switch to a version of Python or Java that have matching privileges either by installing something which was properly signed (I believe they said that anaconda based install worked though that doesn't match this report) or installing an unprivileged copy of Java on the machine.

Unfortunately I don't have access to this machine type so I can't verify the solution, nor do I know how to check the privilege levels of the two binaries. But perhaps someone with better access can follow up.

The alternative would be to set up a method of launching Python from within Java as the issue is an unprivileged copy launching a privileged library not the other way around. It has been requested in the past, but I haven't had time to work on it.

Thrameos avatar Jan 08 '24 19:01 Thrameos

Any update here?

jamjensen avatar Feb 07 '24 17:02 jamjensen