Search code examples
javaimageappletdicom

Run applet java in html


I have an applet java displaying images from folder ,i cant run this applet using html i have this error :

enter image description here


Solution

  • The error you are getting is because your applet is trying to read a file from a directory in the local system where it is getting downloaded. This is a standard security feature. This of this way, you go to a website which downloads an applet and read a file or executes an .exe in your local system. Naturally this should not be allowed for an applet / javascript or code served from a server.

    You need to create a signed applet. Please go through the following link to accomplish your need :

    http://www.developer.com/java/other/article.php/3303561/Creating-a-Trusted-Applet-with-Local-File-System-Access-Rights.htm