MorganM
MorganM

Reputation: 213

How to access computer drive from an applet running on a browser

I have a created and signed an applet where i need to read from C: of the client computer. When i run the applet from netbeans am able to read C: But when i embed that applet to the browser it cant find the C: drive. How can i achieve this?

Upvotes: 1

Views: 383

Answers (1)

M. Sfakianos
M. Sfakianos

Reputation: 250

According to Oracle documentation Sandbox applets cannot access client resources such as the local filesystem (...)

Also, privileged applets do not have the security restrictions that are imposed on sandbox applets and can run outside the security sandbox.

Therefore, what you need is a privileged applet. Since you have already signed the applet and still have problems you can try running the code as privileged code as presented here.

Note: Signed applet will request trust from the user, usually in a little dialog box in the browser. Maybe check if you have set an "always block" setting in your browser in the past ?

Upvotes: 1

Related Questions