Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



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

Have Programming Question? Ask it here!
 
 
 


gilad h
Java - looking for a tool to force-kill a child process (Windows)
0 Answer(s)      3 years and 6 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.


Advertisement
View Answers

Related Tutorials/Questions & Answers:
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
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
Advertisements
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
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
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
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
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
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
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 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.    
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
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
read/write to Windows Registry using Java
read/write to Windows Registry using Java  read/write to Windows Registry using Java
Java process
Java process  How will you invoke any external process in 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
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
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
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
project security tool - Java Interview Questions
project is insurance project,payments are through on line for this process we need any security tool
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
Reading child of child nodes in xml
Reading child of child nodes in xml  Hi I am using the following XML file and would like to read the data for respective date in the child nodes. I.... This is the first time I am calling child of child node. Please help. Thanks in advance
Installing JDK 7 on Windows
windows 7 computer. Check more tutorial for Java beginner in our Java...Installing JDK 7 on Windows - Beginners tutorial for installing configuring... step towards learning the Java Programming Language. This beginners Java
Need simple java code to start and stop the remote windows service.
Need simple java code to start and stop the remote windows service.  Hi, I Need simple java code to start and stop the remote windows service. Example:There are two servers 1) Server A and 2) Server B. If a notepad.exe file
XML- read Text Mode - Java Error in Windows - reg. - Java Beginners
XML- read Text Mode - Java Error in Windows - reg.  Dear All I'm creating the code as read the XML file in BufferedReader method. Here I pasted... in the "Windows" platform. what is the problem and how to reactify it. Please any one
java code - Development process
java code  hi, this is sampath, how to acchive the batch processing in java or batch process base java thread. can u send the code and brief explanation. thanks and regards sampath reddy
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
Thread and Process - Java Beginners
, VijayaBabu.M  Hi vijayaBabu A process can contain multiple threads. In most multithreading operating systems, a process gets its own memory address... process. For instance, a JVM runs in a single process in the host O/S. Threads
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
process of compiling and running java program
process of compiling and running java program  Explain the process of compiling and running java program. Also Explain type casting
core java - Development process
. The process is known instantiation For example : class... to : http://www.roseindia.net/java/master-java/java-object-oriented-language.shtml
JDOM Element Example, How to remove child of an element from xml file in java.
JDOM Element Example, How to remove child of an element from xml file in java. In this tutorial, we will see how to remove child of an element from xml file in java with the help of JDOM library. JDOM is a java toolkit
Child Filter
Child Filter       Child Filter Child filter basically handles filtration according to parent-child relationship. Some main Child filters are given below : : first-child
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
Installing Java (JDK 7) on Windows 7 Computer Video Tutorial
Installing Java (JDK 7) on Windows 7 Computer Video Tutorial
Java Code to Block a website accessed by any browser in windows
Java Code to Block a website accessed by any browser in windows  I want create an application in Java through Netbean IDE to block any website to be accessed by any browser. I also want to display only its html contents. please
java - Development process
Java Sort String Array  How to sort string array in Java
training and placement of my child who is very much interested in doing jobs of his key interests like java, j2ee, php etc,
training and placement of my child who is very much interested in doing jobs of his key interests like java, j2ee, php etc,  I want my son to be trained in java developing ,how should I go
training and placement of my child who is very much interested in doing jobs of his key interests like java, j2ee, php etc,
training and placement of my child who is very much interested in doing jobs of his key interests like java, j2ee, php etc,  I want my son to be trained in java developing ,how should I go
training and placement of my child who is very much interested in doing jobs of his key interests like java, j2ee, php etc,
training and placement of my child who is very much interested in doing jobs of his key interests like java, j2ee, php etc,  I want my son to be trained in java developing ,how should I go
java - Development process
java  hi, can u send an example code in MVC Architecture for gym process i just want to get register id from database for citizen .then he will add is suggestion in text box and submit it i am sending jsp page u will get idea
java with alfresco - Development process
java with alfresco  how to write java code to upload different documents and search options using alfresco api
java reflection - Development process
java reflection  how to save and run reflection class in java?please immediately reply sir
java with linux - Development process
java with linux  HI , This is namit.I want to know how to link a java program with linux platform
Java Steps - Development process
Java Steps  what are the steps to be taken to create a mobile phone compatible java swing program
java server - Development process
java server  Develop multi-threaded echo server and a corresponding GUI client in java
JAVA - Development process
StreamResult("data.xml"); initXML(); process(test...(); handler.startElement("","","Roseindia",atts); } public static void process (String s
Advertisements
 

 

 

DMCA.com