Open HowardLander opened 3 years ago
This problem has been reported many times and isn't new. There's some problem with the used Java-Version (see this: https://github.com/protegeproject/protege/pull/846). But since the last release of Protege was in 2019, I don't think the developers are paying attention to issues and I wouldn't hope a fix soon. :/
My solution for now is to download the platform independent version of Protege and run it using the terminal (just run this script "/Protege-5.5.0/run.sh" inside the downloaded package)
@HowardLander do you by chance have an M1 mac? On my (intel) MacBook Pro with the latest macOS it works without problems. Protege uses its own (bundled) JRE so the version of Java that is installed on the system is irrelevant.
No, I have an intel mac, so I don't think that is the difference. I will probably try the solution suggested by @AneesHl
@HowardLander to get a little bit more info, could you try to launch the Protege app from the terminal. For this, just open the terminal, navigate to the Protege app folder (e.g., cd /Applications/Protégé.app
) and run:
./Contents/MacOS/JavaAppLauncher
Do you see any output?
You can also test if the JRE bundled with Protege works:
./Contents/Plugins/JRE/Contents/Home/jre/bin/java -version
Hi Yevgeny
I did this
cd /Applications/Protege-5.5.0/Protégé.app
./Contents/MacOS/JavaAppLauncher
No output on the command line and this on the screen
[cid:b9551000-f6c9-44ba-84f9-f2f1fceb1b45]
I found the bundled JRE here:
/Applications/Protege-5.5.0/Protégé.app/Contents/Plugins/JRE/Contents/Home/jre/bin
The output was
java -version java version "11.0.11" 2021-04-20 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.11+9-LTS-194) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.11+9-LTS-194, mixed mode)
which looks OK.
Hope this is helpful
Howard
From: Yevgeny Kazakov @.> Sent: Thursday, September 30, 2021 5:09 AM To: protegeproject/protege @.> Cc: Lander, Howard Michael @.>; Mention @.> Subject: Re: [protegeproject/protege] JRE Load Error on MacOS (#1027)
@HowardLanderhttps://github.com/HowardLander to get a little bit more info, could you try to launch the Protege app from the terminal. For this, just open the terminal, navigate to the Protege app folder (e.g., cd /Applications/Protégé.app) and run:
./Contents/MacOS/JavaAppLauncher
Do you see any output?
You can also test if the JRE bundled with Protege works:
./Plugins/JRE/Contents/Home/jre/bin/java -version
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/protegeproject/protege/issues/1027#issuecomment-931100706, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAJUNLNDVP3UJDONMXPY3WLUEQSMHANCNFSM5DCJYOPQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
@HowardLander
java -version java version "11.0.11" 2021-04-20 LTS …
Looks like you run the java installed on the system, not the one from the JRE folder. You need to run:
./java -version
This is what I get:
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
Sorry about that:
./java -version java version "1.8.0_121" Java(TM) SE Runtime Environment (build 1.8.0_121-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
Howard
From: Yevgeny Kazakov @.> Sent: Thursday, September 30, 2021 9:47 AM To: protegeproject/protege @.> Cc: Lander, Howard Michael @.>; Mention @.> Subject: Re: [protegeproject/protege] JRE Load Error on MacOS (#1027)
@HowardLanderhttps://github.com/HowardLander
java -version java version "11.0.11" 2021-04-20 LTS …
Looks like you run the java installed on the system, not the one from the JRE folder. You need to run:
./java -version
This is what I get:
ava version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/protegeproject/protege/issues/1027#issuecomment-931338571, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAJUNLJSYKGMYZNVM6GQKJDUERS57ANCNFSM5DCJYOPQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
OK, looks good!
Now from the /Contents/Java
subfolder try to run the following command (just copy & paste in the terminal):
../Plugins/JRE/Contents/Home/jre/bin/java \
-classpath bundles/guava.jar:bundles/logback-classic.jar:bundles/logback-core.jar:bundles/slf4j-api.jar:bin/org.apache.felix.main.jar:bin/maven-artifact.jar:bin/protege-launcher.jar \
org.protege.osgi.framework.Launcher
I tried the command and it started Protege up just fine.
[cid:49cc2d53-8a02-4d11-83ff-fb0f6ef1c799]
From: Yevgeny Kazakov @.> Sent: Thursday, September 30, 2021 10:01 AM To: protegeproject/protege @.> Cc: Lander, Howard Michael @.>; Mention @.> Subject: Re: [protegeproject/protege] JRE Load Error on MacOS (#1027)
OK, looks good! Now from the /Contents/Java subfolder try to run the following command (just copy & paste in the terminal):
../Plugins/JRE/Contents/Home/jre/bin/java \ -classpath bundles/guava.jar:bundles/logback-classic.jar:bundles/logback-core.jar:bundles/slf4j-api.jar:bin/org.apache.felix.main.jar:bin/maven-artifact.jar:bin/protege-launcher.jar \ org.protege.osgi.framework.Launcher
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/protegeproject/protege/issues/1027#issuecomment-931351187, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAJUNLNFMKIFUUDPUS2UFILUERUU5ANCNFSM5DCJYOPQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Great!
So it looks like the app somehow does not find the JRE within the subfolder.
Just to double check, can you paste the content of the file ./Contents/Info.plist
.
Oh, b.t.w., you screenshots are not attached in your messages (probably email replies with attachments do not work).
Sure, here it is. Hope I got it right. I would have attached the file, but I didn't know it that would work
Howard
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
From: Yevgeny Kazakov @.> Sent: Thursday, September 30, 2021 11:02 AM To: protegeproject/protege @.> Cc: Lander, Howard Michael @.>; Mention @.> Subject: Re: [protegeproject/protege] JRE Load Error on MacOS (#1027)
Great! So it looks like the app somehow does not find the JRE within the subfolder. Just to double check, can you paste the content of the file ./Contents/Info.plist. Oh, b.t.w., you screenshots are not attached in your messages (probably email replies with attachments do not work).
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/protegeproject/protege/issues/1027#issuecomment-931404415, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAJUNLKDY36DNDIQFQ3BR5TUER3ZDANCNFSM5DCJYOPQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
The file seems right.
Try installing Oracle JRE 1.8 and removing these two lines from ./Contents/Info.plist
:
<key>JVMRuntime</key>
<string>JRE</string>
Then Protege should pick up the system java instead of the bundled one (just tried on my mac). Or maybe something was missing and it even stats working without modifying this file.
Hi Yevgeny,
The only problem with this idea is that I do have software on my machine that requires Java 11. Seems like the real problem is that the package isn't using the bundled JRE. Can we fix that somehow?
Howard
From: Yevgeny Kazakov @.> Sent: Thursday, September 30, 2021 11:54 AM To: protegeproject/protege @.> Cc: Lander, Howard Michael @.>; Mention @.> Subject: Re: [protegeproject/protege] JRE Load Error on MacOS (#1027)
Try installing Oracle JRE 1.8https://www.java.com/en/download/manual.jsp and removing these two lines from ./Contents/Info.plist:
Then Protege should pick up the system java instead of the bundled one (just tried on my mac). Or maybe something was missing and it even stats working without modifying this file.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/protegeproject/protege/issues/1027#issuecomment-931449695, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAJUNLLRW5QIM77RM3R3L5LUESB2DANCNFSM5DCJYOPQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
@HowardLander
You can install several versions of java on your mac and easily switch between them by setting JAVA_HOME
to whatever you need. See for example here.
I cannot reproduce your problem, so we need to diagnose it on your machine. ;-)
The next step (if the installed JRE works but the bundled still does not) would be to copy the installed JRE 1.8 to the Protege app and see if that would work.
Ok, I'll do it in the morning
Howard
From: Yevgeny Kazakov @.> Sent: Thursday, September 30, 2021 6:22 PM To: protegeproject/protege @.> Cc: Lander, Howard Michael @.>; Mention @.> Subject: Re: [protegeproject/protege] JRE Load Error on MacOS (#1027)
@HowardLanderhttps://github.com/HowardLander You can install several versions of java on your mac and easily switch between them by setting JAVA_HOME to whatever you need. See for example herehttps://stackoverflow.com/a/24657630. I cannot reproduce your problem, so we need to diagnose it on your machine. ;-)
The next step (if the installed JRE works but the bundled still does not) would be to copy the installed JRE 1.8 to the Protege app and see if that would work.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/protegeproject/protege/issues/1027#issuecomment-931745092, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAJUNLPKH6ECNZG4CSVOHTTUETPJLANCNFSM5DCJYOPQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Hi Yevgeny,
I did install Java 1.8. I had to change the PATH variable as well as change JAVA_HOME, but when I took out the 2 lines in the plist Protege started as expected. Just to test, I put the 2 lines back into the plist and the original error resurfaced.
Howard
From: Yevgeny Kazakov @.> Sent: Thursday, September 30, 2021 6:22 PM To: protegeproject/protege @.> Cc: Lander, Howard Michael @.>; Mention @.> Subject: Re: [protegeproject/protege] JRE Load Error on MacOS (#1027)
@HowardLanderhttps://github.com/HowardLander You can install several versions of java on your mac and easily switch between them by setting JAVA_HOME to whatever you need. See for example herehttps://stackoverflow.com/a/24657630. I cannot reproduce your problem, so we need to diagnose it on your machine. ;-)
The next step (if the installed JRE works but the bundled still does not) would be to copy the installed JRE 1.8 to the Protege app and see if that would work.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/protegeproject/protege/issues/1027#issuecomment-931745092, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAJUNLPKH6ECNZG4CSVOHTTUETPJLANCNFSM5DCJYOPQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
I had to change the PATH variable as well as change JAVA_HOME
Hmm.. normally you do not need to change the path. The java executable in /usr/bin/java
executes the version of java based on JAVA_HOME
. Check the output of:
/usr/bin/java -version
Then set a different value for JAVA_HOME
like in the link above
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
or
export JAVA_HOME=`/usr/libexec/java_home -v 11`
and try /usr/bin/java -version
again. It should display the corresponding java version.
You should then remove the additional entries from PATH
.
Now you can test if copying the installed Oracle JRE 1.8 to the Protege folder works. Please do:
mkdir -p /Applications/Protege-5.5.0/Protégé.app/Contents/Plugins/JRE18/Contents/Home/
cp -R /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home /Applications/Protege-5.5.0/Protégé.app/Contents/Plugins/JRE18/Contents/Home/jre
Then change the lines in Contents/Info.plist
<key>JVMRuntime</key>
<string>JRE</string>
to
<key>JVMRuntime</key>
<string>JRE18</string>
Protege should then pick up the JRE18 from the subfolder. If it starts then it means that the JRE provided in Protege was somehow broken. If not, then the JavaAppLauncher for some reasone does not pick up the JRE bundled with Protege.
@ykazakov Copying Java from MacOS into the Protété.app didn't fix the Problem. I'm still getting the same Error.
If on the other hand, I run the following as you suggested before (from inside /Contents/Java
subfolder):
../Plugins/JRE/Contents/Home/jre/bin/java \ -classpath bundles/guava.jar:bundles/logback-classic.jar:bundles/logback-core.jar:bundles/slf4j-api.jar:bin/org.apache.felix.main.jar:bin/maven-artifact.jar:bin/protege-launcher.jar \ org.protege.osgi.framework.Launcher
Protégé starts normally using the newly copied Java.
Well, looks like JavaAppLauncher (or whatever it is using) is broken after all.
B.t.w., in your last command, you did not use the new JRE. With the new JRE it should start with ../Plugins/JRE18/...
. I suppose it works as well as it does not involve JavaAppLauncher.
Perhaps the last attempt (in case something is wrong with paths or settings): can you create a new user in MacOS, switch to this user, download Protege, and try to run it there. I think the chances are slim because the system is the same, but who knows...
B.t.w., you wrote your MacOS version is 11.4. I assume it was the version when you opened the ticket because mine is 11.6. If not, maybe updating helps?
Copying Java from MacOS into the Protété.app didn't fix the Problem. I'm still getting the same Error.
Just to confirm: you also changed the lines in Info.plist
right?
@ykazakov thanks for your replies.
I did use the new JRE because I just emptied the old JRE folder with copied into it the Java from MacOS and adjusted the command accordingly.
I created a new user now and installed Protégé but it still doesn't work.
I'm on macOS 11.6 now.
Yes tried both options for Info.plist
, aka `
@AneesHl @HowardLander are you talking about the same machine? ;-)
It is strange that /usr/libexec/java_home -V
does not find the installed JDKs, in particular those in /Library/Java/JavaVirtualMachine/
.
This is what I have got:
% /usr/libexec/java_home -V
Matching Java Virtual Machines (7):
17 (x86_64) "Azul Systems, Inc." - "Zulu 17.28.13" /Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home
16.0.1 (x86_64) "AdoptOpenJDK" - "AdoptOpenJDK 16" /Library/Java/JavaVirtualMachines/adoptopenjdk-16.jdk/Contents/Home
11.0.12 (x86_64) "GraalVM Community" - "GraalVM CE 21.2.0" /Library/Java/JavaVirtualMachines/graalvm-ce-java11-21.2.0/Contents/Home
11.0.11 (x86_64) "AdoptOpenJDK" - "AdoptOpenJDK 11" /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
1.8.301.09 (x86_64) "Oracle Corporation" - "Java" /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
1.8.0_292 (x86_64) "AdoptOpenJDK" - "AdoptOpenJDK 8" /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
1.8.0_282+07 (x86_64) "GraalVM Community" - "GraalVM CE 21.0.0.2" /Library/Java/JavaVirtualMachines/graalvm-ce-java8-21.0.0.2/Contents/Home
/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home
Most JVMs that I use are installed by homebrew, but they are still placed for me in /LibraryJava/JavaVirtualMachines/
. Maybe something is wrong in the way how java installations are discovered by the system? This could explain why the JRE located in Protege.app not found.
I would suggest to reinstall all Java versions and making sure that /usr/libexec/java_home -V
prints the correct locations.
No we are not. I actually do not know @AneesHl. I think they are just another person having the same problem.
Howard
From: Yevgeny Kazakov @.> Sent: Thursday, October 7, 2021 5:29 AM To: protegeproject/protege @.> Cc: Lander, Howard Michael @.>; Mention @.> Subject: Re: [protegeproject/protege] JRE Load Error on MacOS (#1027)
@AneesHlhttps://github.com/AneesHl @HowardLanderhttps://github.com/HowardLander are you talking about the same machine? ;-)
It is strange that /usr/libexec/java_home -V does not find the installed JDKs, in particular those in /Library/Java/JavaVirtualMachine/. This is what I have got:
% /usr/libexec/java_home -V Matching Java Virtual Machines (7): 17 (x86_64) "Azul Systems, Inc." - "Zulu 17.28.13" /Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home 16.0.1 (x86_64) "AdoptOpenJDK" - "AdoptOpenJDK 16" /Library/Java/JavaVirtualMachines/adoptopenjdk-16.jdk/Contents/Home 11.0.12 (x86_64) "GraalVM Community" - "GraalVM CE 21.2.0" /Library/Java/JavaVirtualMachines/graalvm-ce-java11-21.2.0/Contents/Home 11.0.11 (x86_64) "AdoptOpenJDK" - "AdoptOpenJDK 11" /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home 1.8.301.09 (x86_64) "Oracle Corporation" - "Java" /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home 1.8.0_292 (x86_64) "AdoptOpenJDK" - "AdoptOpenJDK 8" /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home 1.8.0_282+07 (x86_64) "GraalVM Community" - "GraalVM CE 21.0.0.2" /Library/Java/JavaVirtualMachines/graalvm-ce-java8-21.0.0.2/Contents/Home /Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home
Most JVMs that I use are installed by homebrew, but they are still placed for me in /LibraryJava/JavaVirtualMachines/. Maybe something is wrong in the way how java installations are discovered by the system? This could explain why the JRE located in Protege.app not found.
I would suggest to reinstall all Java versions and making sure that /usr/libexec/java_home -V prints the correct locations.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/protegeproject/protege/issues/1027#issuecomment-937617379, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAJUNLN4RFRTILW2GHVBZYDUFVR6TANCNFSM5DCJYOPQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
No we are not. I actually do not know @AneesHl. I think they are just another person having the same problem. Howard …
Exactly, I've had the same problem for a while.
@HowardLander @AneesHl I see. At some point that became quite confusing as I did not check who is replying. ;-)
@HowardLander can you show us your output of /usr/libexec/java_home -V
. Does it find all java versions installed on the system?
Hi Yevgeny,
Here is what I get:
(base) beast:~$ /usr/libexec/java_home -V Matching Java Virtual Machines (3): 11.0.11 (x86_64) "Oracle Corporation" - "Java SE 11.0.11" /Library/Java/JavaVirtualMachines/jdk-11.0.11.jdk/Contents/Home 1.8.301.09 (x86_64) "Oracle Corporation" - "Java" /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home 1.8.0_05 (x86_64) "Oracle Corporation" - "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home /Library/Java/JavaVirtualMachines/jdk-11.0.11.jdk/Contents/Home
Howard
From: Yevgeny Kazakov @.> Sent: Thursday, October 7, 2021 10:45 AM To: protegeproject/protege @.> Cc: Lander, Howard Michael @.>; Mention @.> Subject: Re: [protegeproject/protege] JRE Load Error on MacOS (#1027)
@HowardLanderhttps://github.com/HowardLander @AneesHlhttps://github.com/AneesHl I see. At some point that became quite confusing as I did not check who is replying. ;-)
@HowardLanderhttps://github.com/HowardLander can you show us your output of ,. Does it find all java versions installed on the system?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/protegeproject/protege/issues/1027#issuecomment-937864048, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAJUNLNHMIU5MAQ6GWLFXELUFWXCJANCNFSM5DCJYOPQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
@HowardLander Thanks! Looks good. Did you try to run Protege from another user?
@AneesHl Can you confirm that Protege starts fine (by double clicking on the Protege.app) if you remove the lines
<key>JVMRuntime</key>
<string>JRE</string>
from Contents/Info.plist
?
I guess, currently this is the best workaround.
Nope, I haven't tried that. I'm at a conference today and tomorrow, maybe can try that Monday
From: Yevgeny Kazakov @.> Sent: Thursday, October 7, 2021 10:57 AM To: protegeproject/protege @.> Cc: Lander, Howard Michael @.>; Mention @.> Subject: Re: [protegeproject/protege] JRE Load Error on MacOS (#1027)
@HowardLanderhttps://github.com/HowardLander Thanks! Looks good. Did you try to run Protege from another user?
@AneesHlhttps://github.com/AneesHl Can you confirm that Protege starts fine (by double clicking on the Protege.app) if you remove the lines
from Contents/Info.plist?
I guess, currently this is the best workaround.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/protegeproject/protege/issues/1027#issuecomment-937874845, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAJUNLKXQFOE7GJKJZMNBMTUFWYPDANCNFSM5DCJYOPQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
@HowardLander Thanks! Looks good. Did you try to run Protege from another user?
@AneesHl Can you confirm that Protege starts fine (by double clicking on the Protege.app) if you remove the lines
<key>JVMRuntime</key> <string>JRE</string>
from
Contents/Info.plist
?I guess, currently this is the best workaround.
No this doesn't help, at least not on my machine. :(
@AneesHl did you also install Oracle JRE 1.8? https://github.com/protegeproject/protege/issues/1027#issuecomment-931449695
yes I did. I tried different JREs but it makes no difference.
17 (x86_64) "Oracle Corporation" - "Java SE 17" /Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home
17 (x86_64) "Eclipse Temurin" - "Eclipse Temurin 17" /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home
11.0.12 (x86_64) "Eclipse Temurin" - "Eclipse Temurin 11" /Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home
1.8.0_302 (x86_64) "Homebrew" - "OpenJDK 8" /usr/local/Cellar/openjdk@8/1.8.0+302/libexec/openjdk.jdk/Contents/Home
@AneesHl I do not see Oracle JRE 1.8 in your list. You should have an entry like:
1.8.301.09 (x86_64) "Oracle Corporation" - "Java" /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
@ykazakov I tried removing all JDKs and installed Oracle JRE 1.8 but it still didn't help.
$ java -version
java version "1.8.0_301" Java(TM) SE Runtime Environment (build 1.8.0_301-b09) Java HotSpot(TM) 64-Bit Server VM (build 25.301-b09, mixed mode)
$ /usr/libexec/java_home -V
Matching Java Virtual Machines (1): 1.8.301.09 (x86_64) "Oracle Corporation" - "Java" /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
$ echo $JAVA_HOME
/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
I think that something is broken in macOS Big Sur with java (Many other Projects seem to have similar problems and Apple doesn't seem to acknowledge the issue or care to fix it).
For example: I noticed that when I have multiple JDKs installed, I can change the JAVA_HOME with export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home"
. This would Cause echo $JAVA_HOME
to print out "/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home"
as expected. However if I run java -version
I'll get the java version of the first JDK that appears when running $ /usr/libexec/java_home -V
.
That's why I deleted all other JDKs in order to try the Oracle 1.8 JRE.
@AneesHl Can you show the output of which java
? Anything related to java in PATH
?
Anyway, PATH or other (shell) environmental variables should not have influence on app, as far as I understand.
You can try opening Console.app and filtering messages with java
when you start Protege. Perhaps you see something interesting.
@ykazakov
which java
prints out /usr/bin/java
echo $PATH
prints out /usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Library/Apple/usr/bin:/usr/local/sbin
I found out, why java -version
was giving the wrong result. I used the wrong kind of quotation marks in the alias I created to switch between JDKs in .zshrc. MacOS seems to default to the first JDK available in java_home -V
whenever JAVA_HOME
ist set incorrectly.
Protégé.app is still not working though :/
The only things that "Console.app" is marking as errors are the following:
internal_TCCCreateDesignatedRequirementIdentityFromMessage: Refusing TCCCreateDesignatedRequirementIdentityFromAuditToken (kTCCServiceAppleEvents) accessing={identifier=edu.stanford.protege, pid=66945, auid=501, euid=501, binary_path=/Applications/Protégé.app/Contents/MacOS/JavaAppLauncher}, requesting={identifier=com.apple.appleeventsd, pid=354, auid=55, euid=55, binary_path=/System/Library/CoreServices/appleeventsd}, : unable to compute designated requirement for: file:///Applications/Prote%CC%81ge%CC%81.app/Contents/MacOS/JavaAppLauncher.
MTLIOAccelDevice bad MetalPluginClassName property (null)
[MTLIOAccelDevice registerDevices]: Zero Metal services found
Sorry for the confusion and thank you for all your replies. It's really a headache.
internal_TCCCreateDesignatedRequirementIdentityFromMessage: Refusing TCCCreateDesignatedRequirementIdentityFromAuditToken (kTCCServiceAppleEvents)...
That is an interesting message. I do not see it in my case. From quick search I think that there might be some problems with the signature of the app. Can you run a quick check:
codesign -vv /Applications/Protégé.app
Also we can compare the output of
codesign -dvvv /Applications/Protégé.app
I get the following:
Executable=/Applications/Protégé.app/Contents/MacOS/JavaAppLauncher
Identifier=edu.stanford.protege
Format=app bundle with Mach-O thin (x86_64)
CodeDirectory v=20100 size=325 flags=0x2(adhoc) hashes=5+3 location=embedded
Hash type=sha256 size=32
CandidateCDHash sha1=2cd51887fe72be1a2810bfe77b83f1ca1993040c
CandidateCDHashFull sha1=2cd51887fe72be1a2810bfe77b83f1ca1993040c
CandidateCDHash sha256=583f7e41d62630a0b76ef15fd772d5b0ed70a66f
CandidateCDHashFull sha256=583f7e41d62630a0b76ef15fd772d5b0ed70a66fa2749cfae1cd66260fdd20dd
Hash choices=sha1,sha256
CMSDigest=f8628249e91998f28fb9d7e47e4be37511b7d446cc404355b92977a0ff9b1677
CMSDigestType=2
CDHash=583f7e41d62630a0b76ef15fd772d5b0ed70a66f
Signature=adhoc
Info.plist entries=22
TeamIdentifier=not set
Sealed Resources version=2 rules=13 files=220
Internal requirements count=0 size=12
codesign -vv /Applications/Protégé.app
returned /Applications/Protégé.app: invalid Info.plist (plist or signature have been modified) In architecture: x86_64
I reinstalled Protege using homebrew and now The error is gone: /Applications/Protégé.app: valid on disk /Applications/Protégé.app: satisfies its Designated Requirement
codesign -dvvv /Applications/Protégé.app
is returning the same as on your machine:
Executable=/Applications/Protégé.app/Contents/MacOS/JavaAppLauncher
Identifier=edu.stanford.protege
Format=app bundle with Mach-O thin (x86_64)
CodeDirectory v=20100 size=325 flags=0x2(adhoc) hashes=5+3 location=embedded
Hash type=sha256 size=32
CandidateCDHash sha1=2cd51887fe72be1a2810bfe77b83f1ca1993040c
CandidateCDHashFull sha1=2cd51887fe72be1a2810bfe77b83f1ca1993040c
CandidateCDHash sha256=583f7e41d62630a0b76ef15fd772d5b0ed70a66f
CandidateCDHashFull sha256=583f7e41d62630a0b76ef15fd772d5b0ed70a66fa2749cfae1cd66260fdd20dd
Hash choices=sha1,sha256
CMSDigest=f8628249e91998f28fb9d7e47e4be37511b7d446cc404355b92977a0ff9b1677
CMSDigestType=2
CDHash=583f7e41d62630a0b76ef15fd772d5b0ed70a66f
Signature=adhoc
Info.plist entries=22
TeamIdentifier=not set
Sealed Resources version=2 rules=13 files=220
Internal requirements count=0 size=12
@ykazakov @HowardLander
I finally solved the issue locally (but an upstream solution is still needed), which required several things:
"~/.zshenv"
which was setting an old already uninstalled JDK into the PATH, but which wasn't showing up in echo $PATH
for some reason. So first make sure that "~/.zshenv"
,"~/.zshrc"
,".zshrc.pre-oh-my-zsh"
, etc don't have any false Java-paths. echo $JAVA_HOME
and java -version
have the same output and that it's included in the /usr/bin/java_home -V
output. /Applications/Protégé/Contents/Info.plist
remove or comment out the following lines (as @ykazakov suggested before): <key>JVMRuntime</key>
<string>JRE</string>
PS.:
I tested the solution with different JDKs by adding the following aliases to ~/.zshrc
and switching the JDKs before starting Protégé.app which was successful with all three Java-Version:
alias setJDKTemurin17="unset JAVA_HOME;export JAVA_HOME='/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home'"
alias setJREOracle1p8="unset JAVA_HOME;export JAVA_HOME='/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home'"
alias setJDKOpenjdk11="unset JAVA_HOME;export JAVA_HOME='/usr/local/Cellar/openjdk@11/11.0.12/libexec/openjdk.jdk/Contents/Home'"
(don't forget to run source ~/.zsh
)
In any case, the main problem remains unsolved, which is that the included JRE can't be found by the system, which I don't know how to fix. It also didn't help to just symlink or copy the existing JDK (e.g. temurin-17.jdk) from the System to the "Protégé.app/Contents/Plugins/" and adjusting the name in Info.plist
<key>JVMRuntime</key>
<string>temurin-17.jdk</string>
Let me know if it works for you.
@ykazakov I encounter this JRE load error on my M1 Mac with latest mac osx version. My another Macbook pro with intel chip works fine, do you have any idea how to fix this issue on the M1 Mac ?
Hi all,
I just downloaded the Protege app for Mac. When I try to start it, I get a "JRE Load Error"
java -version returns java version "11.0.11" 2021-04-20 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.11+9-LTS-194) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.11+9-LTS-194, mixed mode)
OS is macOS 11.4
Has anyone else seen this? All suggestions/ideas welcome
Howard