dcsimg
How to load dll by using Applet?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Wednesday, November 5, 2003 02:50 AM

hi all, I know this topic is not something new. But after long searching thru the web. Its really not much information and tutorial to work thru this. Some provide 50% information then left the other half unspoken. :( Hope above not creating sound irritating. Some article saying that we can actually load the dll using signed Applet. Therefore I try up it. Unfortunately, I'm having trouble to get access the Java permission: Init java.lang.ExceptionInInitializerError at IntArrayApp.init(IntArrayApp.java:9) at sun.applet.AppletPanel.run(AppletPanel.java:353) at java.lang.Thread.run(Thread.java:534) Caused by: java.security.AccessControlException: acce   More>>

hi all,


I know this topic is not something new. But after long searching thru the web. Its really not much information and tutorial to work thru this. Some provide 50% information then left the other half unspoken. :(
Hope above not creating sound irritating.



Some article saying that we can actually load the dll using signed Applet. Therefore I try up it. Unfortunately, I'm having trouble to get access the Java permission:



Init
java.lang.ExceptionInInitializerError
at IntArrayApp.init(IntArrayApp.java:9)
at sun.applet.AppletPanel.run(AppletPanel.java:353)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission loadLibrary.IntArray)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
at java.security.AccessController.checkPermission(AccessController.java:401)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
at java.lang.SecurityManager.checkLink(SecurityManager.java:810)
at java.lang.Runtime.loadLibrary0(Runtime.java:782)
at java.lang.System.loadLibrary(System.java:834)
at IntArray. (IntArray.java:20)
... 3 more


Can I seek from your gentle helping hand to work it out? First, I create a native method class. Second I create an Applet that will load the dll. All class and dll are in a jar file. Lastly, signed the jar file using keytool and jarsigner. Hence, I create a simple html:





ARCHIVE=IntArrayApp.jar
width="300"
height="400">





After all, what should I do in the java.policy in order to let it run via both browser and appleviewer? And what should I do next?
Assume that I start the appletviewer at the working directory. I'm using w2k for Java development. IE 5x version. Please help.


regards,    <<Less
About | Sitemap | Contact