This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman 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


Win a copy of Elasticsearch in Action this week in the Big Data 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
Rancher

Joined: Mar 22, 2005
Posts: 42954
    
  73
The alternative would be to sign the applet: HowCanAnAppletReadFilesOnTheLocalFileSystem
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
Rancher

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