944,082 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 6702
  • Java RSS
You are currently viewing page 1 of this multi-page discussion thread
Oct 1st, 2007
0

need help for java chat application

Expand Post »
i am creating chat application .can anybody tell me how can i know who is on line on the server and how can i communicate with on line members.

thanks for help
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
pawan_1983 is offline Offline
10 posts
since Oct 2007
Oct 1st, 2007
1

Re: need help for java chat application

first register all ur client with the server.
for a very basic application maintain a list in arraylist.
then when a new user logs in, send this arraylist to him and he'll get the list of users online

for an old user, send this list to the connected user at intervals of say 1 sec.

when a user is logged out, remove that user from the list...
Reputation Points: 10
Solved Threads: 2
Light Poster
hussulinux is offline Offline
41 posts
since Feb 2007
Oct 1st, 2007
0

Re: need help for java chat application

Click to Expand / Collapse  Quote originally posted by pawan_1983 ...
i am creating chat application .can anybody tell me how can i know who is on line on the server and how can i communicate with on line members.

thanks for help

In Other Words: "How do I write a Chat Application?" since the two posted "questions" is pretty much exactly what a chat application is, and possibly implying "Write a Chat Application for me."
Moderator
Reputation Points: 1471
Solved Threads: 490
Industrious Poster
masijade is offline Offline
4,043 posts
since Feb 2006
Oct 1st, 2007
0

Re: need help for java chat application

A google search for java chat application will return tons of useful results. Then if you get stuck on something more specific, let us know.
Reputation Points: 92
Solved Threads: 51
Practically a Posting Shark
Phaelax is offline Offline
856 posts
since Mar 2004
Oct 3rd, 2007
0

Re: need help for java chat application

sir
tell me in detail.i am not rich in java
if possible send me some code for that
thanx
Reputation Points: 10
Solved Threads: 0
Newbie Poster
pawan_1983 is offline Offline
10 posts
since Oct 2007
Oct 3rd, 2007
0

Re: need help for java chat application

It makes no difference whatsoever if you are "rich in java" or not (at least for the first two steps). Sit down and think about what a chat application needs to do, in detail, without any consideration, whatsoever about which programming language might be used.

Once you have figured out what it needs to do, sit down and break these requirements up into "working groups" (i.e. modules) of related functions.

Then you can sit down and start searching through API docs/tutorials/Google for the Java methods you need to implement these functions (hopefully you know at least basic Java, i.e. how to define a class and the varying protection/access modifiers, etc, etc).

Then you can actually start coding. When, at this point, you have a specific question, come back and ask. But we are not going to do any of this work for you. We may nudge you in the right direction from time to time, when you ask (as this response is doing), but we are definately not going to "give you teh codez".

And stop spamming with personal messages. Keep the discussion here so everyone can benefit from it.
Last edited by masijade; Oct 3rd, 2007 at 7:54 am. Reason: typo
Moderator
Reputation Points: 1471
Solved Threads: 490
Industrious Poster
masijade is offline Offline
4,043 posts
since Feb 2006
Oct 4th, 2007
0

Re: need help for java chat application

sir
i already created a simple chat server .clients can chat with this as a room .how can i communicate between two client from connection pool.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
pawan_1983 is offline Offline
10 posts
since Oct 2007
Oct 4th, 2007
0

Re: need help for java chat application

If you are using a server based chat (rather than an everybody to everybody, i.e. with multicast or whatever), then, obviously, you need to have the server accept the message, than send it out to all connected clients. What do you not understand there?

Edit: And, BTW, this
Quote ...
i already created a simple chat server
is not what you said. It would have been extremely advisable to include this sort of information in your first post. That would have definately prevented my last post (which seemd to irk you a bit, admit it). But, like they say, ask a stupid question .....
Last edited by masijade; Oct 4th, 2007 at 5:17 am.
Moderator
Reputation Points: 1471
Solved Threads: 490
Industrious Poster
masijade is offline Offline
4,043 posts
since Feb 2006
Oct 4th, 2007
0

Re: need help for java chat application

ha ha... interesting thing... i also agree, u shud have said abt exactly wat u need to know... besides i have some more question... what kind of server u r using? is it irc? or some thing else?... u said ppl can chat in a room... so does it mean they really don't know who else are in the room?... plz explain briefly wat ur chat server is doing... otherwise, itz difficult to guess.
Reputation Points: 46
Solved Threads: 11
Junior Poster
orko is offline Offline
164 posts
since Apr 2006
Oct 5th, 2007
0

Re: need help for java chat application

sir
i am using tomcat .first i create a server socket and this ss takes message from clients and send back to all clients(that is just like a chat room).
now i want to make client to client communication for private message and yes they dont know who else in the room.

Click to Expand / Collapse  Quote originally posted by orko ...
ha ha... interesting thing... i also agree, u shud have said abt exactly wat u need to know... besides i have some more question... what kind of server u r using? is it irc? or some thing else?... u said ppl can chat in a room... so does it mean they really don't know who else are in the room?... plz explain briefly wat ur chat server is doing... otherwise, itz difficult to guess.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
pawan_1983 is offline Offline
10 posts
since Oct 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: need help with my java calculator
Next Thread in Java Forum Timeline: Game program





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC