File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Java
»
Applets
Author
Any way to avoid changing java.policy?
Chengwei Lee
Ranch Hand
Joined: Apr 02, 2004
Posts: 884
posted
Apr 27, 2007 00:46:00
0
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?
grant { permission java.lang.RuntimePermission "loadLibrary.<mylib>" };
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: 35241
7
posted
Apr 27, 2007 02:09:00
0
The alternative would be to sign the applet:
HowCanAnAppletReadFilesOnTheLocalFileSystem
Android apps
–
ImageJ plugins
–
Java web charts
Chengwei Lee
Ranch Hand
Joined: Apr 02, 2004
Posts: 884
posted
May 01, 2007 21:37:00
0
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: 35241
7
posted
May 01, 2007 23:55:00
0
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://zeroturnaround.com/jrebel
- it saves me about five hours per week
subject: Any way to avoid changing java.policy?
Similar Threads
simple Java editor needed
data structure of choice.
new lines in unix/windows
Returning array To Method
Not so portable afterall ?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter