+ 1

I need a help. Can we link Python and Java in a program

please help

14th Jul 2016, 6:05 AM
Pradheep
Pradheep - avatar
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 !
14th Jul 2016, 8:13 AM
samuel delepoulle
samuel delepoulle - avatar
0
i Dont know but i think it is possible
14th Jul 2016, 6:20 AM
Š–Š°ŃŃƒŃ€ ŠŸŃƒŠ»Š°Ń‚Š¾Š²
Š–Š°ŃŃƒŃ€ ŠŸŃƒŠ»Š°Ń‚Š¾Š² - avatar
0
Thank you
14th Jul 2016, 6:24 AM
Pradheep
Pradheep - avatar
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 :-)
14th Jul 2016, 7:00 AM
sundar
sundar - avatar
0
Thanks Sam
14th Jul 2016, 4:50 PM
Pradheep
Pradheep - avatar
0
it is possible with jython
14th Jul 2016, 5:37 PM
Ogah Sunday Ogbonnaya
Ogah Sunday Ogbonnaya - avatar
- 1
sure
14th Jul 2016, 7:03 AM
Pradheep
Pradheep - avatar