Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JideTabbedPane issue with LookAndFeelFactory in Linux #37

Open
mokun opened this issue Feb 16, 2019 · 2 comments
Open

JideTabbedPane issue with LookAndFeelFactory in Linux #37

mokun opened this issue Feb 16, 2019 · 2 comments

Comments

@mokun
Copy link

mokun commented Feb 16, 2019

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!

@raducoravu
Copy link

👍 One of our clients reported the same problem trying to run our Java application with the Jide OSS library on Mac OSX.

@raducoravu
Copy link

raducoravu commented Mar 20, 2019

I see that the latest code seems to have removed this problem but the released "jide-oss-3.7.6.jar" does not contain any ".class" files inside it.
Also the Maven repository seems to contain only older versions of Jide:
https://mvnrepository.com/artifact/com.jidesoft/jide-oss

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants