Article View: borland.public.jbuilder.java.language
Article #7982Re: Getting Def
From: Erwin Olaerts
Date: Mon, 07 May 2001 07:04
Date: Mon, 07 May 2001 07:04
31 lines
2376 bytes
2376 bytes
Thanks a lot for pointing me out the problems of using CMD. I changed it to
what you proposed. But I still have one question.
Is there a way to find out if no program is linked with a certain type of
files. What I mean is, let's say there is no PDF reader, at this moment I
get a windows message. But I want to catch this in my program, so I can show
my report on another way.
How can I do this ???
"John McGrath [TeamB]" <ng-b@JPMcGrath.net> schreef in bericht
news:MPG.155d7bb8708a9f3e98a19f@forums.borland.com...
> On Sat, 5 May 2001 02:56:10 -0400, John McGrath [TeamB] wrote:
>
> > Runtime.getRuntime().exec("cmd /c Start filename.pdf");
> >
> > Runtime.getRuntime().exec( new String[] { "rundll32",
> > "url.dll,FileProtocolHandler", fileName } );
>
> One more problem with using CMD: If your file name has spaces in it,
> this is going to really muck things up. There may be some way to set
> up the command line properly, but at least my first few attempts at
> doing this from the command line failed. Spaces are not an issue with
> the rundll32 method.
>
> --
> Regards,
>
> John McGrath [TeamB]
>
> ---------------------------------------------------
> Before sending me e-mail, please read:
> http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID:
<3af64909_1@dnews>Path:
arc1-ca.pugleaf.net!newsfeed.google.com!sn-xit-03!supernews.com!cyclone-sjo1.usenetserver.com!news-out-sjo.usenetserver.com!feed2.onemain.com!feed1.onemain.com!newsfeeds.belnet.be!news.belnet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnewsReferences:
<3af165f4_2@dnews> <MPG.155bfe5339e0223c98a18f@forums.borland.com> <3af29d21_2@dnews> <MPG.155d66295a54734398a19a@forums.borland.com> <MPG.155d7bb8708a9f3e98a19f@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,23c4ef4f8da51747 X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-05-07 00:14:02 PST From: "Erwin Olaerts" <erwin.olaerts@idp.be> Newsgroups: borland.public.jbuilder.java.language References: <3af165f4_2@dnews> <MPG.155bfe5339e0223c98a18f@forums.borland.com> <3af29d21_2@dnews> <MPG.155d66295a54734398a19a@forums.borland.com> <MPG.155d7bb8708a9f3e98a19f@forums.borland.com> Subject: Re: Getting Def Date: Mon, 7 May 2001 09:04:28 +0200 Lines: 33 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: 212.123.9.31 Message-ID: <3af64909_1@dnews> X-Trace: dnews 989219081 212.123.9.31 (7 May 2001 00:04:41 -0700) Path: arc1-ca.pugleaf.net!newsfeed.google.com!sn-xit-03!supernews.com!cyclone-sjo1.usenetserver.com!news-out-sjo.usenetserver.com!feed2.onemain.com!feed1.onemain.com!newsfeeds.belnet.be!news.belnet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews