πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Launching a Word document in a Java program under Windows 98

#8099
From: Luc BONAMEAU
Date: Wed, 25 Apr 2001 14:09
43 lines
2598 bytes
Hi Joi,

Your solution is good if the document is Microsoft Word document. What if
the is a JPEG image ?
Obviously, you can manually check the file extension and then launch the
proper editor. This assumes that you know the applications you have on your
machine. The program I'm writting is in a distibuted architecture so I can't
know this since every user has got a different machine and different
application installed.


Everything is so simple in NT versions where the command
    cmd /c anyfile.anyextension
launches the right application in fonction of the extension 'anyextension '
Doesn't the same mechanism exist in Win 9x versions ? If no, How could I
reproduice it ?

"Joi Ellis [TeamB]" <joi@aravox.com> a οΏ½crit dans le message news:
3ae6d30d_2@dnews...
> Luc BONAMEAU <alorsc@excite.com> wrote:
>
> > I know that the command processor is cmd.exe under NT and Comand.com
under
> > Win9x. The problem is that Win9x does'nt do any link between extensions
and
> > programs, so the command
> >             Runtime.getRuntime().exec("command /c \"" +
> > c:\docs\anydoc.anyextension+ "\"")
> > doesn't work.
>
> I think you need to launch the editor binary directly.
>
>   Runtime.getRuntime().exec('C:\path\to\word\word  "' +
>      c:\docs\anydoc.anyextension+ '"')
>
> I don't remember if \ has to be escaped in a windows-platform or if you
> can substitute '/' to get around that.
>
> --
> 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: <3ae6da55_1@dnews>
Path: arc1-ca.pugleaf.net!newsfeed.google.com!sn-xit-03!supernews.com!feeds.vnews.net!nntp.cifnet.net!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews
References: <3ae695f7_1@dnews> <3ae6d30d_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f74b3,d184d9727f26bf11
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-04-25 08:12:04 PST
Reply-To: "Luc BONAMEAU" <alorsc@excite.com>
From: "Luc BONAMEAU" <alorsc@excite.com>
Newsgroups: borland.public.jbuilder.java.language
References: <3ae695f7_1@dnews> <3ae6d30d_2@dnews>
Subject: Re: Launching a Word document in a Java program under Windows 98 
Date: Wed, 25 Apr 2001 16:09:22 +0200
Lines: 45
Organization: Arcad Software
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: 62.73.1.89
Message-ID: <3ae6da55_1@dnews>
X-Trace: dnews 988207701 62.73.1.89 (25 Apr 2001 07:08:21 -0700)
Path: arc1-ca.pugleaf.net!newsfeed.google.com!sn-xit-03!supernews.com!feeds.vnews.net!nntp.cifnet.net!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews