Launch4J Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/jfree/data/xy/XYDataset

973 views Asked by At

I dont know if there is a problem with my invoking method for the Jframes or is it a problem with the Launch4J configs.

I currently have a welcome Frame which presents two options, selecting one will open the corresponding Jframe and continue with the program.

While testing on Netbeans IDE the program runs without problems and shows the panels accordingly.

The problem is that I packed the program with Launch4J and the program runs only to stay on the first panel and whenever you choose an option it will just close.

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                         
if(opcionMetodo==1){
     try {
        for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
            if ("Windows Classic".equals(info.getName())) {
                javax.swing.UIManager.setLookAndFeel(info.getClassName());
                break;
            }
        }
    } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) {
        java.util.logging.Logger.getLogger(FauryJoisel.class
                .getName()).log(java.util.logging.Level.SEVERE, null, ex);
    }
    java.awt.EventQueue.invokeLater(() -> {
        new FauryJoisel().setVisible(true);
    });
    dispose();
   // JOptionPane.showMessageDialog(jOptionPane2, "Ingresa y Verifica todos los Campos", "NO OLVIDES", INFORMATION_MESSAGE);

}else if(opcionMetodo==0){
    try {
        for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
            if ("Windows Classic".equals(info.getName())) {
                javax.swing.UIManager.setLookAndFeel(info.getClassName());
                break;
            }
        }
    } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) {
        java.util.logging.Logger.getLogger(FauryJoisel.class
                .getName()).log(java.util.logging.Level.SEVERE, null, ex);
    }
    java.awt.EventQueue.invokeLater(() -> {
        new Faury().setVisible(true);
    });
    dispose();
    //JOptionPane.showMessageDialog(jOptionPane2, "Ingresa y Verifica todos los Campos", "NO OLVIDES", INFORMATION_MESSAGE);
}       


}   

Thats my invoking code on the Welcome frame, from a button-action it calls the selected Jframe.

Launch4J error Log while testing the program

Executing: C:\Users\ssd\Desktop\Dosificador 2015.exe
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError:     org/jfree/data/xy/XYDataset
at Frames.Bienvenido.lambda$jButton1ActionPerformed$0(Bienvenido.java:182)
at Frames.Bienvenido$$Lambda$17/1094521478.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.jfree.data.xy.XYDataset
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 16 more

Thanks in advance

0

There are 0 answers