Top.Mail.Ru
June 1st, 2006 - Java developers — LiveJournal
? ?

Java developers

June 1st, 2006
Image

11:19 pm - Imagedeana_in_texas - I need a file chooser for my applet!

Any of you know how to make JFileChooser work in an applet? Is it even possible?

I would like to put a file chooser in an applet I'm working on. The example code on the java.sun.com site works fine on my computer, but when I try to use it in my applet I get a compile time error. The stack trace starts:

java.security.AccessControlException: access denied (java.util.PropertyPermission user.dir read)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)


I tried using the JWSFileChooserDemo stuff that is linked to in the JFileChooser tutorial, but it seems to be outdated and doesn't work properly either. When I use that, I get a message that JWSFileChooserDemo.java uses or overrides a deprecated API, which whatever I don't care, but then...

Exception in thread "main" java.lang.NoClassDefFoundError: javax/jnlp/UnavailableServiceException

This is their example code, which is an Application, rather than an applet. So I'm totally at a loss.

Ideas?
Powered by LiveJournal.com
Image