Page 1 of 1

Jidesoft error on load

Posted: Tue May 16, 2023 7:37 pm
by sderrick
Just upgraded the jdk on my windows 11 laptop( i use for testing) to jdk-17, build 17.0.7+8-LTS-224. When I run our IDE I get the following error.
2023-05-16 09:22:41 INFO MBEP_IDE:180 - myGroup.EditorFrame Connecting to admin server at: https://www.mbepapers.org/
java.lang.IllegalAccessError: class com.jidesoft.plaf.LookAndFeelFactory (in unnamed module @0x75c072cb) 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 unnamed module @0x75c072cb
at com.jidesoft.plaf.LookAndFeelFactory.installJideExtension(LookAndFeelFactory.java:848)
at com.jidesoft.plaf.LookAndFeelFactory.installJideExtension(LookAndFeelFactory.java:633)
at com.jidesoft.plaf.LookAndFeelFactory.installJideExtension(LookAndFeelFactory.java:598)
at com.jidesoft.swing.JideButton.updateUI(JideButton.java:100)
at java.desktop/javax.swing.AbstractButton.init(AbstractButton.java:2141)
at java.desktop/javax.swing.JButton.<init>(JButton.java:134)
at java.desktop/javax.swing.JButton.<init>(JButton.java:88)
at com.jidesoft.swing.JideButton.<init>(JideButton.java:82)
at com.jidesoft.swing.JideButton.<init>(JideButton.java:53)
at ro.sync.ui.application.ed.<init>(Unknown Source)
at ro.sync.ui.sd$_b.<init>(Unknown Source)
at ro.sync.ui.sd$1.<init>(Unknown Source)
at ro.sync.ui.sd.<init>(Unknown Source)
at ro.sync.ui.sd.<init>(Unknown Source)
at ro.sync.ui.sd.<init>(Unknown Source)
at ro.sync.ui.h.d.<init>(Unknown Source)
at ro.sync.ui.h.d.<init>(Unknown Source)
at ro.sync.find.history.b.<init>(Unknown Source)
at ro.sync.find.d.k$7.<init>(Unknown Source)
at ro.sync.find.d.k.<init>(Unknown Source)
at ro.sync.find.d.k.qgeb(Unknown Source)
at ro.sync.ecss.extensions.api.component.AuthorComponentFactory.init(Unknown Source)
at ro.sync.ecss.extensions.api.component.AuthorComponentFactory.init(Unknown Source)
at myGroup.mbepTabbedView.<init>(mbepTabbedView.java:150)
at myGroup.mbepEditorApplet$3.run(mbepEditorApplet.java:204)
2023-05-16 09:22:42 ERROR MBEP_IDE:222 - myGroup.mbepEditorApplet$3 java.lang.IllegalAccessError: class com.jidesoft.plaf.LookAndFeelFactory (in unnamed module @0x75c072cb) 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 unnamed module @0x75c072cb
I was on a very old jdk 1.8 before the upgrade and it worked fine

I have been using jdk 17 on my work machine a linux box and have no problems. Version Java(TM) SE Runtime Environment (build 17.0.6+9-LTS-190), A tad older but pretty close.
Any idea what the problem may be on my windoze machine?
thanks
Scott

Re: Jidesoft error on load

Posted: Wed May 17, 2023 7:38 am
by Radu
Hi Scott,
Did you create the custom IDE using Oxygen's Author Component APIs? Or did you get it from a third party who created the integration for your company?
Java 17 added various constraints in the way in which libraries refer to other libraries and some of the libraries in the custom IDE you have violate this constraint.
If you start the IDE using a custom ".bat" script file you should set more parameters to the "java.exe" to enable libraries in the component to access various other libraries in the Java JDK:

Code: Select all

--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.regex=ALL-UNNAMED --add-opens=java.base/sun.net.util=ALL-UNNAMED --add-opens=java.base/sun.net.www.protocol.http=ALL-UNNAMED --add-opens=java.base/sun.net.www.protocol.https=ALL-UNNAMED --add-opens=java.desktop/java.awt=ALL-UNNAMED --add-opens=java.desktop/java.awt.dnd=ALL-UNNAMED --add-opens=java.desktop/javax.swing=ALL-UNNAMED --add-opens=java.desktop/javax.swing.text=ALL-UNNAMED --add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED --add-opens=java.desktop/com.sun.java.swing.plaf.windows=ALL-UNNAMED --add-opens=java.xml/com.sun.org.apache.xerces.internal.xni=ALL-UNNAMED --add-opens=javafx.graphics/com.sun.javafx.tk=ALL-UNNAMED --add-opens=javafx.web/javafx.scene.web=ALL-UNNAMED --add-opens=javafx.web/com.sun.javafx.webkit=ALL-UNNAMED
Regards,
Radu

Re: Jidesoft error on load

Posted: Wed May 17, 2023 5:48 pm
by sderrick
Radu,

Yes I did create the custom IDE using the author component.

That's alot of parameters! The users of the IDE use different versions of java, would there be a problem adding all of them to all the users?

thanks,

Scott

Re: Jidesoft error on load

Posted: Wed May 17, 2023 9:18 pm
by sderrick
I use jdk 17 on Linux and have no issues?

Re: Jidesoft error on load

Posted: Wed May 17, 2023 10:12 pm
by sderrick
Radu,

OK, that fixed it.

the following were flagged as unknown modules so I didn't include them.

-add-opens=javafx.graphics/com.sun.javafx.tk=ALL-UNNAMED --add-opens=javafx.web/javafx.scene.web=ALL-UNNAMED --add-opens=javafx.web/com.sun.javafx.webkit=ALL-UNNAMED

Scott

Re: Jidesoft error on load

Posted: Thu May 18, 2023 6:06 am
by Radu
Hi Scott,

So:
That's alot of parameters! The users of the IDE use different versions of java, would there be a problem adding all of them to all the users?
I think that using the --add-opens params with Java 1.8 might throw an error. But you can try.
Ideally you could bundle a Java JRE along with the component so that everyone uses the same Java.
the following were flagged as unknown modules so I didn't include them.
Right, those flagged messages are warnings so they could have been ignored. I pasted for you the entire set of add-opens that we use to start the Oxygen desktop application so you probably only need a smaller subset but having more won't hurt.

Regards,
Radu