This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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: 42035
    
  64
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: 42035
    
  64
It might be necessary to run the code as privileged code. See HowCanAnAppletReadFilesOnTheLocalFileSystem for how to do that.
 
GeeCON Prague 2014
 
subject: Any way to avoid changing java.policy?