Java Applet Download File

前端 未结 2 1130
有刺的猬
有刺的猬 2021-01-06 18:07

I am trying to build a java applet which downloads a file to the client machine. As a java application this code worked fine but when I tried as an applet it does nothing. I

2条回答
  •  醉梦人生
    2021-01-06 18:49

    See this question,

    Self Signed Applet Can it access Local File Systems

    I believe it will help you, you need to write your code to use PrivilegedAction.

    http://docs.oracle.com/javase/1.4.2/docs/api/java/security/PrivilegedAction.html

提交回复
热议问题