enter image description here
I am trying to use a python script to
1) getting the Pid of a java program and, 2) using that pid to run JVMRuntimeClient.class
but nothing is happening
Here is my script:-
import subprocess
import os
process = subprocess.Popen('java -cp .Workspace.TestProject.bin.VirtualMemorySimulatorPart3')
pid=str(process.pid)
os.popen('java .Workspace.TestProject.bin.JVMRuntimeClient -pid' + pid)
print(pid)
exit()
OneCricketeer
193k20 gold badges147 silver badges277 bronze badges
asked Apr 30, 2014 at 5:15
user3386167
651 gold badge1 silver badge6 bronze badges
-
I think you're not using right the -cp option. Turn to the official documentation - docs.oracle.com/javase/7/docs/technotes/tools/windows/java.html If you're specifying -cp option, you should specify both the class path and the Main containing class name.JeB– JeB2014年04月30日 05:52:16 +00:00Commented Apr 30, 2014 at 5:52
lang-py