Ciao ragazzi,
mi sono accorto di un problemino... sto lavorando con netbeans, e sono solito eseguire la mia applicazione dall'ambiente netbeans. Tempo fa avevo provato a doppio cliccare il .jar che netbeans genera, ed avevo visto che eseguiva correttamente.
Oggi ho riprovato, e doppio cliccando (o facendo java -jar MioProg.jar) ottengo degli errori e l'applicazione non parte.. eseguendo da netbeans tutto tranquillo invece.
L'unica cosa che ho fatto di recente è stata installare JFreeChart, ed infatti l'errore che ottengo nomina una classe di questa api:
non so, ho fatto anche un'altra prova con JFreeChart, installato in modo analogo a quanto fatto per questo progetto, e questa prova parte al doppio click sul jar...codice:Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/jfree/data/general/DefaultPieDataset at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at java.awt.Component.isCoalesceEventsOverriden(Unknown Source) at java.awt.Component.access$500(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Component.checkCoalescing(Unknown Source) at java.awt.Component.<init>(Unknown Source) at java.awt.Container.<init>(Unknown Source) at java.awt.Window.<init>(Unknown Source) at java.awt.Frame.<init>(Unknown Source) at java.awt.Frame.<init>(Unknown Source) at javax.swing.JFrame.<init>(Unknown Source) at green.GreenBuilding.<init>(GreenBuilding.java:35) at green.GreenBuilding$16.run(GreenBuilding.java:823) at java.awt.event.InvocationEvent.dispatch(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.general.DefaultPieDataset at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) 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) ... 25 more
che può essere? Stavo guardando se trovavo qualcosa tipo un classpath particolare o argomenti che netbeans aggiunge, ma non sto vedendo niente di che...
vi ringrazio!