| | |
need help for java chat application
![]() |
•
•
Join Date: Feb 2007
Posts: 41
Reputation:
Solved Threads: 2
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...
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...
•
•
•
•
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."
Java Programmer and Sun Systems Administrator
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
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.
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
Java Programmer and Sun Systems Administrator
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
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 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 .....
Edit: And, BTW, this
•
•
•
•
i already created a simple chat server
Last edited by masijade; Oct 4th, 2007 at 5:17 am.
Java Programmer and Sun Systems Administrator
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
•
•
Join Date: Apr 2006
Posts: 164
Reputation:
Solved Threads: 10
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.
A Perfect World
•
•
Join Date: Oct 2007
Posts: 10
Reputation:
Solved Threads: 0
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.
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.
•
•
•
•
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.
![]() |
Similar Threads
- Help with VB.NET Chat Application Interface (VB.NET)
- sms-chat application in vb.net(urgent help needed) (VB.NET)
- Need a java project! (Java)
- XML in Java Mobile application (Java)
- Making a Chatting Application (Java)
- help to set up "Sun Java™ System Application Server PE 8" for web application (Java)
- java chat problem (Windows 95 / 98 / Me)
Other Threads in the Java Forum
- Previous Thread: need help with my java calculator
- Next Thread: Need Help to read .txt file and store its contents
| Thread Tools | Search this Thread |
android api applet application apps array arrays automation awt bidirectional binary birt bluetooth businessintelligence busy_handler(null) card class classes client code collision columns component constructor database designadrawingapplicationusingjavajslider draw eclipse error errors eventlistener exception expand fractal free game gis givemetehcodez graphics gui guidancer html ide image inetaddress integer integration intellij j2me java javafx javamicroeditionuseofmotionsensor javaprojects jme jni jpanel jtree julia linux list loop machine map method methods migrate mobile mobiledevelopmentcreatejar myaggfun netbeans newbie oracle plazmic print problem program project radio recursion scanner server set sharepoint smart sms smsspam sort sortedmaps sql string subclass support swing textfield threads tree unlimited utility webservices windows






