| | |
stopping an application execution
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Apr 2005
Posts: 21
Reputation:
Solved Threads: 0
HI everybody! I am starting a visual basic application from java with the following routine:
Runtime rt = Runtime.getRuntime();
try {
Process p = rt.exec("Grabacion");
}
catch (Exception e)
{ e.printStackTrace();
}
I want to know if there is any method in java that can make this application "grabacion" stop running...like a stop or quit exec or something like that! Hope someone can help me very soon!
Runtime rt = Runtime.getRuntime();
try {
Process p = rt.exec("Grabacion");
}
catch (Exception e)
{ e.printStackTrace();
}
I want to know if there is any method in java that can make this application "grabacion" stop running...like a stop or quit exec or something like that! Hope someone can help me very soon!
•
•
Join Date: Apr 2005
Posts: 21
Reputation:
Solved Threads: 0
I tried the destroy method but that one forces the application to close. My application is developed in Visual Basic, and if I use the destroy method the aplication doesnt reach the unload metho so I dont get the expected results. I need something like closing the window or something like that, is it possible??? Help me please, is the last step of my graduation project!!!!!
•
•
Join Date: Jun 2004
Posts: 2,108
Reputation:
Solved Threads: 18
I've looked up the class api and can only find one other possible method that will help: exitValue()
It returns the exit value for the subprocess, but I don't know what you could do with that.
Now, one other way to kill the process is to call the kill.exe file on your computer(if you have windows).
Runtime.getRuntime().exec("kill fileID"), where fileIDis the Process Id. You'll probably have trouble finding the process ID, so I don't know about that either.
Overall, I think this is a problem with your VB code not handling the exit right, or else you're just out of luck.
It returns the exit value for the subprocess, but I don't know what you could do with that.
Now, one other way to kill the process is to call the kill.exe file on your computer(if you have windows).
Runtime.getRuntime().exec("kill fileID"), where fileIDis the Process Id. You'll probably have trouble finding the process ID, so I don't know about that either.
Overall, I think this is a problem with your VB code not handling the exit right, or else you're just out of luck.
![]() |
Similar Threads
- Very Very Urgent...Need Code for Calculating Execution Time For Jsp Page (JSP)
- EXECryptor software protection (C)
- Fatal Execution Engine Failure(0x7927e03e) (ASP.NET)
- Pause Execution of a vb.net application (VB.NET)
- Launching an application from a thread (C++)
Other Threads in the Java Forum
- Previous Thread: Looking for a garduation project
- Next Thread: Question about java.lang.UnsatisfiedLinkError in MMAPI
Views: 2996 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for Java
account android api apple applet application arguments array arrays automation binary birt bluetooth chat class classes client code component data database draw eclipse error event exception file filechooser fractal game givemetehcodez google graphics gui helpwithhomework homework html ide image inheritance input integer j2me java javaprojects jlabel jmf jni jpanel jtextfield julia linux list loop map method methods midlethttpconnection mobile mobiledevelopmentcreatejar monitoring netbeans newbie nullpointerexception number object open-source oracle print problem program programming project property recursion ria scanner screen search server set size sms socket sort sourcelabs splash sql sqlite static string support swing test testautomation threads time transfer tree windows






