Open matthewhorridge opened 5 years ago
Relevant issue: https://github.com/protegeproject/protege/issues/753
Relevant issue: https://github.com/protegeproject/protege/issues/732
Relevant issue: #825
Ensure that performance is ok. See #723
B.t.w., how do you plan go about the new Java licensing model? Switch to OpenJDK?
For Java 11? Yes, we'll switch to OpenJDK. We've done this for WebProtege.
Does Protege work well with OpenJDK? I did not test. I think even for Java 8 the updates of Oracle JDK will no longer be free.
I need to double check both of these things
OK, I just tried Protege with OpenJDK on MacOS 10.14.2:
openjdk version "1.8.0_192"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_192-b12)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.192-b12, mixed mode)
From: https://adoptopenjdk.net
Everything feels and looks just like for Oracle JDK, including the issue #723.
Just icons look funny.
Awesome @ykazakov! Funny icons. Will have to look into this.
For Java 8, my understanding is that we can still distribute the JRE without problems. There just won't be anymore public updates for Java 8.
How is this coming along? The issue referenced above (#732, #753 and #825) still occurs when running 5.5-beta9 on Linux with Java 11.
@woutermont have you checked if the branch referenced in #732 works for Java11? The current release 5.5-beta9 is for Java 8. It is unlikely that the same version of Protege will work for both Java 8 and Java 11 as there are some incompatibilities (see #732).
@ykazakov my bad, I thought support for Java 11 was supposed to be ready now ... The fork doesn't work either though.
@woutermont if it were ready, this ticked would be closed ;-) What is exactly in the fork not working for Java 11? @wismill mentioned that his modifications are working for Java 10.
@ykazakov just the same error as mentioned in the issues, does that make sense?
@woutermont from which of the two branches did you build Protege? The osgi.ee error should have been fixed by the newer version of Apache Felix.
I just tried this branch on mac os 10.14.2: works fine with java 10.0.2 but not with 11.0.2:
CompileCommand: exclude javax/swing/text/GlyphView.getBreakSpot
Error occurred during initialization of boot layer
java.lang.module.FindException: Module java.xml.bind not found
@woutermont from which of the two branches did you build Protege?
Ah, damn, again, my bad ... correct branch indeed gives the java.xml.bind error. Similar for the other solution offered in that same issue.
I think I fixed the errors. Could you give it a try? https://github.com/liveontologies/protege/tree/feature/java11 I also created a PR based on this, but it requires some further testing.
@ykazakov that seems to work! I'll work a bit with it and report any problems ...
As I wanted to run Protege on my ARM M1 Mac natively, I had to use @ykazakov branch and I can confirm that it builds and runs correctly under the ARM native versio of openjdk@11 (installed using homebrew).
openjdk version "11.0.9" 2020-10-20 OpenJDK Runtime Environment (build 11.0.9+11) OpenJDK 64-Bit Server VM (build 11.0.9+11, mixed mode)
Thanks !
@serasset Nice! I did not know that there is already a native java vor M1.
Any chance that Protege 5.5 will be upgraded to run under OpenJDK 11 (or later)? This issue is already quite old...
For security I like to wrap everything in Firejail, including Java. To use Java 11, in addition to the changes mentioned above, for the swrltab plugin I also had to download a CORBA implementation as CORBA was removed from Java 11. Here are the errors on launch regarding swrltab, which were later fixed with the CORBA implementation download:
Starting bundle swrltab-plugin
Jul 09, 2021 3:13:05 PM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
Error starting file:/opt/Protege-5.5.0/plugins/swrltab-plugin-2.0.6.jar
org.osgi.framework.BundleException: Unable to resolve swrltab-plugin [33](R 33.0): missing requirement [swrltab-plugin [33](R 33.0)] osgi.wiring.package; (osgi.wiring.package=org.omg.CORBA) Unresolved requirements: [[swrltab-plugin [33](R 33.0)] osgi.wiring.package; (osgi.wiring.package=org.omg.CORBA)]
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4398) ~[org.apache.felix.main.jar:na]
at org.apache.felix.framework.Felix.startBundle(Felix.java:2308) ~[org.apache.felix.main.jar:na]
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1566) ~[org.apache.felix.main.jar:na]
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308) ~[org.apache.felix.main.jar:na]
at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
Plugin: SWRLTab Protege 5.0+ Plugin (2.0.6) was not successfully started. Please see the Protégé log for more details.
Without having to setup and re-learn an environment for Java development, I manually downloaded the newer Felix from here, javax.xml.bind jar and dependencies from here, and CORBA implementation jar and dependencies from here. I placed those 6 new jars in Protege-5.5.0/bin/ also renaming the Felix jar to match what was in run.sh. Dependency links are at the right side on the bottom on each of those Maven web pages.
In run.sh in addition to javax.xml.bind I added jacorb:
--add-modules javax.xml.bind,jacorb \
Works. I should note that the glassfish-corba-orb CORBA implementation might have better performance than the JacORB implementation so feel free to benchmark if that matters... I just picked the JacORB implementation as it was less jars to download manually.
Regarding https://github.com/protegeproject/protege/issues/822#issuecomment-877488750: 9d8c0d4afde21ae4435b3bbc08fa772f5a395128 takes care of this. @matthewhorridge: I can create a pull request if you are interested.
Relevant issue: https://github.com/protegeproject/protege/issues/702#issuecomment-451423167