dcsimg
Problem regarding the JFileChooser in Applets
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Atul_Kumar
Posted On:   Tuesday, April 24, 2001 06:08 AM

I have to add a JFileChooser onto one button in applets.It is throwing the excpetion AccessControlException.Can you suggest me how to resolve this problem.Although the same program is working fine as a normal appplication..As i have to design my application in such a way that it should behave like applet as well as normal application... I am creating the JFileChooser and attaching it to one browse button in a very normal way i am adding this JfileChooser... Error that is coming is as follows.... java.security.AccessControlException: access denied (java.util.PropertyPermissio n user.home read) at java.security.AccessControlContext.checkPermission(AccessControlConte xt.java:272) at java.security.AccessController.checkPermission(AccessController.java: 399) at java.lang.Se   More>>

I have to add a JFileChooser onto one button in applets.It is throwing the excpetion AccessControlException.Can you suggest me how to resolve this problem.Although the same program is working fine as a normal appplication..As i have to design my application in such a way that it should behave like applet as well as normal application... I am creating the JFileChooser and attaching it to one browse button in a very normal way i am adding this JfileChooser... Error that is coming is as follows.... java.security.AccessControlException: access denied (java.util.PropertyPermissio n user.home read) at java.security.AccessControlContext.checkPermission(AccessControlConte xt.java:272) at java.security.AccessController.checkPermission(AccessController.java: 399) at java.lang.SecurityManager.checkPermission(SecurityManager.java:545) at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:12 78) at java.lang.System.getProperty(System.java:560) at javax.swing.filechooser.FileSystemView.getHomeDirectory(FileSystemVie w.java:109) at javax.swing.JFileChooser.setCurrentDirectory(JFileChooser.java:443) at javax.swing.JFileChooser.(JFileChooser.java:308) at javax.swing.JFileChooser.(JFileChooser.java:266) at FileChooserDemo.(FileChooserDemo.java:21) at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java:237) at sun.applet.AppletPanel.createApplet(AppletPanel.java:579) at sun.applet.AppletPanel.runLoader(AppletPanel.java:515) at sun.applet.AppletPanel.run(AppletPanel.java:293) at java.lang.Thread.run(Thread.java:484)

   <<Less
About | Sitemap | Contact