🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.jbuilder.java.api
1 messages
1 total messages Started by jmonrubia Wed, 02 Apr 2003 12:00
Runtime.getRuntime().exec
#660
Author: jmonrubia
Date: Wed, 02 Apr 2003 12:00
44 lines
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 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads