aspose file tools*
The moose likes Applets and the fly likes Any way to avoid changing java.policy? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Any way to avoid changing java.policy?" Watch "Any way to avoid changing java.policy?" New topic
Author

Any way to avoid changing java.policy?

Chengwei Lee
Ranch Hand

Joined: Apr 02, 2004
Posts: 884
I've an applet that calls a DLL file in the Windows system32 folder. For JRE 5/6, is there a way to avoid doing this? Or is there a better alternative?



Using IE 6/7, Windows 2000 Professional and/or Windows XP SP2.


SCJP 1.4 * SCWCD 1.4 * SCBCD 1.3 * SCJA 1.0 * TOGAF 8
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41571
    
  54
The alternative would be to sign the applet: HowCanAnAppletReadFilesOnTheLocalFileSystem


Ping & DNS - my free Android networking tools app
Chengwei Lee
Ranch Hand

Joined: Apr 02, 2004
Posts: 884
The applet had been signed. It's calling the DLL via JNI. We can't get it to work without the java.policy. Or are we missing something here?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41571
    
  54
It might be necessary to run the code as privileged code. See HowCanAnAppletReadFilesOnTheLocalFileSystem for how to do that.
 
 
subject: Any way to avoid changing java.policy?