protegeproject / protege-distribution

Build files for the protege distribution that includes 3rd party plugins
BSD 2-Clause "Simplified" License
125 stars 39 forks source link

FYI: Running with JAVA 17 or higher and mitigating module not exported to unamed module #54

Open chris-day opened 1 month ago

chris-day commented 1 month ago

There is a slight nuance with JAVA version above 16 and module exporting, you see the error when starting as

cannot access class com.sun.java.swing.plaf.windows.WindowsLookAndFeel (in module java.desktop) because module java.desktop does not export com.sun.java.swing.plaf.windows

To mitigate, add the following to the run.bat java command line

--add-exports java.desktop/com.sun.java.swing.plaf.windows=ALL-UNNAMED

gouttegd commented 1 month ago

Thanks. As far as I recall, last time I tested, there were also a few other minor issues with running Protégé with Java >= 17, with more modules that needed to be explicitly exported.

For now, the official recommendation is to run Protégé with Java 11 -- that’s the version Protégé is developed and tested against, and also the version that is bundled in the platform-specific packages.

We’ll probably need to soon start thinking about moving up to a higher version. Thanks for the reminder!