jpype with JFreeChart, anyone interested to help?

O

oyster

As you may know, there is no beautiful and free chart(not plot, you
can find the examples at http://www.jfree.org/jfreechart,
http://www.rmchart.com) module for python than runs on
windows/linux/mac osx.

On the other hand, there is a living
package(http://www.jfree.org/jfreechart) for java, and it is nice. So
what about make the interface to JFreeChart via
jpype(http://jpype.sourceforge.net), or rewrite JFreeChart in and for
Python to kick off JVM?

I have tried this, but since I don't know Java, I did not go further.
If anyone can help me with the following code, or organzie a
py_jfreechart team, or put up a pyFreeChart team, that would be great.

Thanks

Code:
import jpype

p=r'e:\Java\j2re1.4.0\bin\client\jvm.dll'
jpype.startJVM(p,
r'-Djava.class.path=h:\jfreechart-1.0.9\lib\jfreechart-1.0.9.jar' )

pkg=jpype.JPackage("org.jfree.data")
print pkg.DefaultKeyedValues
print pkg.DefaultKeyedValues.DefaultKeyedValues
print pkg.DefaultKeyedValues.DefaultKeyedValues.DefaultKeyedValues

jc=jpype.JClass("org.jfree.data.DefaultKeyedValues")

[msg]
<Java package org.jfree.data.DefaultKeyedValues>
<Java package org.jfree.data.DefaultKeyedValues.DefaultKeyedValues>
<Java package org.jfree.data.DefaultKeyedValues.DefaultKeyedValues.DefaultKeyedV
alues>
Traceback (most recent call last):
File "H:\jfreechart-1.0.9\lib\b.py", line 11, in <module>
jc=jpype.JClass("org.jfree.data.DefaultKeyedValues")
File "H:\jfreechart-1.0.9\lib\jpype\_jclass.py", line 54, in JClass
raise _RUNTIMEEXCEPTION.PYEXC("Class %s not found" % name)
jpype._jexception.ExceptionPyRaisable: java.lang.Exception: Class
org.jfree.data.DefaultKeyedValues not found
[/msg]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top