将Jython脚本转换为.jar文件 [英] Convert Jython scripts to .jar file

查看:99
本文介绍了将Jython脚本转换为.jar文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直试图将jython脚本转换为.jar文件.我跟着,

用Jython将我的Python脚本作为JAR文件分发吗?

上面的链接以及其中显示的Jython Wiki链接均使用名为"zip"的命令行脚本.就像=> zip myapp.jar Lib

等等.我在Windows计算机上,因此在命令行上找不到"zip"脚本,可能是它的Linux脚本.帮我在Windows机器上做

第二个是,我的jython脚本中使用的外部.jar很少,为此,上面的链接说使用清单.但是我想将所有外部jar打包到单个myapp.jar(例如)文件中以运行.就像java -jar myapp.jar一样,有没有办法打包外部jar?

所以请帮助我解决这个问题

解决方案

您可以使用jar命令将文件添加到.jar存档中.就像:

jar uvf jythonlib.jar Lib

使用jar查看有关选项和用法示例的帮助.

I have been trying to convert jython scripts to .jar file. I followed,

Distributing my Python scripts as JAR files with Jython?

The link above and also the Jython wiki link shown inside it use a command line script called, "zip". Its like => zip myapp.jar Lib

and so. I am on windows machine, so I couldn't find any script as "zip" on my command line, may be its a Linux script. Help me to do it in windows machine

Second is I have few external .jar's that are used in my jython scripts, for this the above link says to use manifest. But I want to package all external jars into single myapp.jar(for example) file to be running. Just like java -jar myapp.jar, so is there any way to package external jars also?

So please help me resolve this

解决方案

You can use jar command to add files to .jar archive. Just like:

jar uvf jythonlib.jar Lib

Use jar to see help with options and examples of usage.

这篇关于将Jython脚本转换为.jar文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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