---
title: 编译Jython-standalone-2.7.0
description: "请参见《Jline 移植指南（CentOS&openEuler）(https://www.hikunpeng.com/document/detail/zh/kunpengbds/ecosystemEnable/tpdl/kunpengjline21x_02_0001.html)》文档进行编译。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengbds/ecosystemEnable/tpdl/kunpengjython_02_0006.html
sourcePath: /source/zh/kunpengbds/ecosystemEnable/tpdl/kunpengjython_02_0006.html
indexId: 6323e8e9a686be40a06c09101e36d449afbb682d4a8576e7fa472cc80bb61bcd69
---
# 编译Jython-standalone-2.7.0

#### 编译jline-2.12.1.jar

请参见《Jline 移植指南（CentOS&openEuler）(https://www.hikunpeng.com/document/detail/zh/kunpengbds/ecosystemEnable/tpdl/kunpengjline21x_02_0001.html)》文档进行编译。


#### 编译jffi-arm-Linux.jar

1. 下载jffi-1.2.19。
  1 wget https://github.com/jnr/jffi/archive/jffi-1.2.19.tar.gz

2. 解压jffi-1.2.19。
  1 2 tar -xf jffi-1.2.19.tar.gz cd jffi-jffi-1.2.19

3. 进行编译。
  1 ant jar && ant archive-platform-jar && mvn package

4. 编译成功后，使用“dist”目录下的jffi-aarch64-Linux.jar替换“jython-2.7.0/extlibs”目录下的jffi-arm-Linux.jar。
  1 cp jffi-aarch64-Linux.jar jython-2.7.0/extlibs/jffi-arm-Linux.jar


#### 编译jython-2.7.0

1. 下载源码。
  1 wget https://github.com/jythontools/jython/archive/v2.7.0.tar.gz

2. 解压源码。
  1 tar -xf v2.7.0.tar.gz

3. 进入Jython解压目录。
  1 2 mv frozen-mirror-2.7.0 jython-2.7.0 cd jython-2.7.0

  将编译jline-2.12.1.jar编译出来的jline-2.12.1.jar拷贝到jython-2.7.0的extlibs目录下。 1 cp jline-2.12.1.jar jython-2.7.0/extlibs/

4. 执行编译。
  1 ant jar-standalone

  编译成功后将会生成新目录“dist”。

  首次编译jython-2.7.0时失败，可尝试再次执行ant jar-standalone，编译成功。
