+ 1
I need a help. Can we link Python and Java in a program
please help
7 Answers
+ 2
Yes you can !
But 1. it's not easy 2. it depends on what exactly you want to do because there are different techniques:
- the easiest way is to call an Java program for python (using os.system("java program") for instance) or reciprocally to call python from Java (using Runtime.getRuntime.exec("your python.py").
- you can also use process from Java to start a python script : use ProcessBuilder(I don't know how python can start a java program as a process)
- you can use sockets to make a java program and a python one communicate
- Jython is nice project to compile python as byte code for java JVM and to call python script from Java
- ...
As you see, you can use many solutions !
0
i Dont know but i think it is possible
0
Thank you
0
use Jython go and Google about it I'm not familiar but it's possible to integrate java and python using Jython
if you learnt about it let us know about it :-)
0
Thanks Sam
0
it is possible with jython
- 1
sure