2

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
  • 179,855
  • 19
  • 132
  • 245
user3386167
  • 65
  • 1
  • 1
  • 6
  • I think you're not using right the -cp option. Turn to the official documentation - http://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 Apr 30 '14 at 05:52

0 Answers0