apple said:
i want to do multiuser chating program using java applet, and java applet
will be called in html, so is the connection method same if i java file
run as jframe but not applet class file called in html?
Unsigned Java applets can only connect back to the URI from which they were
loaded, they can not connect directly to each other. In other words, two
users can not download a Java applet from the same Web server and
automatically connect and chat with each other. In fact, without some help
from the (a) server, the two Java applets won't even know there is another
Java applet out there to chat with.
As a result, in order to make a multiuser chating program using java applet,
you need to have a _server *application*_ somewhere (probably on the HTTP
server that served up the applets) for them to connect to. This server would
take care of authenticating the various applets, and relaying the text typed
on one applet to all the other applets that are connected to the server.
This server application could be written in Java, or it could be written in
some other language, it would not matter as long as it understands how the
Java applets connect, authenticate and exchange data.