🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: DOS commands within Java

#8325
From: Calvin R. Smith
Date: Fri, 30 Mar 2001 17:33
18 lines
1454 bytes
if running winnt or win2k then command.exe does not exist so use cmd.exe
instead

"Joi Ellis [TeamB]" <joi@aravox.com> wrote in message
news:3ac213cb_2@dnews...
> JJ <jimjj79@hotmail.com> wrote:
> > Is there anyway to execute DOS commands within a Java program?
>
>
>   Runtime.getRuntime().exec("c:\command.com dir");
>
> Should do it.  Not tested.
>
> --
> Joi Ellis (TeamB)
> No direct email, please.
> For best results, post on news server newsgroups.borland.com!
> Newsgroup Info: http://www.borland.com/newsgroups/guide.html
Technical Details
Message-ID: <3ac4c3cf_2@dnews>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!194.213.69.151!news.algonet.se!algonet!newsfeed1.uni2.dk!newssuck.uni2.dk!dnews!207.201.104.90
References: <3ac20db1$1_1@dnews> <3ac213cb_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,96cb889988f7e31f
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-03-30 10:04:20 PST
Reply-To: "Calvin R. Smith" <calvinrsmith@hotmail.com>
From: "Calvin R. Smith" <calvinrsmith@hotmail.com>
Newsgroups: borland.public.jbuilder.java.language
References: <3ac20db1$1_1@dnews> <3ac213cb_2@dnews>
Subject: Re: DOS commands within Java
Date: Fri, 30 Mar 2001 10:33:19 -0700
Lines: 20
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
NNTP-Posting-Host: 207.201.104.90
Message-ID: <3ac4c3cf_2@dnews>
X-Trace: 30 Mar 2001 09:35:11 -0800, 207.201.104.90
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!194.213.69.151!news.algonet.se!algonet!newsfeed1.uni2.dk!newssuck.uni2.dk!dnews!207.201.104.90