Re: JFOR in Windows

Bertrand Delacretaz <[email protected]> Mon, 15 Dec 2003 07:42:45 +0100
Newsgroups gmane.text.xml.jfor.general
Message-ID <[email protected]>
Le Samedi, 13 d=E9c 2003, =E0 19:04 Europe/Zurich, Phil Chu a =E9crit :

> ...I see the same thing on my XP box, and a URL such as=20
> file:///C:/technicat/www/softdev/gamedev.fo doesn't work, even though=20=

> mozilla accepts it.
>
> I tried changing the code so that a FileInputStream is passed to=20
> InputSource (for the XML parsing) and that accepts plain old=20
> filenames. But then you couldn't type in a general URL, so I don't=20
> know if that is desired behavior.

IMO being able to accept plain filenames at the command-line is more=20
generally useful than accepting URLs, so I'd go for your new solution,=20=

maybe with a command-line switch to the old behaviour.

You could also, read the filename from the command-line, find out if=20
it's a URL (maybe by attempting to create a java.net.URL from it), and=20=

based on this decide how to handle it, either in the "old" or the "new"=20=

way.

Hope this helps,
-Bertrand



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click