Jython的安装教程

一、首先安装JDK,安装方法自行百度,可参考:

https://blog.csdn.net/wph199505110014/article/details/79254506

二、下载Jython

官网下载地址:http://www.jython.org/downloads.html

下载完成后找到安装包

三、Jython安装

官网有安装步骤,网址:https://wiki.python.org/jython/InstallationInstructions

Jython 2.7.1

Basic Install

Jython 2.7.1 is distributed via an executable jar file installer. Afterdownloading it, either double click thejython_installer-2.7.1.jar or run java with the -jar option

java -jar jython_installer-2.7.1.jar

This will start the regular GUI installer on most systems, or aconsole installer on headless systems. To force the installer towork in headless mode invoke the installer as:

java -jar jython_installer-2.7.1.jar --console

The installer will then walk through a similar set of steps ingraphical or console mode: showing the license, selecting an installdirectory and JVM and actually copying Jython to the filesystem.After this completes, Jython is installed in the directory youselected. Executing a script in the install directory, jython on Unix-like systems or jython.exe on Windows, will start up the Jythonconsole, which can be used to dynamically explore Jython and the Javaruntime, or to run Jython scripts.

Standalone mode

The standalone option does no caching and so avoids the startup overhead (most likely at the cost of some speed in calling Java classes, but I have not profiled it)

You can try it out by running the installer:

$ java -jar jython_installer-2.7.1.jar

then when you come to the "Installation type" page, select "Standalone".

The installation will generate a jython.jar with the Python standard library (/Lib) files included, which can be run as:

$ java -jar jython.jar

Of course you can run scripts just by calling them as you might expect:

$ java -jar jython.jar script.py

Or, add this file to the classpath of your application.

Installation options

You can get a list of installer options (to install Jython unattended, for example) by running:

$ java -jar jython_installer-2.7.1.jar --help

上面是官方的安装说明,下面我们采用默认安装,上图:


到此,jython安装完成!


评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

魔都飘雪

您的1毛奖励是我创作的源源动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值