i am doing a master project on how java applet works with web browsers.Can anyone give me details or any link that can be useful.How the web browser interacts with the java applet.
- Download the source of Mozilla (Firefox, e.g.)
- Read the code that integrates the JRE for applets.
- Ask more questions when specific issues arise.
Maybe a simple answer will be enough and it won't require reverse-engineering Mozilla.
Until recently, applets did not interact much with the browser. The browser sent only 'start', 'stop' and 'resize' events to the applet and the applet could order the browser to open new web pages. With the Java 6 update 10, there is a possibility to call Applet functions from JavaScript and to call JavaScript from an Applet, as long as they are on the same page.
The browser creates a 'sandbox' to run the applet. The sandbox limits the access rights of the applet (e.g. applet can connect to TCP ports only on the web server, cannot access files directly on the client file system, etc.). Besides these limitations, an applet is like an autonomous application running on the client box.
You can find info on applets at 'http://java.sun.com/applets/' and 'http://java.sun.com/docs/books/tutorial/deployment/applet/index.html'