Get your CodeRanch badge!*
The moose likes JNLP and Web Start and the fly likes Write a file to filesystem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "Write a file to filesystem" Watch "Write a file to filesystem" New topic

Write a file to filesystem

Ricardo Queiros

Joined: Aug 02, 2011
Posts: 2

How can I save a file on the client's file system using a JWS application without have to launch the saveFileDialog method of the javax.jnlp.FileSaveService class?

Best regards
Alexander Kober
Ranch Hand

Joined: Aug 05, 2011
Posts: 32

In order to access the file system (for read or for writes does not matter) without the JWS Services you need to ask for full permissions when starting the application. You can do that by adding <all-permissions/> to the security section of your JNLP file (note, however, that your classes have to be signed for this).

Unfortunately, there is no finer-grained security concept for Java Webstart. You can either have no permission at all, forcing you to use the services for everything, or request all permissions even if you don't really need them.
jQuery in Action, 2nd edition
subject: Write a file to filesystem
Similar Threads
java io
performance issues with file read and write
Creating a file by giving relative path
WA #1.....word association
Struts FormFile (parsing .csv files)