Home Answers Viewqa Java-Beginners Java - looking for a tool to force-kill a child process (Windows)

 
 


gilad h
Java - looking for a tool to force-kill a child process (Windows)
0 Answer(s)      2 years and 4 months ago
Posted in : Java Beginners

hello

I am looking for a Java tool/package/library that will allow me to force-kill a child process.

This tool/package/library must work on Windows platform (mandatory). Support for Linux/Unix is desired.

My Problem

My Java code creates a child process that will simply not react to the standard Java way for killing a child process: process.destroy(), and, since I do not have the child's source code, I cannot program it to better handle termination requests.

I have tried closing the child process' error input and output stream before calling destroy(), and for no effect.

I have even tried passing ctrlBreak signal (char=3) directly into child.getOutputStream(), and again have received the same results.

The workaround i have finally managed to find was to: 1. Obtain the child's PID upon its creation This can be done in Windows by diffinf the process lists before and after the child's creation (getRuntime().exec("tasklist /v")

  1. Use the child's PID to issue a force kill system command
    in Windows: getRuntime().exec("taskkill /pid " + childPid + " /f")

But - this is complex code i have no desire to debug and maintain, plus the problem itself, i have no doubt, was previously encountered by many other java developers, which leads me to the hope that such a Java tool/package/library already exists.

I just don't know its name...

Your help will be appreciated.

Gilad Haimov

PS: My child process was created by Runtime.getRuntime().exec(cmd), but i get the same behaviour using a ProcessBuilder.

View Answers









Related Pages:
child window - Development process
child window  I want to create new small window on my website using java script. But i couldn't hide the status bar in small window. How to do this one ? Kindly help me.   Hi Friend, Please visit the following
Java for Windows
Java for Windows       First of all download jdk for windows and then install and configure the Java SE... the Environment for Java on Windows: This section describes settings
Parent child windows relationships when webpage is accesssed through a hyperlink.
Parent child windows relationships when webpage is accesssed through... is loaded. The webpage has parent/child windows. This timeout functionality works in the parent window(home page) even when the child windows are open. And so i
java tool
java tool  I installed edit plus tool but it couldn't compile and excute the coding ...how to retify that problem
BIRT reporting tool - Development process
BIRT reporting tool  How to call BIRT reports from jsp or servlets. what is the tree architecture? And what is the process to deploy BIRT project in tomcat server. just give small application to call BIRT reports from jsp
Installing MySQL on Windows
Installing MySQL on Windows       In this section you will learn how to install MySQL 5.0 on windows system. The MySQL 3.21 was the first version for the windows. Windows installer
project security tool - Java Interview Questions
project is insurance project,payments are through on line for this process we need any security tool
How to Create a Different User Account in Windows 8?
If you have already installed windows 8 on your computer but facing problem in creating a user account, here you are. In this windows 8 tutorial, we will discuss How to create a different user account in Windows 8? Once you install
Eclipse Plunging/Tool
of the popular Java tool/editor BlueJ. It implements most of its functions like...: Dynamic Slicing Tool for Java JSlice is dynamic slicing tool for Java... Eclipse Plunging/Tool   
Main Thread and Child Thread
There are two types of threads in Java Progarm In Java there are Main and Child Threads used in Programming. Main thread is automatically created when program runs. Child Thread gets created by the main thread . Java Main
java tool - Java Beginners
java tool  HI,i'm doing a project to implement BASIS PATH TESTING..so,i want a java tool which takes the c-program as the input n converts it into a control flow graph...can anyone suggest? thanking you
java tool - Java Beginners
java tool  HI,i'm doing a project to implement BASIS PATH TESTING..so,i want a java tool which takes the c-program as the input n converts it into a control flow graph...can anyone suggest? thanking you
Windows Mobile Development is Easy to Use When the Right Tools Work
be very easy to work with a Windows Mobile development process... to get the Windows Mobile development process to be easier to handle. The first... the Windows Mobile development process to work. The SDK can also feature a full
How to Differenciate Main Thread and Child Thread in Java
Main Thread and Java Child Thread. Please Suggest any example or online link... in Java Programming Language. These are Java Main Thread and the Child Thread...How to Differenciate Main Thread and Child Thread in Java  hi
Tool In JAVA - CVS
Tool In JAVA  Hai this is JAGADHISH Iam learning cvs tool.If anybody have related material or examples for this CVS tool plz send me.Thank you(in advance).  Hi friend, For read more information to visit this link
JAVA Debug tool
JAVA Debug tool  Hi , I invoke the JDebugTool using the following command on MS DOS : "c:/Users/mkarapanahalli/Programfiles/Java/jdk1.7.0/bin/java..." com.debugtools.jdebugtool.Main That works fine and starts the Debug tool. I mount a source path and try
Running Java Applications as a Windows Service
Running Java Applications as a Windows Service  sample code for "Run a Java application as a Windows Service
Java - Development process
to integrate two java program. u can integrate java pro with other software or tool. To integrate 2 java programs use "is a relationship" and "has a relationship" ie... to integrate the two or more class in java language.please send the message
Passing values from child window to parent window.
Passing values from child window to parent window.  http://www.roseindia.net/java/pass-value-example/pass-value-child-to-parent.shtml I have gone thru the link but my requirement is checkboxes.can u please explain
Passing values from child window to parent window.
Passing values from child window to parent window.  Hai, I'm having a requirement ,in that when i open a (pop-up)child window from a parent window,the child window will contain multiple checkboxes and when i select multiple
CSS CUSTOMIZATION AUTOMATION TOOL
to develop a tool. I will brief the scenario to you. 1, Creating website using... in the public site. Now, i want to automate this process. I want to develop a tool or an application. That should allow me to enter all the styles in a single
CSS CUSTOMIZATION AUTOMATION TOOL
to develop a tool. I will brief the scenario to you. 1, Creating website using... in the public site. Now, i want to automate this process. I want to develop a tool or an application. That should allow me to enter all the styles in a single
Java get windows Username
Java get windows Username     ... of the windows. System.getProperty("user.name")- This method retrieve the username of the particular system from all the properties of Windows.    
Reporting tool for sqlserver2000 with java or jsp
Reporting tool for sqlserver2000 with java or jsp  Hi to all ,Is there any Reporting tool to make report from sqlserver2000 as a database...   Hi, There are many reporting tool in Java. But Jasper is the Best
GPS Child Tracking System
GPS Child Tracking System Protect your child from being abduction, molestation and abusing through using our GPS Child Tracking System, which enables... out the safe boundary line, if the child goes beyond the boundary line
windows shell scripting
windows shell scripting   Hi All, Using this knowledge make a batch file to achieve the following when the batch file is executed. Accept three... = Hello, Param2 = C:\Program Files\Java, Param3 = abcd.txt C:\Program Files\Java>
windows shell scripting
windows shell scripting   Hi All, Using this knowledge make a batch file to achieve the following when the batch file is executed. Accept three... = Hello, Param2 = C:\Program Files\Java, Param3 = abcd.txt C:\Program Files\Java>
Excel conversion tool. - Java Beginners
Excel conversion tool.  Hi, I need a conversion tool which can convert .xls(Excel 2003) to .xlsx (Excel 2007) and vice-versa. Please suggest any links ro tools. Thank You
java classpath prbm in windows 7
java classpath prbm in windows 7  i have a problem to set... that user variables i set them like this: CLASS .;C:\Program Files\Java\jdk1.6.0_32\lib; in system variables PATH .;C:\Program Files\Java\jdk1.6.0_32\bin; after
DOM Example For Creating a Child Node 
DOM Example For Creating a Child Node  In this section we will discuss about how to add a Child Node in Dom document. The addition of child node is a very logical. To add a child node first we create blank DOM document and then we
Java process
Java process  How will you invoke any external process in Java
Open Source Windows
Open Source Windows      ...; Miro Beautiful interface. Plays any video type (much more than windows... is an instant messaging program for Windows, Linux, BSD, and other Unixes
create installer - Development process
create installer   "I have create installer (.exe) for my java project with the help of izpack. Now i want to create .rpm installer for my java project. Which application is used for do this. Now i am used windows XP os. so
Pass value from child to parent window
Pass value from child to parent window       Java example program to pass value from child window to parent window We can pass values from a child window in Html to the parent
Process in Java
Process in Java  how can I execute a java program as a process which i can monitor it in the task manager to see the cpu usage
how to access windows registry information using java?
how to access windows registry information using java?  can any one help me how to access windows registry information using java
How to install and Configure the Tomcat Server
the installation process only for Windows. Steps involved in installation and configuration process for Tomcat 6.0.10 are illustrated below: Step 1: Installation... and the Windows installer (.exe file). Here we are exploring the installation process
Screen scrapper tool java source code
Screen scrapper tool java source code  From where can i dload the souce code for this screen scrapper tool ? Please let me know. Thanks
calibre tool - Java Server Faces Questions
calibre tool  how to insert values using core java and calibre tool api
JavaMail and Gmail in Windows - JSP-Servlet
JavaMail and Gmail in Windows  Hello! I made a java program to send and receive emails through Gmail SMTP server. It worked fine in Windows 7 but when I try to run the same program in Windows XP in a different machine
How To Install Windows 8
with the Windows 8 icon will means you have started the installation process... with the installation process of Windows 8 on your computer you need to accept... setup will automatically start installing Windows on your computer. This process
open source web services tool java
Open Source web services tool in java        ...: The Web Services Invocation Framework (WSIF) is a simple Java API
GJTester - Java Unit Testing Tool
GJTester - Java Unit Testing Tool       GJTester, a general Java testing tool, accomplishes the unit, regression and contract testing of your Java programs
Linux Vs. Windows
then installing Linux, because the process of  installing windows is very same... Linux Vs. Windows       ...;       Both Linux and Windows works
Showing an image in Tool Tip
Showing an image in Tool Tip       This section illustrates how to show an image in tool tip... button. When you move the mouse pointer around the button then a tool tip text
How to Give button tool tip image
How to Give button tool tip image  In eclipse the same code is not working...not able to point to the image   Please visit the following link: Java Button Tooltip Image
Windows 8 Operating System
Windows 8 is the latest innovation, which has been launched to make easy handling of the Windows operating system. Launched by the Microsoft it is expected... in the field. Many little hurdles are waiting in the process to accept the innovative
Displaying database table on the windows screen in real time.
Displaying database table on the windows screen in real time.  ... need to write a program to display this table in a windows form or on a html page... on that form or page .There could be any approach to this.Prefer java. Please help
How Windows 8 will benefit Business?
hardly been any doubt about the dominance of Windows, but when new interfaces... these not so distinct categories, Windows as expected was sure to come up..., Windows 8 will benefit business in numerous ways. From low booting time
linux desktop on windows without using vn or any other ? - Java Magazine
linux desktop on windows without using vn or any other ?  linux desktop on windows without using vn or any other ?. I have a linux pc and windows xp pc but i am not able to connect the linux pc on windows .why? .windows