First of all excuse me if I don't choose proper forum for my question
I've written an applet with javafx which have to have access to some local file. I have no problem when compile and run it from netbeans BUT when I lunch final .html file or run it from EasyPHP I get access denied error!
Caused by: java.security.AccessControlException: access denied ("java.io.FilePermission" "posting" "read") at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at java.lang.SecurityManager.checkRead(Unknown Source) at java.io.FileInputStream.<init>(Unknown Source) at java.io.FileInputStream.<init>(Unknown Source) at java.io.FileReader.<init>(Unknown Source) at temp.MyRead.openFile(MyRead.java:33) at retreival.Indexer.load(Indexer.java:153) at layoutsample.LayoutSample.start(LayoutSample.java:72) at com.sun.javafx.applet.FXApplet2$1.run(FXApplet2.java:132)
I've eddited java.policy and javafx.policy in my jre and jdk security folder (java 7) in this way :
permission java.io.FilePermission "C:\\Users\\sara\\Documents\\NetBeansProjects\\LayoutSample\\LayoutSample\\posting", "read";
but it didn't work !
Could anyone help me please ? I want to run my app in localhost