passing data between java and python

前端 未结 4 852
天命终不由人
天命终不由人 2021-01-03 02:17

Apologies if my question is noob. I\'m running Django 1.2 with pgsql 8.4 and I\'m required to run a Java program after getting the inputs from the user, does some calculatio

4条回答
  •  -上瘾入骨i
    2021-01-03 02:42

    Use subprocess and run the Java program as a simple subprocess. It's very, very simple and reasonably fast.

    If you need to do something more scalable, you should look at creating a glassfish server with your Java code so your Python can make web services requests to the Java. This is more scalable, but also more work.

提交回复
热议问题