{"id":1160154,"date":"2025-01-13T19:01:38","date_gmt":"2025-01-13T11:01:38","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1160154.html"},"modified":"2025-01-13T19:01:40","modified_gmt":"2025-01-13T11:01:40","slug":"python%e4%b8%ad%e5%a6%82%e4%bd%95%e5%86%99java","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1160154.html","title":{"rendered":"python\u4e2d\u5982\u4f55\u5199java"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25201707\/8d389a9b-cb13-4595-8d43-6f7d73f7997f.webp\" alt=\"python\u4e2d\u5982\u4f55\u5199java\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\u5199Java\u4ee3\u7801\u7684\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528Jython\u3001\u901a\u8fc7Shell\u547d\u4ee4\u8c03\u7528Java\u7a0b\u5e8f\u3001\u4f7f\u7528PyJNIus\u5e93\u3001\u901a\u8fc7Jpype\u5e93\u8c03\u7528Java\u4ee3\u7801\u3001\u4f7f\u7528Py4J\u5e93\u8c03\u7528Java\u4ee3\u7801\u3002\u4ee5\u4e0b\u662f\u8be6\u7ec6\u63cf\u8ff0\uff1a<\/strong><\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\u5199Java\u4ee3\u7801\u7684\u76f4\u63a5\u65b9\u6cd5\u5e76\u4e0d\u662f\u4e3b\u6d41\u7f16\u7a0b\u5b9e\u8df5\uff0c\u4f46\u6709\u51e0\u79cd\u65b9\u6cd5\u53ef\u4ee5\u5728Python\u7a0b\u5e8f\u4e2d\u96c6\u6210Java\u4ee3\u7801\u3002\u8fd9\u4e9b\u65b9\u6cd5\u4e2d\uff0c\u4f7f\u7528Jython\u662f\u6700\u76f4\u63a5\u7684\u4e00\u79cd\u3002Jython\u662fPython\u8bed\u8a00\u7684Java\u5b9e\u73b0\uff0c\u5b83\u5141\u8bb8Python\u4ee3\u7801\u4e0eJava\u4ee3\u7801\u65e0\u7f1d\u96c6\u6210\uff0c\u751a\u81f3\u53ef\u4ee5\u76f4\u63a5\u7f16\u5199\u548c\u8fd0\u884cJava\u4ee3\u7801\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001Jython<\/h3>\n<\/p>\n<p><p>Jython\u662fPython\u8bed\u8a00\u5728Java\u5e73\u53f0\u4e0a\u7684\u5b9e\u73b0\u3002\u4e0eC-Python\u4e0d\u540c\uff0cJython\u7f16\u8bd1Python\u4ee3\u7801\u4e3aJava\u5b57\u8282\u7801\uff0c\u80fd\u591f\u4e0eJava\u5e73\u53f0\u4e0a\u7684\u6240\u6709Java\u7c7b\u5e93\u65e0\u7f1d\u6574\u5408\u3002\u4f7f\u7528Jython\uff0c\u4f60\u53ef\u4ee5\u5728Python\u811a\u672c\u4e2d\u76f4\u63a5\u7f16\u5199Java\u4ee3\u7801\uff0c\u8c03\u7528Java\u7c7b\u548c\u5e93\u3002<\/p>\n<\/p>\n<p><h4>\u5b89\u88c5Jython<\/h4>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u4f60\u9700\u8981\u5b89\u88c5Jython\u3002\u53ef\u4ee5\u4eceJython\u7684\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7dJython\u7684\u5b89\u88c5\u5305\uff0c\u5e76\u6309\u7167\u5b89\u88c5\u8bf4\u660e\u8fdb\u884c\u5b89\u88c5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">java -jar jython-installer-2.7.2.jar<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>\u7f16\u5199Jython\u811a\u672c<\/h4>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f60\u53ef\u4ee5\u5f00\u59cb\u7f16\u5199Jython\u811a\u672c\u3002\u4f8b\u5982\uff0c\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684Jython\u811a\u672c\uff0c\u5b83\u8c03\u7528\u4e86Java\u7684<code>java.util<\/code>\u5305\u4e2d\u7684<code>ArrayList<\/code>\u7c7b\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from java.util import ArrayList<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2aArrayList\u5bf9\u8c61<\/strong><\/h2>\n<p>list = ArrayList()<\/p>\n<p>list.add(&quot;Hello&quot;)<\/p>\n<p>list.add(&quot;World&quot;)<\/p>\n<h2><strong>\u6253\u5370ArrayList\u4e2d\u7684\u5143\u7d20<\/strong><\/h2>\n<p>for item in list:<\/p>\n<p>    print(item)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>\u4f7f\u7528Java\u7c7b\u5e93<\/h4>\n<\/p>\n<p><p>Jython\u5141\u8bb8\u4f60\u4f7f\u7528Java\u7c7b\u5e93\uff0c\u5c31\u50cf\u4f7f\u7528Python\u5e93\u4e00\u6837\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\uff0c\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528Java\u7c7b\u5e93\u5728Jython\u4e2d\u8fdb\u884c\u6587\u4ef6\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from java.io import File<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2aFile\u5bf9\u8c61<\/strong><\/h2>\n<p>file = File(&quot;test.txt&quot;)<\/p>\n<h2><strong>\u68c0\u67e5\u6587\u4ef6\u662f\u5426\u5b58\u5728<\/strong><\/h2>\n<p>if file.exists():<\/p>\n<p>    print(&quot;File exists&quot;)<\/p>\n<p>else:<\/p>\n<p>    print(&quot;File does not exist&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u901a\u8fc7Shell\u547d\u4ee4\u8c03\u7528Java\u7a0b\u5e8f<\/h3>\n<\/p>\n<p><p>\u53e6\u4e00\u79cd\u65b9\u6cd5\u662f\u901a\u8fc7Python\u7684subprocess\u6a21\u5757\u8c03\u7528Java\u7a0b\u5e8f\u3002\u8fd9\u79cd\u65b9\u6cd5\u9002\u7528\u4e8e\u4f60\u5df2\u7ecf\u6709\u4e00\u4e2aJava\u7a0b\u5e8f\uff0c\u5e76\u5e0c\u671b\u4ecePython\u811a\u672c\u4e2d\u8c03\u7528\u5b83\u3002<\/p>\n<\/p>\n<p><h4>\u7f16\u5199Java\u7a0b\u5e8f<\/h4>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u7f16\u5199\u4e00\u4e2a\u7b80\u5355\u7684Java\u7a0b\u5e8f\uff0c\u4f8b\u5982<code>HelloWorld.java<\/code>\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-java\">public class HelloWorld {<\/p>\n<p>    public static void m<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>n(String[] args) {<\/p>\n<p>        System.out.println(&quot;Hello, World!&quot;);<\/p>\n<p>    }<\/p>\n<p>}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u7f16\u8bd1\u8fd9\u4e2aJava\u7a0b\u5e8f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">javac HelloWorld.java<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>\u4f7f\u7528Python\u8c03\u7528Java\u7a0b\u5e8f<\/h4>\n<\/p>\n<p><p>\u7136\u540e\uff0c\u4f60\u53ef\u4ee5\u7f16\u5199\u4e00\u4e2aPython\u811a\u672c\uff0c\u901a\u8fc7subprocess\u6a21\u5757\u8c03\u7528\u8fd9\u4e2aJava\u7a0b\u5e8f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import subprocess<\/p>\n<h2><strong>\u8c03\u7528Java\u7a0b\u5e8f<\/strong><\/h2>\n<p>result = subprocess.run([&#39;java&#39;, &#39;HelloWorld&#39;], stdout=subprocess.PIPE)<\/p>\n<p>print(result.stdout.decode(&#39;utf-8&#39;))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528PyJNIus\u5e93<\/h3>\n<\/p>\n<p><p>PyJNIus\u662f\u4e00\u4e2a\u5141\u8bb8Python\u4ee3\u7801\u8c03\u7528Java\u4ee3\u7801\u7684\u5e93\u3002\u5b83\u4f7f\u7528JNI\uff08Java Native Interface\uff09\u6765\u5b9e\u73b0Python\u4e0eJava\u4e4b\u95f4\u7684\u4e92\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<p><h4>\u5b89\u88c5PyJNIus<\/h4>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u5b89\u88c5PyJNIus\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">pip install pyjnius<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>\u4f7f\u7528PyJNIus\u8c03\u7528Java\u4ee3\u7801<\/h4>\n<\/p>\n<p><p>\u7136\u540e\uff0c\u4f60\u53ef\u4ee5\u7f16\u5199\u4e00\u4e2aPython\u811a\u672c\uff0c\u4f7f\u7528PyJNIus\u8c03\u7528Java\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from jnius import autoclass<\/p>\n<h2><strong>\u5bfc\u5165Java\u7c7b<\/strong><\/h2>\n<p>System = autoclass(&#39;java.lang.System&#39;)<\/p>\n<p>System.out.println(&#39;Hello, World!&#39;)<\/p>\n<h2><strong>\u4f7f\u7528Java\u7c7b\u5e93<\/strong><\/h2>\n<p>ArrayList = autoclass(&#39;java.util.ArrayList&#39;)<\/p>\n<p>list = ArrayList()<\/p>\n<p>list.add(&#39;Hello&#39;)<\/p>\n<p>list.add(&#39;World&#39;)<\/p>\n<h2><strong>\u6253\u5370ArrayList\u4e2d\u7684\u5143\u7d20<\/strong><\/h2>\n<p>for item in list:<\/p>\n<p>    print(item)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u901a\u8fc7Jpype\u5e93\u8c03\u7528Java\u4ee3\u7801<\/h3>\n<\/p>\n<p><p>JPype\u662f\u4e00\u4e2a\u9879\u76ee\uff0c\u65e8\u5728\u63d0\u4f9b\u4e00\u79cd\u5c06Python\u4e0eJava\u865a\u62df\u673a\uff08JVM\uff09\u6865\u63a5\u7684\u65b9\u5f0f\u3002\u5b83\u5141\u8bb8Python\u4ee3\u7801\u76f4\u63a5\u8c03\u7528Java\u4ee3\u7801\u548c\u7c7b\u3002<\/p>\n<\/p>\n<p><h4>\u5b89\u88c5JPype<\/h4>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u5b89\u88c5JPype\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">pip install jpype1<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>\u4f7f\u7528JPype\u8c03\u7528Java\u4ee3\u7801<\/h4>\n<\/p>\n<p><p>\u7136\u540e\uff0c\u4f60\u53ef\u4ee5\u7f16\u5199\u4e00\u4e2aPython\u811a\u672c\uff0c\u4f7f\u7528JPype\u8c03\u7528Java\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import jpype<\/p>\n<p>import jpype.imports<\/p>\n<h2><strong>\u542f\u52a8JVM<\/strong><\/h2>\n<p>jpype.startJVM(classpath=[&#39;\/path\/to\/your\/java\/classes&#39;])<\/p>\n<h2><strong>\u5bfc\u5165Java\u7c7b<\/strong><\/h2>\n<p>from java.util import ArrayList<\/p>\n<h2><strong>\u4f7f\u7528Java\u7c7b\u5e93<\/strong><\/h2>\n<p>list = ArrayList()<\/p>\n<p>list.add(&#39;Hello&#39;)<\/p>\n<p>list.add(&#39;World&#39;)<\/p>\n<h2><strong>\u6253\u5370ArrayList\u4e2d\u7684\u5143\u7d20<\/strong><\/h2>\n<p>for item in list:<\/p>\n<p>    print(item)<\/p>\n<h2><strong>\u5173\u95edJVM<\/strong><\/h2>\n<p>jpype.shutdownJVM()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u4f7f\u7528Py4J\u5e93\u8c03\u7528Java\u4ee3\u7801<\/h3>\n<\/p>\n<p><p>Py4J\u662f\u4e00\u4e2a\u5141\u8bb8Python\u7a0b\u5e8f\u8c03\u7528Java\u7a0b\u5e8f\u4e2d\u7684\u7c7b\u548c\u65b9\u6cd5\u7684\u5e93\u3002\u5b83\u63d0\u4f9b\u4e86\u4e00\u79cd\u7b80\u5355\u7684\u65b9\u5f0f\u6765\u5b9e\u73b0Python\u4e0eJava\u4e4b\u95f4\u7684\u901a\u4fe1\u3002<\/p>\n<\/p>\n<p><h4>\u5b89\u88c5Py4J<\/h4>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u5b89\u88c5Py4J\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">pip install py4j<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>\u7f16\u5199Java\u670d\u52a1\u5668<\/h4>\n<\/p>\n<p><p>\u7136\u540e\uff0c\u7f16\u5199\u4e00\u4e2aJava\u670d\u52a1\u5668\uff0c\u5b83\u5c06\u66b4\u9732\u4e00\u4e9b\u65b9\u6cd5\u4f9bPython\u8c03\u7528\u3002\u4f8b\u5982\uff0c\u7f16\u5199\u4e00\u4e2a\u7b80\u5355\u7684Java\u670d\u52a1\u5668<code>ExampleServer.java<\/code>\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-java\">import py4j.GatewayServer;<\/p>\n<p>public class ExampleServer {<\/p>\n<p>    public String sayHello(String name) {<\/p>\n<p>        return &quot;Hello, &quot; + name;<\/p>\n<p>    }<\/p>\n<p>    public static void main(String[] args) {<\/p>\n<p>        ExampleServer app = new ExampleServer();<\/p>\n<p>        GatewayServer server = new GatewayServer(app);<\/p>\n<p>        server.start();<\/p>\n<p>        System.out.println(&quot;Gateway Server Started&quot;);<\/p>\n<p>    }<\/p>\n<p>}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u7f16\u8bd1\u5e76\u8fd0\u884c\u8fd9\u4e2aJava\u670d\u52a1\u5668\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">javac -cp py4j-0.10.9.jar ExampleServer.java<\/p>\n<p>java -cp .:py4j-0.10.9.jar ExampleServer<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>\u4f7f\u7528Python\u8c03\u7528Java\u670d\u52a1\u5668<\/h4>\n<\/p>\n<p><p>\u6700\u540e\uff0c\u7f16\u5199\u4e00\u4e2aPython\u811a\u672c\uff0c\u4f7f\u7528Py4J\u8c03\u7528Java\u670d\u52a1\u5668\u7684\u65b9\u6cd5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from py4j.java_gateway import JavaGateway<\/p>\n<h2><strong>\u8fde\u63a5\u5230Java\u670d\u52a1\u5668<\/strong><\/h2>\n<p>gateway = JavaGateway()<\/p>\n<p>example = gateway.entry_point<\/p>\n<h2><strong>\u8c03\u7528Java\u65b9\u6cd5<\/strong><\/h2>\n<p>result = example.sayHello(&#39;World&#39;)<\/p>\n<p>print(result)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u4ee5\u4e0a\u4ecb\u7ecd\u4e86\u51e0\u79cd\u5728Python\u4e2d\u5199Java\u4ee3\u7801\u7684\u65b9\u6cd5\u3002\u6bcf\u79cd\u65b9\u6cd5\u90fd\u6709\u5176\u4f18\u7f3a\u70b9\uff0c\u9009\u62e9\u54ea\u79cd\u65b9\u6cd5\u53d6\u51b3\u4e8e\u4f60\u7684\u5177\u4f53\u9700\u6c42\u548c\u73af\u5883\u3002<\/p>\n<\/p>\n<p><p><strong>Jython<\/strong>\u9002\u5408\u9700\u8981\u65e0\u7f1d\u96c6\u6210Python\u548cJava\u4ee3\u7801\u7684\u573a\u666f\uff0c\u4f46\u53ef\u80fd\u6027\u80fd\u4e0d\u5982C-Python\u3002<strong>\u901a\u8fc7Shell\u547d\u4ee4\u8c03\u7528Java\u7a0b\u5e8f<\/strong>\u9002\u5408\u5df2\u6709Java\u7a0b\u5e8f\u4e14\u4ec5\u9700\u7b80\u5355\u8c03\u7528\u7684\u573a\u666f\u3002<strong>PyJNIus<\/strong>\u548c<strong>JPype<\/strong>\u63d0\u4f9b\u4e86\u66f4\u5e95\u5c42\u7684Java\u8c03\u7528\u80fd\u529b\uff0c\u4f46\u4f7f\u7528\u8d77\u6765\u53ef\u80fd\u7a0d\u590d\u6742\u3002<strong>Py4J<\/strong>\u63d0\u4f9b\u4e86\u4e00\u79cd\u7b80\u5355\u7684\u65b9\u5f0f\u6765\u5b9e\u73b0Python\u4e0eJava\u4e4b\u95f4\u7684\u901a\u4fe1\uff0c\u4f46\u9700\u8981\u5728Java\u7aef\u5b9e\u73b0\u4e00\u4e2a\u670d\u52a1\u5668\u3002<\/p>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u4f60\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u6765\u5b9e\u73b0Python\u4e0eJava\u4ee3\u7801\u7684\u96c6\u6210\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5728Python\u4e2d\u5982\u4f55\u8c03\u7528Java\u4ee3\u7801\uff1f<\/strong><br \/>\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528JPype\u6216Py4J\u7b49\u5e93\u6765\u5b9e\u73b0Python\u4e0eJava\u4e4b\u95f4\u7684\u4ea4\u4e92\u3002\u8fd9\u4e9b\u5e93\u5141\u8bb8Python\u4ee3\u7801\u8c03\u7528Java\u7c7b\u548c\u65b9\u6cd5\uff0c\u4ece\u800c\u5728Python\u73af\u5883\u4e2d\u8fd0\u884cJava\u4ee3\u7801\u3002\u4f8b\u5982\uff0c\u4f7f\u7528JPype\u65f6\uff0c\u60a8\u9700\u8981\u5148\u542f\u52a8JVM\uff0c\u7136\u540e\u5bfc\u5165Java\u7c7b\uff0c\u6700\u540e\u8c03\u7528\u76f8\u5e94\u7684\u65b9\u6cd5\u3002<\/p>\n<p><strong>Python\u548cJava\u4e4b\u95f4\u7684\u6027\u80fd\u5dee\u5f02\u5982\u4f55\u5f71\u54cd\u5f00\u53d1\u9009\u62e9\uff1f<\/strong><br \/>\u5728\u9009\u62e9\u5f00\u53d1\u8bed\u8a00\u65f6\uff0c\u6027\u80fd\u5dee\u5f02\u786e\u5b9e\u662f\u4e00\u4e2a\u91cd\u8981\u8003\u8651\u56e0\u7d20\u3002Java\u901a\u5e38\u5728\u6267\u884c\u901f\u5ea6\u548c\u5185\u5b58\u7ba1\u7406\u65b9\u9762\u8868\u73b0\u66f4\u597d\uff0c\u7279\u522b\u662f\u5728\u5904\u7406\u590d\u6742\u8ba1\u7b97\u6216\u5927\u89c4\u6a21\u6570\u636e\u65f6\u3002\u800cPython\u5219\u4ee5\u5176\u7b80\u6d01\u7684\u8bed\u6cd5\u548c\u5feb\u901f\u5f00\u53d1\u5468\u671f\u800c\u95fb\u540d\uff0c\u9002\u5408\u4e8e\u6570\u636e\u5206\u6790\u548c<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u7b49\u9886\u57df\u3002\u56e0\u6b64\uff0c\u9009\u62e9\u54ea\u79cd\u8bed\u8a00\u901a\u5e38\u53d6\u51b3\u4e8e\u5177\u4f53\u7684\u9879\u76ee\u9700\u6c42\u548c\u56e2\u961f\u7684\u6280\u80fd\u3002<\/p>\n<p><strong>\u662f\u5426\u53ef\u4ee5\u5728Python\u4e2d\u4f7f\u7528Java\u5e93\uff1f<\/strong><br \/>\u662f\u7684\uff0cPython\u53ef\u4ee5\u901a\u8fc7\u4e00\u4e9b\u5de5\u5177\u548c\u6846\u67b6\u4f7f\u7528Java\u5e93\u3002\u9664\u4e86JPype\u548cPy4J\uff0c\u53e6\u4e00\u4e2a\u5e38\u7528\u7684\u5e93\u662fJython\uff0c\u5b83\u5141\u8bb8\u5728Python\u4e2d\u76f4\u63a5\u4f7f\u7528Java\u7c7b\u548c\u5e93\u3002\u4f7f\u7528\u8fd9\u4e9b\u5de5\u5177\u65f6\uff0c\u53ef\u4ee5\u5145\u5206\u5229\u7528Java\u751f\u6001\u7cfb\u7edf\u4e2d\u7684\u4e30\u5bcc\u8d44\u6e90\uff0c\u540c\u65f6\u4fdd\u6301Python\u7684\u7075\u6d3b\u6027\u548c\u6613\u7528\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u5199Java\u4ee3\u7801\u7684\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528Jython\u3001\u901a\u8fc7Shell\u547d\u4ee4\u8c03\u7528Java\u7a0b\u5e8f\u3001\u4f7f\u7528PyJNIu [&hellip;]","protected":false},"author":3,"featured_media":1160159,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1160154"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1160154"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1160154\/revisions"}],"predecessor-version":[{"id":1160162,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1160154\/revisions\/1160162"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1160159"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1160154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1160154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1160154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}