🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #2607

Re: How to search for a file on users hd / my hd in an applet??

#2607
From: Johan Forsberg
Date: Mon, 14 Aug 2000 00:00
56 lines
2995 bytes
"Eric Hodges" <harmony2@swbell.net> skrev i meddelandet
news:398f48d7_2@dnews...
> I tried to do this, but eventually resorted to a JavaScript method to get
> this done.  JavaScript has a method built in that lets you pop up a native
> OS file chooser and select files of the local drives.
>
> It's possible in Java, but requires a lot of security stuff that I never
> quite figured out.  If someone knows, I'm still curious.

Step 1) Buy a certificate. Thawte are good, since you can use the same
certificate
for IE, NS, Java Plugin, Apple Code signing, Marimba etc.
Costs about $100 + a yearly renewal fee.

IE:
2) Use 'dubuild' to create a .cab file and sign it with your certificate.
3) Use the <usespackage> and <usespackageversion> tags in the HTML file to
   import the .cab file. It will land in C:\Windows\Downloaded Program
Files.
4) Swear at MS's stupidity as you find out that the automatically created
OSD
   XML file in the cab links to a MS website adress - *which has been
moved* -
   causing every IE-signed applet in the world to break down simultaneously,
   without even an error message.
5) Loose sleep, hair and sanity as you attempt to construct your own OSD
file.

NS:
2) Rewrite all your code so that every attempt to perform a sensitive
operation is
   preceeded by the relevant call to the netscape security classes (can't
remember
   exactly right now).
3) Create a .jar and sign it with your certificate. The jar will not be
cached
   locally :-(
4) Deploy this jar as usual.
5) (Optional) Loose sleep, hair and sanity attempting to use Netscape
SmartUpdate
   to download and install the classes locally.

JP:
2) Create a .jar and sign it with your Netscape certificate.
3) Deploy. Done! In the java plugin control panel you will see a list of
'Trusted netscape
   signers' or something similar. The applet can be made 'sticky' so that
it's
   cached locally by modifying the HTML code.

I really must say that Java Plugin with Netscape signing is by far the
easiest route
to go. I guess Sun learned their lesson since creating the horribly
convoluted and
impractical security model in JDK 1.1 and 1.2.
Technical Details
Message-ID: <8n8b65$sen2@bornews.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <398abf3d$1_1@dnews> <398f48d7_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,f0949a707fc4e137
X-Google-Attributes: gid1089d0,public
X-Google-Thread: f74b3,f0949a707fc4e137
X-Google-Attributes: gidf74b3,public
From: "Johan Forsberg" <jfo@finansforbundet.se>
Subject: Re: How to search for a file on users hd / my hd  in an applet??
Date: 2000/08/14
Message-ID: <8n8b65$sen2@bornews.borland.com>
X-Deja-AN: 658051846
Content-Transfer-Encoding: 7bit
References: <398abf3d$1_1@dnews> <398f48d7_2@dnews>
Organization: Another Netscape Collabra Server User
X-MSMail-Priority: Normal
X-Priority: 3
Content-Type: text/plain; charset="Windows-1252"
Mime-Version: 1.0
X-Mimeole: Produced By Microsoft MimeOLE V5.00.2919.6700
Newsgroups: borland.public.jbuilder.java.api,borland.public.jbuilder.java.language