Java App和Python App之间的交互 [英] Interaction between Java App and Python App

查看:307
本文介绍了Java App和Python App之间的交互的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个python应用程序,我不能从我的角度编辑它的黑盒子。 python应用程序知道如何处理文本并返回已处理的文本。
我有另一个用Java编写的应用程序知道如何收集未处理的文本。



当前状态,python应用程序每隔x分钟以批处理模式工作。 / p>

我想让python



处理流程的一部分:Java app收集文本并请求python应用程序处理并返回已处理的文本作为流程的一部分。



您认为最简单的解决方案是什么?



谢谢,
Rod

解决方案

查看 Jython - 您可以直接从Java代码运行Python程序,并来回无缝交互。


I have a python application which I cant edit its a black box from my point of view. The python application knows how to process text and return processed text. I have another application written in Java which knows how to collect non processed texts.

Current state, the python app works in batch mode every x minutes.

I want to make the python

processing part of the process: Java app collects text and request the python app to process and return processed text as part of a flow.

What do you think is the simplest solution for this?

Thanks, Rod

解决方案

Look into Jython - you can run Python programs directly from Java code, and interact seamlessly back and forth.

这篇关于Java App和Python App之间的交互的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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