-
Notifications
You must be signed in to change notification settings - Fork 84
Open
Description
I have WebLaF installed.
I called the following
LookAndFeelFactory.installJideExtension(LookAndFeelFactory.VSNET_STYLE);
right before I setup the JideTabbedPane as follows :
JideTabbedPane tabPanel = new JideTabbedPane();
In windows, it works well.
Somehow it doesn't work well in linux and keeps throwing ClassNotFoundException in my app.
It can be traced to this line in LookAndFeelFactory class calling the method
else if (isWindowsLookAndFeel(lnf)) { ...
/**
* As of Java 10, com.sun.java.swing.plaf.windows.WindowsLookAndFeel is no longer available on macOS thus
* "instanceof WindowsLookAndFeel" directives will result in a NoClassDefFoundError during runtime. This method
* was introduced to avoid this exception.
*
* @param lnf
* @return true if it is a WindowsLookAndFeel.
*/
public static boolean isWindowsLookAndFeel(LookAndFeel lnf) {
if (lnf == null) {
return false;
}
else {
try {
Class c = Class.forName(WINDOWS_LNF);
return c.isInstance(lnf);
}
catch (ClassNotFoundException | NoClassDefFoundError ignore) {
// if it is not possible to load the Windows LnF class, the
// given lnf instance cannot be an instance of the Windows
// LnF class
return false;
}
}
}
Please help!
Metadata
Metadata
Assignees
Labels
No labels