简体   繁体   English

使用Java Eclipse执行Jython脚本

[英]Execute Jython script using java eclipse

Am trying to execute a complete Jython project using java eclipse 3.4.. I have configured Jython environment in my eclipse..I went through certain tutorials which described about Building a factory.. But i guess that method can be used to execute applications that are specific to a particular Jython module.. What I exactly need is:: 我正在尝试使用java eclipse 3.4执行完整的Jython项目。.我已经在eclipse中配置了Jython环境。.我经历了一些有关建造工厂的教程。.但是我想该方法可用于执行以下应用程序:特定于特定的Jython模块。我真正需要的是::

To run the entire Jython project as a java application, by using the .class file created in the Jython project.. 通过使用在Jython项目中创建的.class文件,将整个Jython项目作为Java应用程序运行。

Not sure if this is feasible.. Suggestions please.. 不知道这是否可行..请提出建议。

One Java class with an embedded PythonInterpreter is capable of kicking off an entire Jython application. 一个带有嵌入式PythonInterpreter的Java类能够启动整个Jython应用程序。 May need to play around with setting the appropriate python.home and library paths, look in the PyServletInitializer and PyFilter for examples of how this is done. 可能需要设置适当的python.home和库路径,请在PyServletInitializer和PyFilter中查找有关如何完成此操作的示例。

Another option is use PyDev and just run a Jython script to start the application, bypassing the need for a Java application all together. 另一种选择是使用PyDev并仅运行Jython脚本来启动应用程序,而完全不需要Java应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM