File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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
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: 41823
    
  63
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: 41823
    
  63
It might be necessary to run the code as privileged code. See HowCanAnAppletReadFilesOnTheLocalFileSystem for how to do that.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Any way to avoid changing java.policy?