I have a very simple java applet which reads the audio files data from user directory.
I am using applet function in javascript. The problem is my applet c开发者_StackOverflowloses after 15 seconds automatically and hence the function is not called.
I have signed the applet. Certificate is also generated but applet (more precise file chooser ) closes after 15 seconds.
Any help?
..I am using applet function in javascript
When mixing JS and trusted code, it is necessary to wrap that code in a AccessController.doPrivileged(PrivilegedAction) method. Since appletviewer does not support JS, that suggests why AV can open it, whereas a browser might not be able to.
Alright people, I found the solution. :)
The problem occurs when we use java applet function in javascript. Javascript runs after 15 seconds of page load and this time is left for applet I suppose. When we call the function of applet, it comes up with an error.
So, I changed the algorithm to achieve my requirements. Now I have put all the javascript in one function and I call it from applet. simple!
精彩评论