Using Jython From Eclipse Plugin

天涯浪子 提交于 2019-12-04 12:24:01

Finally figure this one out. Here is what I had to do:

1) I used the JSR223 ScriptEngine instead of PythonInterpreter:

engine.get(module_name); //gets the class object of the module getConstructors[0].newInstance(null) on the class to get an object
//cast it to your interface!

2) Make sure your Eclipse plugin isn't packaged as a jar (in 3.5 set Eclipse-BundleShape: dir)
3) Add jython.jar and any paths where you want to locate modules to your Runtime Classpath in the Manifest.

Hope this helps someone.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!