I have two java programs that run forever until I terminate the process, I start both at once using a script....

Cobrakai$more  startCapture
nohup startCaptureA.sh &
nohup startCaptureB.sh &
Cobrakai$more startCaptureA.sh 
cd ~/Dropbox/Eclipse/workspace/com.tmc.personal.screencapture/bin
java com/tmc/personal/ScreenCapture
Cobrakai$more startCaptureB.sh 
cd ~/Dropbox/Eclipse/workspace/com.tmc.personal.screencapture/bin
java com/tmc/personal/ActiveWindowCapture

They both continue to run, I can see the output they generate (they write to a file each), and I can see them in 'ps':

Cobrakai$ps x  | grep Capture | grep java
 1137 s000  S      0:12.13 /usr/bin/java com/tmc/personal/ScreenCapture
 1138 s000  S      0:05.17 /usr/bin/java com/tmc/personal/ActiveWindowCapture

But when I open Activity Monitor, I can see that 'ScreenCapture' is running (and taking 96MB of memory)

enter image description here

But 'ActiveWindowCapture' does not appear at all... enter image description here

Can someone tell me why it's not appearing? I'm deeply lost...

EDIT - following (sensible) suggestion from the comments, I tried just starting ActiveWindowManager

Cobrakai$killall java
Cobrakai$ps x  | grep Capture | grep java
[1]-  Exit 143                nohup startCaptureB.sh
[2]+  Exit 143                nohup startCaptureA.sh
Cobrakai$nohup startCaptureB.sh &
[1] 3070
Cobrakai$appending output to nohup.out

Cobrakai$ps x  | grep Capture | grep java
 3071 s000  S      0:00.23 /usr/bin/java com/tmc/personal/ActiveWindowCapture

But still nothing in the Activity Monitor...:s

  • 2
    Try opening the applications in reverse order (i.e. open ActiveWindowCapture before ScreenCapture) and see if the opposite effect occurs. I think it has something to do with there being a single java process to "rule them all." – Alexander - Reinstate Monica Dec 17 '13 at 13:58
  • 2
    Have you got any java processes in Activity monitor it might be showing as that – user151019 Dec 17 '13 at 14:24
  • @XAleXOwnZX edited question to cover... :) – Joe Dec 17 '13 at 15:30
  • 1
    Did you try sorting Activity Monitor by PID and see whether the process has a different name there? – nohillside Dec 17 '13 at 16:19
  • That second grep implies that ScreenCapture is not running and it is not an ActivityMonitor issue are you sure that the programs are not exiting? – user151019 Dec 17 '13 at 17:19

You must log in to answer this question.

Browse other questions tagged .