Page 1 of 1

Java error loading SDK

Posted: Wed Jul 18, 2018 12:55 am
by sderrick
Just tried to use our SDK editor and had this come up in the console???
java.lang.NoClassDefFoundError: com/sun/java/swing/plaf/windows/WindowsLookAndFeel
at ro.sync.util.h.f(Unknown Source)
at ro.sync.ui.application.cc.zw(Unknown Source)
at ro.sync.ui.application.cc.<init>(Unknown Source)
at ro.sync.exml.l.d.<init>(Unknown Source)
at ro.sync.exml.l.d.lpi(Unknown Source)
at ro.sync.exml.l.c.<init>(Unknown Source)
at ro.sync.ecss.extensions.api.component.AuthorComponentFactory$2.<init>(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:156)
at myGroup.mbepEditorApplet$3.run(mbepEditorApplet.java:268)
Caused by: java.lang.ClassNotFoundException: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
at jdk.deploy@10.0.1/com.sun.deploy.security.DeployURLClassLoader.findClass(DeployURLClassLoader.java:302)
at jdk.javaws@10.0.1/com.sun.jnlp.JNLPClassLoader.findClass(JNLPClassLoader.java:382)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:566)
at jdk.javaws@10.0.1/com.sun.jnlp.JNLPClassLoader.loadClass(JNLPClassLoader.java:136)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
... 11 more
On stack overflow I saw this..
In JDK 9 with modularization the L&Fs classes are not exported. In my project we are extending this class: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Scott

Re: Java error loading SDK

Posted: Wed Jul 18, 2018 7:21 am
by sderrick
I backed my jdk out to java 1.8 and the problem stopped.

Scott

Re: Java error loading SDK

Posted: Wed Jul 18, 2018 8:05 am
by Radu
Hi Scott,

Oxygen (and Author Component also) officially only supports only Java 1.8.
But we put some work into this recently.
What version of the Author Component are you using? If you switch to using our 20.1 SDK things should improve and you may be able to get it to work also with Java 9. But if Java 9 is not compulsory for your project, you should stick to Java 1.8 for now.

Regards,
Radu

Re: Java error loading SDK

Posted: Wed Jul 18, 2018 6:05 pm
by sderrick
OK, we'll stay with 1.8 until you give the all clear.

Re: Java error loading SDK

Posted: Sun Jun 04, 2023 11:41 pm
by sderrick
Radu,

I completely forgot about the com.sun.java.swing.plaf.windows.WindowsLookAndFeel issue on building with jdk's newer than 1.8.

I was fooling around with a new build machine and set the source to a jdk 11 and saw the error.

Still restricted to 1.8 for the sdk?

thanks,

Scott

Re: Java error loading SDK

Posted: Mon Jun 05, 2023 5:31 am
by Radu
Hi Scott,
Starting with version 26 (Autumn this year) our entire code base (including the SDK) will be built with Java 11 so you will need Java 11 or newer to use the SDK.
Regards,
Radu

Re: Java error loading SDK

Posted: Tue Jun 06, 2023 9:41 pm
by sderrick
Radu,
I am planning on including a jre with our IDE that has the author component in it to eliminate the compatibility problems.
Right now we are restricted to using jre-1.8. Anything newer and it fails because of the java.lang.NoClassDefFoundError: com/sun/java/swing/plaf/windows/WindowsLookAndFeel problem.

Your post indicates that will no longer be the case with the release of Author 26? At that point I must use(bundle) jre-11 or newer? Is that correct?

thanks,

Scott

Re: Java error loading SDK

Posted: Wed Jun 07, 2023 5:58 am
by Radu
Hi Scott,
Yes, this is correct.
Regards,
Radu