accessing files locally with applets

M

Marino Labeeuw

Hi all,

I want to make a small applet that analyzes some textfiles locally.
The problem is that applet are not allowed to access files locally.
I already made a policy file wich grands the applet permission to the files.
This works if I start the html file (wich contains the applet) with the
appletviewer with the following parameters:
appletviewer -J-Djava.security.policy=policyfile LogFileAnalyzer.htm

So, the policy file is correct.

But I don't want to use the application like this. I want to put it on a
server were other people can use this tool wich will access files on their
computers locally.

I want to make my application in that way that the user just allows the
applet to access the files in question locally. Is that be means of
certificates? How do I implement them? I already experimented with making a
certificate (the way the tutorial says on the site of sun
http://java.sun.com/docs/books/tutorial/security1.2/toolsign/index.html )
but I don't know how to link the policy file with the certificate... but I
don't know if this is the way to go?


thanks for the help....

Kind regards,
Marino
 
D

dingo

you are lokking at the right tutorial.
Place it in a JAR file and sign the jar. The user wil be prompted. To trust
your applet (yes no always dialog )

TM
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top