使用Jython与M2Eclipse [英] Using Jython with M2Eclipse

查看:186
本文介绍了使用Jython与M2Eclipse的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在大多数Java开发中使用 M2Eclipse ,而 Pydev ,用于Eclipse中的Python / Jython开发。我想使用Jython来在我的Java项目中对原型和测试类进行测试。 M2Eclipse插件自动管理Maven pom.xml文件中定义的所有依赖项。



Pydev是否有利用这些依赖关系,而不必单独导入每个jar?

解决方案

实际上,我没有得到如何在Eclipse下使用Jython,并且需要单独导入jar。这与Pydev有关吗?还有什么?无论如何,即使我不确定它会解决您的所有问题,也许 maven-jython -plugin 可以帮助。它提供以下功能:



  • 轻松启动交互式Jython shell

  • 将主要Jython源文件编译为Java类
  • 将测试Jython源文件编译为Java类

  • 推断包结构使生活更简单



I currntly use M2Eclipse for the majority of my Java development and Pydev for Python/Jython development within Eclipse. I would like to use Jython to prototype and test classes within my Java projects. The M2Eclipse plugin manages all the dependencies defined in the Maven pom.xml file automatically.

Is there anyway for Pydev to utilise these dependencies without having to import each jar separately?

解决方案

Actually, I didn't get how you are working with Jython under Eclipse and where you need to import jars separately. Is this related to Pydev? Something else? Anyway, even if I'm not sure it will solve all your issues, maybe the maven-jython-plugin can help. It offers the following features:

  • Easily fire up an interactive Jython shell
  • Compile main Jython source files to Java classes
  • Compile test Jython source files to Java classes
  • Inferred package structure to make life simpler

这篇关于使用Jython与M2Eclipse的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆