Towards Dev

A publication for sharing projects, ideas, codes, and new theories.

Follow publication

Executing a Python Script From a Java File and Vise-Versa

Nickson Joram
Towards Dev
Published in
2 min readDec 31, 2021

--

Photo by Christopher Gower on Unsplash
>>> import subprocess
>>> output = subprocess.check_output("java JavaFromPython", stderr=subprocess.PIPE)
>>> print(output)
b’I am in Java Program\r\n’
b’
C:\Program Files (x86)\Java\jdk1.8.0_65\jre\lib\ext
Returned Value is : 11

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Published in Towards Dev

A publication for sharing projects, ideas, codes, and new theories.

No responses yet

Write a response