开发者

Want to send client's screen image at periodic interval though applet. Java

I am using applet that is embedded in my web page. I am using Robot class to get client's screen as a image and send the BufferedImage using sockets. Problem is i am getting PrivilegedAccessException as soon as i do :-

Robot r = new Robot();

I don't want to force my user to change their java policies for my application. What alternatives do i have to capture client's screen?

Secondly, if i run my application directly from Netbeans 6.8 (not from web page), i get error that BufferedImage is not Seri开发者_如何学运维alizable when i write an object of BufferedImage to socket. How to get rid of this problem?

Thanks in advance :)


You'll need to create a signed jar with your applet and the permissions you need on the client machine. You can read more here. The applet will then ask the user if he/she trusts the applet before allowing it to be run.

For the serializable bit, you'll have to convert the BufferedImage to a serializable file. If you have to do that you can just as well compress it using PNG. This will speedup the transfer a lot, usually an order of magnitude.Here is more info about that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜