JFILE CHOOSER

Hi,I have created a menu, where user can clicke on the menuItem, when it's clicked JFile chooser open,but i am not able to open any of the file. Please help me outThank u
[226 byte] By [fonz3] at [2007-9-26 1:25:31]
# 1
Hi! :)How about posting some code, so we know where to start from?CUL8er,Nick.
nikolaosb at 2007-6-29 1:07:07 > top of Java-index,Desktop,Core GUI APIs...
# 2

It's a security problem. A java application (especially an applet) doesn't have read/write rights for file access.

Personaly what i do is access files from a read/write servlet. Your JFile Chooser may be useful for retreiving the path of the file that you want to open, and then pass it to the servlet, that reads the file and send it back to you...

JAVA-GUY at 2007-6-29 1:07:07 > top of Java-index,Desktop,Core GUI APIs...
# 3

Hi,

I am trying to use JFileChooser api in an applet to allow user to browse through the files and select one file. But it is giving me the following Exception.

java.security.AccessControlException: access denied (java.util.PropertyPermission user.dir 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.checkPropertyAccess(Unknown Source)

at java.lang.System.getProperty(Unknown Source)

at java.io.Win32FileSystem.getUserPath(Unknown Source)

at java.io.Win32FileSystem.resolve(Unknown Source)

at java.io.File.getAbsolutePath(Unknown Source)

at sun.awt.shell.Win32ShellFolder2.<init>(Unknown Source)

at sun.awt.shell.Win32ShellFolder2.listFiles(Unknown Source)

at sun.awt.shell.ShellFolder.listFiles(Unknown Source)

at sun.awt.shell.Win32ShellFolderManager2.get(Unknown Source)

at sun.awt.shell.ShellFolder.get(Unknown Source)

at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installComponents(Unknown Source)

at javax.swing.plaf.basic.BasicFileChooserUI.installUI(Unknown Source)

at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installUI(Unknown Source)

at javax.swing.JComponent.setUI(Unknown Source)

at javax.swing.JFileChooser.updateUI(Unknown Source)

at javax.swing.JFileChooser.setup(Unknown Source)

I am using signed applet.

Can any one tell me how can I solve this problem?

Thanks in advance,

Regards,

Roja.

Roja_Rani at 2007-6-29 1:07:07 > top of Java-index,Desktop,Core GUI APIs...