Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FilePermission question

Status
Not open for further replies.

tmryan

Programmer
Dec 22, 2000
73
US
Newbie to Forte and pretty new to Java.
I have a simple little applet that prompts name and e-mail address and when a button is pressed - it appends to a file. Did it first in JBuilder and it works fine. Did it next in Forte - and when I run it I get the following exception:

Exception occurred during event dispatching:
java.security.AccessControlException: access denied (java.io.FilePermission email.lst write)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:272)
at java.security.AccessController.checkPermission(AccessController.java:399)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
at java.lang.SecurityManager.checkWrite(SecurityManager.java:978)
at java.io.FileOutputStream.<init>(FileOutputStream.java:96)
at java.io.FileWriter.<init>(FileWriter.java:52)
at fwriter.bUpdateActionPerformed(fwriter.java:91)
at fwriter.access$0(fwriter.java:86)
at fwriter$1.actionPerformed(fwriter.java:75)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1450)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1504)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:378)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:216)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:230)
at java.awt.Component.processMouseEvent(Component.java:3715)
at java.awt.Component.processEvent(Component.java:3544)
at java.awt.Container.processEvent(Container.java:1164)
at java.awt.Component.dispatchEventImpl(Component.java:2593)
at java.awt.Container.dispatchEventImpl(Container.java:1213)
at java.awt.Component.dispatchEvent(Component.java:2497)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2216)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
at java.awt.Container.dispatchEventImpl(Container.java:1200)
at java.awt.Component.dispatchEvent(Component.java:2497)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:131)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:98)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)

Can someone point me in the right direction?

Thanks
Tim Ryan
PROGRESS Developer
 
Hi,


You have to give permission to the files u r going to access through ur applet by mofifying the java.policy file.

bye

Mohan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top