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
193k20 gold badges147 silver badges277 bronze badges
asked Apr 30, 2014 at 5:15
1
  • 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. Commented Apr 30, 2014 at 5:52

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.