jtype与JFreeChart,有兴趣帮助吗?
正如你可能知道,没有美丽和自由表(不是阴谋,你可以找到的例子吗http://www.jfree.org/jfreechart,http://www.rmchart.com)比上运行python模块windows / linux / mac osx.另一方面,有一个生活包(http://www.jfree.org/jfreechartjava),它是好的.所以如何使界面JFreeChart通过jpype (http://jpype.sourceforge.net),或重写JFreeChartPython启动JVM ?我试了,但由于我不知道Java,我没有走得更远.如果有人能帮我用下面的代码,或者organziepy_jfreechart团队,或者把pyFreeChart团队,这将是伟大的.谢谢
选择 | 换行 | 行号
- 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")
(味精)价值>回溯(最近的电话):文件"H: \ jfreechart-1.0.9 \ lib \ b.py",第11行jc = jpype.JClass ("org.jfree.data.DefaultKeyedValues")文件"H: \ jfreechart-1.0.9 \ lib \ jpype \ _jclass.在JClass py",行54岁提高_RUNTIMEEXCEPTION.PYEXC(无法找到类% s %的名字)jpype._jexception.ExceptionPyRaisable: . lang.例外:类org.jfree.data.DefaultKeyedValues未找到[/味精]