Article View: borland.public.jbuilder.java.language
Article #15907Re: OK, now I need a Thread.
From: Richard Wilkman
Date: Wed, 14 Apr 1999 00:00
Date: Wed, 14 Apr 1999 00:00
60 lines
2778 bytes
2778 bytes
Jason: File I/O is blocked for Applets by design. You might want to go out and get a good Java reference (Java in a Nutshell is a good one); most give a pretty good idea of what you can and cannot do with Applets. Hint; it's a shorter list if you stick to what Applets are allowed to do. An Applet can read a file from the server it resides on, but can only do so via streams. You can't create a File object on it because the File class has stuff hanging off of it that Applets aren't allowed to do. Instead you create a URL to the file on the server, open a stream from the URL and suck down the bytes for processing in the Applet. You don't get to write back to the server and you don't get to open or even sniff at files on the client without jumping through flaming hoops. -Rich Jason C. Leach wrote: > > Well. Deploying an app is a little harder than writing it, for me at > least. Maybe some people find it the other way arround. > > I suppose I can see why that would cause security problems. Then again, > if the user is selecting the files, why not? It would be no different > than taking the risk of downloading a file (EXE) from the net, and > running it. At least if it's a web page you can track the > applet/server/author down. > > I don't have much luck deploying files. As I am doing this in JDK 1.2 I > can only emagine what trouble the wizzard would cause me. > > Do you think what I am doing is not going to work in Java or as an > Applet/JFrame? > > Thanks, J. > -- > > �,+���+,��,+���+,�* > ....Jason C. Leach > ..."Many Hands Make Light Work." > ..- Unknown > > -- PGP key on server: pgpkeys.mit.edu -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Rich Wilkman Senior Quality Assurance Engineer Borland JBuilder Team If you see something that looks like an opinion up there, it's mine and mine alone. Mail sent to me from the newsgroups won't bounce but will be ignored. If I have time, I'll respond, but you have a better chance if you confine your posts to the newsgroups =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Technical Details
Message-ID:
<3714B46D.BA4B39CA@inprise.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3712C69C.A921A9B0@hotmail.com> <3713A9F0.D60E3E54@inprise.com> <3713DE30.F31939AB@hotmail.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f74b3,e8e45b2956d295c6 X-Google-Attributes: gidf74b3,public From: Richard Wilkman <rwilkman@inprise.com> Subject: Re: OK, now I need a Thread. Date: 1999/04/14 Message-ID: <3714B46D.BA4B39CA@inprise.com> X-Deja-AN: 466330041 Content-Transfer-Encoding: 8bit References: <3712C69C.A921A9B0@hotmail.com> <3713A9F0.D60E3E54@inprise.com> <3713DE30.F31939AB@hotmail.com> Content-Type: text/plain; charset=iso-8859-1 Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language