Missing packages
Missing packages
where can I find the package org.jfree.ui and org.jfree.util ?
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Those packages are part of JCommon.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
Thanks a lot. Now I can compile the file but when I run it, it comes up with the following error.
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.jfree.chart.ChartFactory.createPieChart(ChartFactory.java:242)
at First.main(First.java:17)
Caused by: java.util.MissingResourceException: Can't find bundle for base name org.jfree.chart.resources.JFreeChartResources, locale en_GB
at java.util.ResourceBundle.throwMissingResourceException(Unknown Source)
at java.util.ResourceBundle.getBundleImpl(Unknown Source)
at java.util.ResourceBundle.getBundle(Unknown Source)
at org.jfree.chart.JFreeChartInfo.<init>(JFreeChart.java:1550)
at org.jfree.chart.JFreeChart.<clinit>(JFreeChart.java:230)
... 2 more
Please help.
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.jfree.chart.ChartFactory.createPieChart(ChartFactory.java:242)
at First.main(First.java:17)
Caused by: java.util.MissingResourceException: Can't find bundle for base name org.jfree.chart.resources.JFreeChartResources, locale en_GB
at java.util.ResourceBundle.throwMissingResourceException(Unknown Source)
at java.util.ResourceBundle.getBundleImpl(Unknown Source)
at java.util.ResourceBundle.getBundle(Unknown Source)
at org.jfree.chart.JFreeChartInfo.<init>(JFreeChart.java:1550)
at org.jfree.chart.JFreeChart.<clinit>(JFreeChart.java:230)
... 2 more
Please help.
now I fixed the bundle problem and I can run First.java successfully. However I got the following error msg when I ran LineChartDemo1:
F:\Works\Others\jfreechart-1.0.3\source>java LineChartDemo1
Exception in thread "main" java.lang.NoClassDefFoundError: LineChartDemo1 (wrong name: demo/LineChartDemo1)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
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)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
How can I fix it? Thanks
F:\Works\Others\jfreechart-1.0.3\source>java LineChartDemo1
Exception in thread "main" java.lang.NoClassDefFoundError: LineChartDemo1 (wrong name: demo/LineChartDemo1)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
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)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
How can I fix it? Thanks
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
You need to spend some time learning about packages, the classpath, and other Java fundamentals, before you start messing around with third party libraries like JFreeChart.
The "problem" here is that LineChartDemo1 is declared to be in the 'demo' package, so it should appear in a 'demo' subdirectory somewhere on your classpath. But you are running it with 'java LineChartDemo1', so it sounds like you compiled it in the top-level directory (you ought to be running it with 'java -classpath {your classpath here} demo.LineChartDemo1'.
The "problem" here is that LineChartDemo1 is declared to be in the 'demo' package, so it should appear in a 'demo' subdirectory somewhere on your classpath. But you are running it with 'java LineChartDemo1', so it sounds like you compiled it in the top-level directory (you ought to be running it with 'java -classpath {your classpath here} demo.LineChartDemo1'.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program