Symbian
Symbian OS Library

FAQ-0486 How can I close down rogue "JavaRun" threads/processes?

[Index][spacer] [Previous] [Next]



 

Classification: Java Category: General
Created: 04/11/2000 Modified: 07/10/2001
Number: FAQ-0486
Platform: ER5

Question:
Sometimes when a Java app fails and is closed down, it disappears from the "Open files / programs" list but a "JavaRun" thread remains active, as detected by running the ps command in EShell. Why is this and how can I get rid of this and recover the system resources it is using?

Answer:
Each Java process launched has at least a main window and/or console and an associated VM thread, identified by the system as "JavaRun" (or "Java" if the app was started from Eshell using the java.exe command). It is unfortunately possible to close down the former and leave the VM thread alive and in limbo (although not vice versa). Not having a UI, the process is no longer registered with the "Open files / programs" dialog through which a shutdown could by forced with ctrl-shift-E. (This state of affairs results if ctrl-fn-shift-K - a key sequence which can be useful in forcing shutdown of a native app - is called on a Java app.)

One way to solve this problem is to carry out a soft reboot of your machine, in which case all apps currently running will be closed down (with possible data loss). A cleaner solution is to run an ER5 utility called "Sweeper", available for download from the SymbianDevNet Web site. This looks for all processes with name "Java*" and kills them off leaving all other (non-Java) processes intact.