Article View: borland.public.jbuilder.java.api
Article #660Runtime.getRuntime().exec
From: jmonrubia
Date: Wed, 02 Apr 2003 12:00
Date: Wed, 02 Apr 2003 12:00
44 lines
1979 bytes
1979 bytes
Hello!
I want to do that:
Process p = Runtime.getRuntime().exec("CntVirRel.exe");
System.out.println("Procesando.....");
p.waitFor();
System.out.println("waitfor end");
which seems easy.
My problem is that if I put this code in a program using only the jdk
(without the JBuilder), then this works. The program which works is:
********************************************************
import java.io.*;
public class Example
{
public static void main (String args[]) throws IOException
{
Process proc = Runtime.getRuntime().exec("CntVirRel.exe");
try
{
System.out.println("Empieza a esperar");
proc.waitFor();
System.out.println("Acaba la espera");
}
catch (InterruptedException e){}
}
}
********************************************************
But if I put the same code in my JBuilder program in a "void
jButton13_actionPerformed(ActionEvent e){}", then this doesn�t work and I
don�t know why?
With certainty I can say the program see the exe file.
Thank you in advance.
Request to my email if you want: gva09@elai.upm.es
Technical Details
Message-ID:
<3e8ad0eb$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 1089d0,a12f612ac2d3e1d5,start X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2003-04-02 04:10:09 PST From: "jmonrubia" <gva09@elai.upm.es> Sender: "jmonrubia" <gva09@elai.upm.es> Reply-To: "jmonrubia" <gva09@elai.upm.es> Subject: Runtime.getRuntime().exec Newsgroups: borland.public.jbuilder.java.api X-User-Info: 138.100.100.133 138.100.100.133 NNTP-Posting-Host: 207.105.83.65 Message-ID: <3e8ad0eb$1@newsgroups.borland.com> Date: 2 Apr 2003 04:00:43 -0800 X-Trace: newsgroups.borland.com 1049284843 207.105.83.65 (2 Apr 2003 04:00:43 -0800) Lines: 45 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail