Im working on app that will show charts. I did already working classes using JFreeChart. I want to use them in other project. Im exporting it into "runnable jar with package required libraries into jar" option. When I add jar into new project I can see in referenced libraries my classes which I made and JFree libraries but when Im trying to use it, I get:
Exception in thread "main" java.lang.NoClassDefFoundError: org/jfree/chart/ChartPanel
Caused by: java.lang.ClassNotFoundException: org.jfree.chart.ChartPanel
Something like that works fine in project where I wrote classes:
Statistics stat=new Statistics(new Cards(path)); //showing chart
And same thing in new project with imported jar causes errors.