Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-03-2008, 10:31 PM
Member
 
Join Date: Oct 2008
Posts: 8
karine is on a distinguished road
runtime.exec stale process
How can I kill the runtime.exec stale processes? I tried proc.destroy.. didn't work

Thanks!
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-04-2008, 12:48 AM
Senior Member
 
Join Date: Jun 2008
Posts: 551
masijade is on a distinguished road
I've seen this before (windows I assume). After calling destroy call exitValue. It will cause an exception, so catch it, but after that the process is gone (usually).

Don't know why it's this way sometimes, but it is.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 10-04-2008, 03:01 AM
Member
 
Join Date: Oct 2008
Posts: 8
karine is on a distinguished road
runtime.exec stale process
I tried it. It didn't work.

Thanks!
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 10-04-2008, 09:41 AM
Senior Member
 
Join Date: Jun 2008
Posts: 551
masijade is on a distinguished road
I've had a couple like that, too.

What are you using Runtime.exec() for? There might be a better way, and it might be that you shouldn't be using Java for this at all.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 10-05-2008, 09:10 PM
Member
 
Join Date: Oct 2008
Posts: 45
priyanka.dandekar is on a distinguished road
you may need to try again doing kill by some other process which can identify and kill it....
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 10-06-2008, 07:04 PM
Member
 
Join Date: Oct 2008
Posts: 8
karine is on a distinguished road
I have axis 1.4 webservice running in tomcat 6.0.18. I have a Runtime.exec calling a C program. When my Java client is connecting to the web service to get data through the C program many times (50 times) the Runtime.exec hangs and creates stale processes. How can I avoid this?

thanks!
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 10-06-2008, 07:40 PM
Member
 
Join Date: Oct 2008
Posts: 8
karine is on a distinguished road
I am thinking of doing "ps -ef | grep processId" Unix command to identify and kill it but it will be a workaround. I was hoping to fix it so it won't create these stale processes and hang.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tomcat and Runtime.exec karine Introductions 1 10-03-2008 10:25 AM
Runtime.exec() hknyo Advanced Java 2 08-16-2008 02:40 AM
Problem with Runtime.exec() nhabibi Advanced Java 11 07-02-2008 03:35 AM
Runtime.exec(), handling input and output streams crookshank New To Java 0 06-05-2008 04:41 PM
How to get variable values at runtime in another process murali_java Advanced Java 0 11-02-2007 10:03 AM


All times are GMT +3. The time now is 09:54 AM.


VBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org