Hi all,

Here's the problem I have. I am designing a website in HTML and I want to include a chat system using a Java applet. I have written a small example applet that just connects to my server and gets the users that are currently online. The applet works when I run it in Eclipse but I tried to launch it from the browser and I got a SocketPermission exception.

I did some reading on the subject and found out that I need to make some changes to the java.policy file in order to grant my applet access to the socket. Also I found a couple of discussions here in the forum but couldn't find anything that actually describes the process of signing the applet. I read something about using a JAR file to include all files that the applet needs (including a java.policy file) but I am not sure how to do that. In addition, I read that the policy file is contained in the Java directory on each client's machine. So my question is how can I connect my applet to the server without having the user download a policy file or having to do any configurations?

Where are all the parts of your application(applets, html, server) and how do they communicate?
An applet can connect to the server it was loaded from.
Are you trying to connect with another server from your applet?
What code do you have on the server to control the chat sessions?

Edited 5 Years Ago by NormR1: n/a

Thanks for the links :) I checked them out but I decided to use Javascript and Ajax for the chat system.

This question has already been answered. Start a new discussion instead.