File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JNLP and Web Start and the fly likes Web Start and JFileChooser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "Web Start and JFileChooser" Watch "Web Start and JFileChooser" New topic
Author

Web Start and JFileChooser

Brian Drelling
Ranch Hand

Joined: Oct 02, 2009
Posts: 42
So, I have a program that must be distributed using WebStart, and it has to have Save/Open dialogs. The program runs PERFECTLY (If I may so ) when not in Web Start, but the moment I run it through Web Start, I can't use anything that invokes a JFileChooser.

Is there a reason for this I should be aware of?

If I haven't mentioned enough, let me know and I'll be happy to provide any and all details!
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39543
    
  27
What exactly do you mean by "I can't use anything..." - are there any exceptions if you do so in the Java Concole?

Barring further information I'd guess that the jar file used by the application is not signed, and thus it is not allowed to access the local file system.


Ping & DNS - updated with new look and Ping home screen widget
Brian Drelling
Ranch Hand

Joined: Oct 02, 2009
Posts: 42
Nope, there are no exceptions if I do this outside of Web Start or anything--it runs perfectly fine. Also, the JAR is up to date and everything. Sorry for not being specific, but I simply can't use any command/listener/method that would invoke a JFileChooser.

My JAR is not signed... does it have to be? I suppose I should get to it then.

I asked in another thread, but maybe I should append here if this is the case. Is there a tutorial for signing JAR's? (The CORRECT way.) Or etiquette, conventions, or anything?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18115
    
    8

Yes, you have to sign the jar, and you also have to put a suitable <security> element in your JNLP file.

Here's a link to Sun's JAR tutorial. Hint: if you want a Java tutorial about X then the Google keywords are "java X tutorial". Look for Sun's tutorials in the list, they will usually be at the top.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Web Start and JFileChooser
 
Similar Threads
Setting a path in JFileChooser
JFileChooser lookandfeel
Can't set the Location of FileDialog
JFileChooser save dialog without filename
Desktop icon on NT4, Win98SE, XP, etc