Search code examples
javafile-permissionsjava-web-start

java web start File Permission


Can Java Web Start allow to access file from client machine or not? I have tried to write a file on client machine from the server, but it's giving an error:

access denied(java.io.FilePermission).

Can you just tell me that user can write file on client machine or not.


Solution

  • Ok first of all you need to ensure that you are "signing" your apps .jar's, secondly you need to adjust your .jnlp file and set the permission you are requesting to write in your case the below would more than suffice:

    <security>
         <all-permissions/>
    </security>
    

    (this is explained here http://docs.oracle.com/javase/7/docs/technotes/guides/javaws/developersguide/syntax.html#security)

    and signing is explaining here http://docs.oracle.com/javase/7/docs/technotes/guides/javaws/developersguide/development.html#signing

    Hope this helps!