Article View: borland.public.jbuilder.java.language
Article #7377Re: Never mind - found answer
From: Owen Green
Date: Mon, 25 Jun 2001 12:17
Date: Mon, 25 Jun 2001 12:17
17 lines
1610 bytes
1610 bytes
> I see that some system properties aren't available from applets (like
> "user.dir").
>
> I replaced the File and FileReader objects (OK in application) with a URL
> object and its OpenStream() method (for applet). Am still able to use the
> LineNumberReader and the other objects in the same way.
You may find it useful to know that the degree of implementation for URL and
URLConnection is not entirely consistent between browsers - in particular
the openStream method (which in fact just wraps a call to
getConnectionOpenStream() where its actually implemented) , which (iirc)
Netscape doesn't bother with. So use
getConnection().openStream()
to get the stream instead (if you're deploying to a browser anyway).
Hope this proves helpful,
Owen Green
Technical Details
Message-ID:
<3b372be3$1_1@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsReferences:
<3b36491a$1_2@dnews> <3b36591b_2@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,1ed6af6867a96e3 X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-06-25 05:30:39 PST From: "Owen Green" <owen@norobots.unique.com> Newsgroups: borland.public.jbuilder.java.language References: <3b36491a$1_2@dnews> <3b36591b_2@dnews> Subject: Re: Never mind - found answer Date: Mon, 25 Jun 2001 13:17:36 +0100 Lines: 19 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: 213.86.7.136 Message-ID: <3b372be3$1_1@dnews> X-Trace: dnews 993471459 213.86.7.136 (25 Jun 2001 05:17:39 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews