I am trying to execute a .py file from java code. I move the .py file to the standard directory of my java project, and I invoke it using the following code:
String cmd = "python/"; String py = "file"; String run = "python " +cmd+ py + ".py"; System.out.println(run);
Either using the variable path, or the entire path, or "python file.py" runs my code showing a successful total message assembly time of 0 seconds without executing file.py. What is my problem?
java python
Jose Ramon
source share