|
JFreeChart in jython AttributeError: no attribute 'JFreeChart: msg#00032lang.jython.user
I'm trying to use the JFreeChart library through jython. Right now I'm trying to run the first example from http://net.pku.edu.cn/~shenjian/documents/Java/jfreechart_tutorial.pdf from jython. My problem is that I can't seem to get a hold of the JFreeChart class: Jython 2.1 on java1.4.2-03 (JIT: null) Type "copyright", "credits" or "license" for more information. > > import os, sys*sys-package-mgr*: processing modified jar, '/home/lekang/test/lib/jcommon-1.0.0.jar' *sys-package-mgr*: processing modified jar, '/home/lekang/test/lib/jcommon-xml-1.0.0.jar' *sys-package-mgr*: processing modified jar, '/home/lekang/test/lib/jcommon-xml.jar' *sys-package-mgr*: processing modified jar, '/home/lekang/test/lib/jfreechart-1.0.1.jar' > > from org.jfree import chart['ChartColor', 'ChartFactory', 'ChartFrame', 'ChartMouseEvent', 'ChartMouseListener', 'ChartPanel', 'ChartRenderingInfo', 'ChartUtilities', 'ClipPath', 'DrawableLegendItem', 'Effect3D', 'JFreeChart', 'JFreeChartInfo', 'LegendItem', 'LegendItemCollection', 'LegendItemSource', 'LegendRenderingOrder', 'PolarChartPanel', '__name__', 'annotations', 'axis', 'block', 'demo', 'editor', 'encoders', 'entity', 'event', 'imagemap', 'labels', 'needle', 'plot', 'renderer', 'resources', 'servlet', 'title', 'urls'] > > from org.jfree.chart import JFreeChartTraceback (innermost last): File "<console>", line 1, in ? ImportError: cannot import name JFreeChart > > dir (chart.JFreeChart)Traceback (innermost last): File "<console>", line 1, in ? AttributeError: java package 'org.jfree.chart' has no attribute 'JFreeChart' Or alternatively: ['ChartColor', 'ChartFactory', 'ChartFrame', 'ChartMouseEvent', 'ChartMouseListener', 'ChartPanel', 'ChartRenderingInfo', 'ChartUtilities', 'ClipPath', 'DrawableLegendItem', 'Effect3D', 'JFreeChart', 'JFreeChartInfo', 'LegendItem', 'LegendItemCollection', 'LegendItemSource', 'LegendRenderingOrder', 'PolarChartPanel', '__doc__', '__name__', 'annotations', 'axis', 'block', 'demo', 'editor', 'encoders', 'entity', 'event', 'imagemap', 'labels', 'needle', 'os', 'plot', 'renderer', 'resources', 'servlet', 'sys', 'title', 'urls']from org.jfree.chart import * Traceback (innermost last):dir(JFreeChart) File "<console>", line 1, in ? java.lang.NullPointerException at java.lang.Class.isAssignableFrom(Native Method) at org.python.core.PyJavaClass.init__class__(PyJavaClass.java:155) at org.python.core.PyJavaClass.init(PyJavaClass.java:213) at org.python.core.PyJavaClass.initLazy(PyJavaClass.java:89) at org.python.core.PyJavaClass.initialize(PyJavaClass.java:105) at org.python.core.PyJavaClass.__tojava__(PyJavaClass.java:860) at org.python.core.ReflectedArgs.matches(ReflectedArgs.java:111) at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:131) at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:168) at org.python.core.PyObject.__call__(PyObject.java:270) at org.python.pycode._pyx5.f$0(<console>:1) at org.python.pycode._pyx5.call_function(<console>) at org.python.core.PyTableCode.call(PyTableCode.java:208) at org.python.core.PyCode.call(PyCode.java:14) at org.python.core.Py.runCode(Py.java:1135) at org.python.core.Py.exec(Py.java:1157) at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:148) at org.python.util.InteractiveInterpreter.runcode(InteractiveInterpreter.java:89) at org.python.util.InteractiveInterpreter.runsource(InteractiveInterpreter.java:70) at org.python.util.InteractiveInterpreter.runsource(InteractiveInterpreter.java:44) at org.python.util.InteractiveConsole.push(InteractiveConsole.java:83) at org.python.util.InteractiveConsole.interact(InteractiveConsole.java:62) at org.python.util.jython.main(jython.java:199) java.lang.NullPointerException: java.lang.NullPointerException regards. -- Øystein Lekang
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Evals from Java, Jake Eakle |
|---|---|
| Next by Date: | Re: Evals from Java, Jeff Emanuel |
| Previous by Thread: | Evals from Java, Jake Eakle |
| Next by Thread: | Where do we go from here to get to 2.2 "proper" ?, Walter Chang |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |