Killing any  process ..Please Help

Hi
This is the situation.
From my Python script I start a Java Process which starts rmiregistry at some port
Now I am interested in Killing the rmiregistry process .
So i start another Python script which runs another Java Program ....
BUT now i am not sure how to kill the process ?
THIS IS MY QUESTION
Basically 2 jvms are run . IN one jvm i have process handle.
BUT how do i kill process from different JVM
If this is not possible i would lilke to know how to the below
in java
1> HOW DO I KILL A PROCESS RUNNING AT SOME PORT (In general)
(Can be started frrom different JVM)
2> Also is it possible to get PID of process from Java

On Unix including Linux the command fuser tells which process listens on a port:
posman@linux:~> fuser -n tcp 1234
here: 1234
1234/tcp:            23153
posman@linux:~> ps -p 1234
  PID TTY          TIME CMD
posman@linux:~> ps -p  23153 -f
UID        PID  PPID  C STIME TTY          TIME CMD
posman   23153     1  0  2004 ?        00:00:01 java -Dfile=ZipServer.par -Dbeau
[pre]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

Maybe you are looking for

  • F4 help button not getting displayed

    Hi, I have unique problem it seems. I have atttached a explicit search help object for one of the fields in a local structure of type db table.. In standard selection screen i am defining a parameter of this field and have used "matchcode object" als

  • Mac mini no longer pairs with blutooth keyboard

    Hi, I never have had issues with the nre Mac Mini I bought. It is only 2 months old now. Last week when I turned on my Mac Mini, the keyboard no longer is recognized. I have tried to switch batteries, restart the computer but no matter what I do, it

  • Cannot contact to internet - Browser's won't work or reinstall

    My youngest downloaded a safari update he swears prompted by Apple that has crash his browsers. I have tried to reinstall safari, firefox and the tiger os - it won't let me. All apps work without connecting to the internet. The only app that works on

  • Shared mac showing up several times

    My media mac is showing several times in my other mac and iphone (remote) withe different numbers. Why?

  • Multiple AE imports

    I have to import multiple compositions from an After Effects project every day. What's really frustrating is that there is no group import option. The Premiere import window opens and lists all compositions in a project. I can select one and import i