Sourcetrail
Sourcetrail copied to clipboard
Sourcetrail was unable to locate Java on this machine (macOS Catalina 10.15.5 (19F101))
Hello,
I am getting the following error when trying to load a Java Project:
Sourcetrail was unable to locate Java on this machine. Please make sure to provide the correct Java Path in the preferences. Error: Could not load library "/Library/Java/JavaVirtualMachines/jdk-14.0.1.jdk/Contents/MacOS/libjli.dylib"
Java is properly installed:
$ /usr/libexec/java_home -V Matching Java Virtual Machines (4): 14.0.1, x86_64: "OpenJDK 14.0.1" /Library/Java/JavaVirtualMachines/jdk-14.0.1.jdk/Contents/Home 1.8.0_92, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home 1.7.0_80, x86_64: "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home 1.7.0_71, x86_64: "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home
The file is also there:
$ ls -la /Library/Java/JavaVirtualMachines/jdk-14.0.1.jdk/Contents/MacOS/libjli.dylib -rwxr-xr-x@ 1 root wheel 80704 5 Mär 12:06 /Library/Java/JavaVirtualMachines/jdk-14.0.1.jdk/Contents/MacOS/libjli.dylib
I am using the very latest sourcetrail version 2020.2.43.
What can I do to resolve this issue?
Thank you.
I don't know, it should work this way.
Is not this issue a duplicate of #1045? I am here because I have the same issue on OSX but with adoptopenjdk-8.jdk
.
Me as well. Latest MacOS Catalina 10-15-6, even unable to set the Java preference, (when I do I still get the same error)
Weirdly, the included Java Source project (javaparser.srctrlprj) Works Just Fine. (But perhaps it has already been processed into some kind of AST or whatever by some other JRE?)
I see it again too, is it solved ???
Just ran into this same error.
Sourcetrail was unable to locate Java on this machine.
Please make sure to provide the correct Java Path in the preferences.
Error: Could not load library "/Library/Java/JavaVirtualMachines/openjdk-14.jdk/Contents/MacOS/libjli.dylib"
version: 2020.2.43 osx: 10.15.5
The library exists.
❯ ls /Library/Java/JavaVirtualMachines/openjdk-14.jdk/Contents/MacOS/libjli.dylib
/Library/Java/JavaVirtualMachines/openjdk-14.jdk/Contents/MacOS/libjli.dylib
❯ file /Library/Java/JavaVirtualMachines/openjdk-14.jdk/Contents/MacOS/libjli.dylib
/Library/Java/JavaVirtualMachines/openjdk-14.jdk/Contents/MacOS/libjli.dylib: Mach-O 64-bit dynamically linked shared library x86_64
When I disabled SIP (do at you own risk!), the problem went away. I wonder if it is similar to JDK-8139288.
I guess SourceTrail should be built with this option to be true:
https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_cs_disable-library-validation
I have the same issue with:
- SourceTrail 2020.4.35
- MacOS Bg Sur 11.2.1
- /Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home/lib/jli/libjli.dylib
I have also tried with all 2020.x.x versions and I get the same problem (all other variables being the same). As others have reported, downgrading to 2019.4.102
was worked for me.
Same result with:
- SourceTrail 2021.1.30
- macOS Big Sur 11.3.1
-
/Library/Java/JavaVirtualMachines/sapmachine-11.jdk/Contents/MacOS/libjli.dylib
Still an issue with macOS Big Sur 11.4 and SourceTrail 2021.1.30
Version 2021.4.19 The problem still exists