protegeproject / protege

Protege Desktop
http://protege.stanford.edu
Other
1.02k stars 231 forks source link

Testing the platform-independent package of Protégé #1072

Closed gouttegd closed 1 year ago

gouttegd commented 2 years ago

(Maintainers: this ticket is not actually an issue, but a set of instructions for users willing to test Protégé.)

Background

Protégé is written in the Java programming language. As such, running it requires a Java Runtime Environment (JRE), which comprises (among other things) a Java Virtual Machine (JVM) and a standard Java Class Library (JCL).

Normally, when a version of Protégé is released, we provide specific packages for GNU/Linux, Mac OS, and Windows operating systems. Those packages already include a JRE for the corresponding system, so that they are “standalone” and can be used directly without requiring any further dependencies.

We have not yet produced such OS-specific packages for the current pre-release, though. It’s a somewhat complicated process and we’d like to first make sure that the upcoming release of Protégé is working fine before committing to packaging it for specific systems.

So for now, we only provide a “platform-independent” package. This is a single package that will work across all systems, but that does not include a JRE – the JRE must be provided by the system or installed independently if your system does not already have one.

Do you already have a JRE?

Your system may already have a JRE installed. Check by running

$ java -version

in a terminal. If you get a java: command not found message (or similar), you do not have a JRE and will need to install one. Go to the next section.

If you get a message more or less like the following:

openjdk version “17.0.4” 2022-07-19
OpenJDK Runtime Environment Temurin-17.0.2+8 (build 17.0.2+8)
OpenJDK 64-Bit Server VM Temurin-17.0.2+8 (build 17.0.2+8, mixed mode, sharing)

then you have a JRE. Check that the version is 9 or superior (in this example, it’s 17.0.4). The current pre-release of Protégé will not work with Java 8 of inferior.

While we are especially aiming at compatibility with Java 11 and Java 17, any test performed with any version of Java superior or equal to 9 will be valuable. If you have, say, Java 16, you do not have to install Java 11 or Java 17! You can do that if you want, but we’ll be happy if you just test with Java 16. :)

If you only have Java 8 or inferior, then you do need to install a higher version. Note that you don’t have to upgrade your existing Java 8 (and doing so may actually be a bad idea, as you may have applications on your system that specifically require Java 8); instead, several versions of Java can co-exist on the same system, so you can install, say, Java 17 while also keeping Java 8.

Installing a JRE

On GNU/Linux

On Debian-based distributions, you can install the Java 17 JRE with

# apt-get install openjdk-17-jre

On Fedora, OpenSuSE, CentOS, and presumably most RPM-based distributions, the package would normally be called java-17-openjdk. On ArchLinux, it should be jre17-openjdk.

(I won’t even try to cover all the distributions. I will blatantly assume that if you don’t use a “typical” distribution, you know what you are doing and you can find your way around your distribution’s package manager – or even compile OpenJDK from source!)

Of course other versions than 17 may be available, feel free to test another version if you’d like.

On Mac OS

Several distributors provide Java environments for Mac OS. Here I will suggest either Adoptium or Azul, but if you know of another feel free to use them. Protégé should work fine independently of where your Java environment comes from (if it does not, it’s either a bug in Protégé or a bug in the Java environment; in any case, it’s something that should not happen).

Visit Adoptium.net. Your system should be automatically detected and the website should propose you to download a suitable package of Java 17 straight from the home page.

In case it does not, or if you’d like to try another version than 17, go the releases page where you’ll be able to find a suitable package yourself: select your system (mac OS), your architecture (x64 if you have a Mac with an Intel processor, or aarch64 if you have a Mac with a M1 chip aka “Apple Silicon”), JRE as the “package type”, and then finally the version you want. Then download the corresponding .pkg file.

(If you choose to get your JRE from Azul instead, the procedure is similar.)

Double-click on the downloaded package and follow the installer’s instructions. The JRE will be installed somewhere under /Library/Java/JavaVirtualMachines.

On Windows

Unfortunately I can’t provide instructions for Windows. If someone has such instructions, feel free to add them as a comment to this ticket.

In principle, it should be similar to the procedure for Mac OS: get an installer from either Adoptium or Azul (both provide environments for Windows as well, not only Mac OS), start the installer, then follow whatever steps the installer requires.

Testing Protégé

Now that you have a JRE on your system, you can test Protégé. Download the current pre-release’s platform-independent package and put the archive at the location of your choice, then navigate to that location from your terminal.

From there, unzip the archive…

$ unzip protege-5.6.0-beta-1-SNAPSHOT-platform-independent.zip

enter the Protégé folder…

$ cd Protege-5.6.0-beta-1-SNAPSHOT

and actually start the program with either

$ ./run.sh

on GNU/Linux, or

$ ./run.command

on Mac OS, or

$ ./run.bat

on Windows.

Protégé should (hopefully!) start, and you can commence your tests. Try to do everything you would normally do with Protégé, and check that you can still do it with that version.

Of note, this version does not come with any plugins. If you need some plugins (e.g. a reasoner), you have to install them manually by creating a plugins folder in Protégé’s directory (the same directory that contains the run.* scripts), then putting the plugins you need in that folder (you may copy them over from your normal Protégé installation).

“Advanced stuff“: choosing the JRE to use

If you happen to have more than one JRE on your system, you can choose the one that Protégé will use by setting the variable JAVA_HOME prior to calling the run.sh or run.command script (not available on Windows, sorry!).

That variable should be set to the main folder (the folder containing the bin directory) of the JRE that you want to use.

For example, if you’re on Mac OS and you have both the Java 16 JRE from Adoptium and the Java 17 JRE from Azul, they should be located, respectively, in /Library/Java/JavaVirtualMachines/jdk-16.jre/Contents/Home and /Library/Java/JavaVirtualMachines/zulu-17.jre/Contents/Home. Then if you want to test Protégé with, say, the Java 17 JRE from Azul, you may invoke the run.command as follows:

$ JAVA_HOME=/Library/Java/JavaVirtualMachines/zulu-17.jre/Contents/Home ./run.command
nicolevasilevsky commented 2 years ago

Thanks so much to the Protege team (@gouttegd @matthewhorridge and all) for this new version, I am very excited!

Some notes from my testing are below:

image

Thanks for adding these cool new features

Thanks for all your work! This is all I have time to do right now, but I'll try to test more again later.

gouttegd commented 2 years ago

I’ve been able to test a sizeable number or Protégé plugins (thanks to Nicole and her collection of plugins!).

The very problematic one (causing Protégé to crash at startup) is

The following plugins can’t be loaded, but at least the loading failure is handled gracefully and Protégé itself can still function normally:

For all 4 plugins, the loading failure seems to have a single cause: Unresolved requirements: [osgi.wiring.package; (osgi.wiring.package=org.omg.CORBA)].

In addition, Fact++ 1.6.5 (uk.ac.manchester.cs.owl.factplusplus.jar) can’t be loaded on a M1-powered Mac with an arm64-targeting JRE, but this was already the case with Protégé 5.5.0 and is actually not surprising since the plugin is written in C++ and therefore contains native code and not Java bytecode.

rays22 commented 2 years ago
------------------------------------ Protege -----------------------------------
  Protege Desktop
  Version 5.6.0, Build beta-1-SNAPSHOT

  ----------------------------------- Platform -----------------------------------
  Java: JVM 17.0.4.1+1-LTS-2  Memory: 11811M
  Language: en, Country: GB
  Framework: Apache Software Foundation (1.9) 
  OS: macosx (12.6.0)
  Processor: aarch64

  ------------------------------------ Plugins -----------------------------------
  Plugin: Factplusplus Plug-in (1.6.5) was not successfully started.  Please see the Protégé log for more details.
  Plugin: Existential Query (2.0.0)
  Plugin: CSV Export Plugin (1.0.0)
  Plugin: Pellet Reasoner Plug-in (2.2.0)
  Plugin: taxon-constraints (1.0.0)
  Plugin: OBO Annotations Editor (0.4.0)
  Plugin: Proof Utility Library (0.1.0)
  Plugin: ELK Reasoner Protege Plug-in (0.5.0.SNAPSHOT)
  Plugin: OWLViz (5.0.3)
  Plugin: DL Query (4.0.1)
  Plugin: OWL Difference (6.0.2)
gouttegd commented 2 years ago

@nicolevasilevsky @rays22 Regarding the tab completion issue: I suspect completion with the TAB key might have been inadvertently disabled. I’m looking into it.

In the meantime, completion in the class expression editor or the DL Query editor should still be available by pressing simultaneously the SPACE bar and the CTRL key (^ key on a Mac keyboard), instead of the TAB key.

matthewhorridge commented 2 years ago

I’m not sure completion with the tab key was ever supported... The completion keys are Ctrl+Space.

On Oct 11, 2022, at 10:38, Damien Goutte-Gattat @.**@.>> wrote:

@nicolevasilevskyhttps://github.com/nicolevasilevsky @rays22https://github.com/rays22 Regarding the tab completion issue: I suspect completion with the TAB key might have been inadvertently disabled. I’m looking into it.

In the meantime, completion in the class expression editor or the DL Query editor should still be available by pressing simultaneously the SPACE bar and the CTRL key (^ key on a Mac keyboard), instead of the TAB key.

— Reply to this email directly, view it on GitHubhttps://github.com/protegeproject/protege/issues/1072#issuecomment-1275050139, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AADXJH2PEGAAKQDGY3RPUWDWCWQYXANCNFSM6AAAAAAQ4WJYUQ. You are receiving this because you were mentioned.Message ID: @.***>

gouttegd commented 2 years ago

@matthewhorridge Tab-triggered completion was supported until commit 4ee78d284 (sometimes after the 5.5.0 release), which removed the special handling of the TAB key to only keep the Ctrl+Space trigger.

rays22 commented 2 years ago

@nicolevasilevsky @rays22 Regarding the tab completion issue: I suspect completion with the TAB key might have been inadvertently disabled. I’m looking into it.

In the meantime, completion in the class expression editor or the DL Query editor should still be available by pressing simultaneously the SPACE bar and the CTRL key (^ key on a Mac keyboard), instead of the TAB key.

The triple combination of SHIFT CTRL SPACE seems to work for me.

matthewhorridge commented 2 years ago

Oh gosh. No idea why that was taken out hmmm

ghxiao commented 2 years ago

The very problematic one (causing Protégé to crash at startup) is

  • Ontop OBDA Protégé plugin 4.1.0 (it.unibz.inf.ontop.protege.jar); upgrading to the latest version 4.2.1 improves things a bit, in that at least the plugin no longer causes Protégé to crash, but it still throws some exceptions at runtime.

Hi @gouttegd, Thanks a lot for testing out Ontop. The issue has already been fixed in the (default) version4 branch. The issue was actually tiny: https://github.com/ontop/ontop/commit/83a5ea019638311621a7f8f90881f7626db5635f Strange enough, it was never triggered with earlier versions of Java.

We will make a minor release v4.2.2, which will work with Java 8/11/17, and for both Protege 5.5 and 5.6-beta.

@matthewhorridge do you have a plan for when to release Protege 5.6? We would like to align the release cycles.

gouttegd commented 2 years ago

@ghxiao Great! Indeed I no longer observe any problem with a build made from the tip of Ontop’s version4 branch, thanks for fixing the issue!

We are working on the 5.6.0 release right now, can’t commit to a date but I sure hope it’s a matter of weeks at most.

thistlillo commented 1 year ago

I am using the platform-independent 5.5.0 version because it is the only one that results in readable text on my high DPI display.

However, on my WIndows 11 Pro machine, it takes (both the platform independent and the .exe WIndow distribution) about 1 minute and 40 seconds to start: way too long.

My previous less powerful PC with Windows 10 Pro was able to launch the WIndows .exe (same version) in seconds.

ghxiao commented 1 year ago

We are working on the 5.6.0 release right now, can’t commit to a date but I sure hope it’s a matter of weeks at most.

Hi, @gouttegd any update about the 5.6.0 release? We have released Ontop 5 three weeks ago, which requires Java 11/17 and Protege 5.6, and is not compatible with Protege 5.5 anymore. It is a pity that we cannot use Ontop 5 with a stable version of Protege right now.

gouttegd commented 1 year ago

Hi @ghxiao

We have published a second beta release for Protégé 5.6.0 last week. We are hoping this will be the last beta before the final release. If we got no more reports of serious problems with the beta, I am aiming for a release around early or mid February.

ghxiao commented 1 year ago

@gouttegd Great! I did a quick test of Ontop 5.0.0 plugin with Protégé 5.6.0-beta-2. I did not find any issues. Looking forward to the stable release.

gouttegd commented 1 year ago

Protégé 5.6.0 has been released, so we can close here.

thistlillo commented 1 year ago

The start-up time of the new version went back to normal (tested with the .exe Windows version).

ghxiao commented 1 year ago

Protégé 5.6.0 has been released, so we can close here.

Hi @gouttegd did you also release protege on Maven? The latest version I could find is 5.5.0.

https://central.sonatype.com/artifact/edu.stanford.protege/protege-editor-core/5.5.0

I plan to make another release of Ontop as soon as the newer version of protege is available as Maven dependencies.

gouttegd commented 1 year ago

@ghxiao Not yet, for now the release is only available here on GitHub. Unfortunately publishing it on Maven is currently not under my control. Hopefully this will be done soon.