Receive output of python program in java
Have you tried this,
Runtime.getRuntime().exec("python helloworld.py");
Please try and if it doesn't work leave a comment.
I've a Python program which just prints "hello world". I only want to get that output in a Java program and print that again, i.e. I want to consume output of Python program in a Java program. 
I tried using Runtime.getRuntime().exec("helloworld.py"); but it is giving an exception saying java.lang.IOException : Cannot run program "helloworld.py" : CreateProcess error=193, %1 is not a valid Win32 application.
Can anybody please explain why this exception has occurred and what is solution for it ?
Thanks in advance!