I understand that java applets are not allowed to access the users local file by default unless the applet has been signed by verisign. http://www.verisign.co.nz/codesigning The user still has to accept the security certificate I believe before the applet can have access to the local files. This is understandable as you would not want an applet to access things it shouldn't how ever they also seem to block access to remote files as well such as files on the www.
My build folder in the picture has folders for images and when the applet is run under netbeans the applet can still access and use them. How ever when I run the applet through the broswer it does not have access to the files and gives a permission denied error. This I believe is where the security policy of applets restricts access to in my case local user files. I have tried to use relative paths but the applet does not find the image files. Instead I have to use the System.getProperty("user.dir") and append on the child folders. This method works in netbeans as applets running on the applet viewer has different access rights compared to when run through your browser.
String imgUrl = new String(System.getProperty("user.dir") + pathSep + "src" + pathSep + "bg.png");
How then is one able to create an applet that does not require sign certificates that can allow access to image files stored in the child folders of the class files? This is very frustrating and I need to find a solution as soon as possible as my project deadline is closing. I have looked at singing certificates and they seem like they are not free. Am I wrong?
















