带有 JavaSE 的 Jython Netbeans

发布于 2024-07-14 16:07:06 字数 346 浏览 4 评论 0原文

我想开发一个将 java 与 jython 混合的 Java 应用程序。 我正在使用带有 python 插件的 IDE Netbeans。 我该如何开展这方面的工作? (有一个对 Groovy 的内置支持,其中 javaSE 从 IDE 调用来自 Java 代码的 Groovy 类,以及来自 Groovy 代码的 Java 类,但不适用于 jython)

参考: http://www.netbeans.org/features/groovy/index.html

I want to develop a Java application mixing java with jython. I am using the IDE Netbeans with the python plugin. How do i work on this? (There is a built in support for Groovy with javaSE from IDE call Groovy classes from Java code, and Java classes from Groovy code but not for jython)

ref: http://www.netbeans.org/features/groovy/index.html

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

遗忘曾经 2024-07-21 16:07:06

Netbeans 6.5 同时支持 Python 和 Jython。

http://www.netbeans.org/features/python/

假设您正在使用该对于带有 Python 插件的版本,只需通过平台管理器设置您希望使用的运行时(在这里您可以选择 Jython)。

替代文本 http://img15.imageshack.us/img15/1586/platformmanager.png< /a>

Netbeans 6.5 supports both Python and Jython.

http://www.netbeans.org/features/python/

Assuming you are using that version with the Python plug-in, it's just a matter of setting the runtime you wish to use via the platform manager (here's where you would choose Jython).

alt text http://img15.imageshack.us/img15/1586/platformmanager.png

最好是你 2024-07-21 16:07:06

我还想补充一点,自 6.5 版本以来,Python 部分已经得到了极大的改进。 因此,如果您想尝试新的但不稳定的版本,请从 http:// deadlock.netbeans.org/hudson/job/python/

另外,请参阅 http 链接的各种文档://wiki.netbeans.org/Python 和我的博客文章 http:// /amitksaha.blogspot.com/search/label/nbpython

如果出现问题,请在邮件列表中告知我们。

I would also want to add that since 6.5 release, the Python bits have been vastly improved upon. So, if you want to try the new but unstable builds, please grab one from http://deadlock.netbeans.org/hudson/job/python/

Also, please refer to various documents linked from http://wiki.netbeans.org/Python and my blog posts at http://amitksaha.blogspot.com/search/label/nbpython

In case of problems, please let us know on the mailing list.

洋洋洒洒 2024-07-21 16:07:06

如果您想开发一个与 Jython 混合并在 NetBeans 之外工作的 Java应用程序,那么 NB 使用 Jython 运行时的能力并没有多大帮助。 相反,您基本上有两种选择:

  • 您可以使用 jythonc 将 Python 编译为 Java 类。
  • 或者:您可以将 Jython 解释器嵌入到您的 Java 应用程序中。

要嵌入,您需要创建一个 Jython 库以包含在您的 Java 应用程序中。 通过转到工具 -> 来执行此操作 库,选择“新建库”,然后将内容添加到 NetBeans 的 Jython 目录中(在我的计算机中为 C:\Program Files\NetBeans 6.5\python1\jython-2.5)。 您需要 jython.jar 以及 javalib 目录中的至少大部分内容。

If you want to develop a Java application that blends with Jython and works outside NetBeans, then NB's ability to use Jython runtime doesn't help much. Instead, you have basically two choices:

  • You can compile your Python to Java classes using jythonc.
  • Or: you can embed the Jython interpreter inside your Java app.

To embed, you need to create a Jython library to be included in your Java app. Do this by going to Tools -> Libraries, select New Library, and add the stuff at NetBeans' Jython directory there (C:\Program Files\NetBeans 6.5\python1\jython-2.5 in my machine). You need jython.jar and at least most of the stuff at the javalib directory.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文