🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #17186

Re: Launching programs from inside Java

#17186
From: Vasudevan Srinivasan
Date: Wed, 09 Dec 1998 00:00
20 lines
1088 bytes
From a Java application:
to spawn a program:
    Runtime rt = Runtime.getRuntime();
    Process pr = rt.exec(<process>);

to delete (kill?) a file:
    File f = new File(<filename>);
    f.delete();

From a Java applet:
    you can use same things as above, but there are lot of other issues like
secuity/signing the applet etc.

Dave Burk wrote:

> Does anyone have any examples of how to launch programs from inside a java
> program? I.E. run a kill command from java or explorer.
> dburk@gte.net
>
> Thanks!!!!
Technical Details
Message-ID: <366EC953.144006F5@netrisk.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <74m2ol$bnv8@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,43e0bd2432a46c54
X-Google-Attributes: gidf74b3,public
From: Vasudevan Srinivasan <vasudevan@netrisk.com>
Subject: Re: Launching programs from inside Java
Date: 1998/12/09
Message-ID: <366EC953.144006F5@netrisk.com>
X-Deja-AN: 420521020
Content-Transfer-Encoding: 7bit
References: <74m2ol$bnv8@forums.borland.com>
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language