Important alert: (current site time 7/15/2013 2:30:55 PM EDT)
 

winzip icon

A simple multiple chat v1.0

Email
Submitted on: 6/15/2003 8:42:16 PM
By: Junaidulla  
Level: Intermediate
User Rating: By 40 Users
Compatibility: Java (JDK 1.2)
Views: 45031
 
     First of all let me thank all those of you guys who have voted & liked my previous "single client chat application". At their earnest request I've written this simple multiple client chat application. I hope this turns out to be of some use!!!! Unlike the previous one, here you can have any number of clients. If over a network, plz change the ip & port according to the server machine. With out any change this should work perfectly on any win xx machine...though I haven't tested this on win NT & XP. Let me know if there are any probs! In this release(V1.0) I haven't implemented the clientList and other options. I'm thinking of upgrading this version but mind you it depends upon how many votes I rcv, when deciding to upgrade this??!!! So Plzzzzzzz vote for me. thankx in advance! Yup this program is copyrighted.....you do not have permission to use this code!!!! Just kidding guys, you can use this code in what ever manner and whereever you feel fit...but plz leave a line or two to my credit, if this turns out to be of some help. NOTE: To HAVE CORRECT FORMATTed VIEW OF THIS FILE OPEN IN DOS USING EDIT COMMAND. How to run this??(if u r nu) These are the two files needed to run the chat application... 1)chatServer.java(server, run on only one machine) 2)chatClient.java(chat.htm, downloaded as an applet by as many clients as possible) To compile these two files you need to have JDK1.2 or higher installed on your machine. If you don't have one, you can have your free copy from http://www.sun.com. Now when you have JDK1.2 then you need to have your environment variables pointed to the right directories... compile using the following command at the prompt prompt:> javac chatServer.java prompt:> javac chatClient.java You might get one or two warnings...plz ignore them. Now to run the program... Type in "java chatServer" at the dos prompt... Now you can call the chatClient applet from any html file.... For any Q's feel free to contact me. Thankx for downloading. You can always visit me @ http://mypal.20m.com regards suhail. ENJOY!

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 10 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

6/29/2003 3:35:14 PMRandy McCleary

Nice work, it worked perfect for me. Keep up the good work.
(If this comment was disrespectful, please report it.)

 
10/7/2003 5:04:24 AM

i m trying ur code but on the client machine i m getting this error
Error : java.security.AccessControlException: access denied (java.net.SocketPermission 10.0.0.37:1200 connect,resolve)

i have even made changes in policy file of jdk to grant permission but still get same error
(If this comment was disrespectful, please report it.)

 
11/11/2003 8:32:51 PM

when i am typing the command "java chatServer" in DOS it always says that "java" is not recognized as an internal or external command, operable program or batch file. Could u please tell me how can i make this command recognizable? I found your program really intresting and i am really looking forward to compile it together with the "file tranfer protocol" source code..I dont really know yet how i am going to do that. I will really apprecaite any help from you.
(If this comment was disrespectful, please report it.)

 
12/1/2003 11:02:58 PMjvwintl

Error : java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:1053 connect,resolve)
(If this comment was disrespectful, please report it.)

 
12/14/2003 11:20:10 AM

why I can't run the program from IE,but it can from appletviewer,thx.
(If this comment was disrespectful, please report it.)

 
12/15/2003 12:35:10 PM

hi,its me again......Stanley
from IE,it says Error : com.ms.security.SecurityExceptionEx[chatClient.actionPerformed]: cannot access "127.0.0.1":1053

(If this comment was disrespectful, please report it.)

 
12/25/2003 12:06:37 AM

Sir,
I too am gettin the same prob as stated by someone above. i m trying ur code but on the client
machine i m getting this error
Error :
java.security.AccessControlException:
access denied
(java.net.SocketPermission
198.162.2.101:5248 connect,resolve).
I'm trying it on Win Xp.
Plz let me know what do they mean and what can i do to correct them.
Renu



(If this comment was disrespectful, please report it.)

 
1/28/2004 2:07:12 AMChad Gutowsky

Running it on IIS5 and just wont work.
(If this comment was disrespectful, please report it.)

 
2/9/2004 7:41:44 PM

hii suhail!nice job u did. but i had problem to run multiple chat code, it said : Exception in thread 'main'.java.lang.NoSuchMethodError:main
what that means??? i'm also run the simple Rain code...unluckily it same problem. what should i do???? pls give me a guide....
(If this comment was disrespectful, please report it.)

 
3/13/2004 9:05:03 AM

Hello Mr Suhail! Thanks a lot for this niece piece of code. May i ask which parts of it need to be modified if I needed to implement a chat system similar to the Yahoo Messenger i.e we have different windows for the same person talking to different persons.

Thank you
(If this comment was disrespectful, please report it.)

 
3/13/2004 9:08:23 AM

Hi Mr Suhail. Thank you for this niece piece of code. May i ask which parts need to be modified if i wanted to implement a chat system quite similar to Yahoo Messenger i.e different windows for the same person chatting with different persons.

Thank you
(If this comment was disrespectful, please report it.)

 
4/4/2004 3:59:28 PM

Hey.. NIce work wit the code mate, everything works fine on the server side but when i compile the Client program it gives the error: java.lang.NoSuchMethodError: main
Exception in thread 'main'
(If this comment was disrespectful, please report it.)

 
4/23/2004 7:02:44 PMCaleb Martin

Hey, this chat server looks really cool. but when I compile it and try to run it I get an error saying
(If this comment was disrespectful, please report it.)

 
4/23/2004 7:04:15 PMCaleb Martin

For some reason my last message didn't come through all the way... I get an error message saying:

Exception in thread 'main' java.lang.NoClassDefFoundError: chatServer

What can I do to fix this?
(If this comment was disrespectful, please report it.)

 
6/30/2004 8:18:40 AM

hi great job on the code, looking forward to using it. I am also getting

Error :
java.security.AccessControlException:
access denied
(java.net.SocketPermission
127.0.0.1:1053 connect,resolve)

I have also tried changing the port and IP and still get the 0same error.

Also, do I need to create a war file for the code? of can i just upload the java and class files directly to the deployment directory of my server?

Thanks
(If this comment was disrespectful, please report it.)

 
9/1/2004 1:02:37 AM

hi its me again, kinda curiois whether you have received my mail. Just wanna know whether you are willing to help.. Pls reply as an acknowledgement to my mail...
(If this comment was disrespectful, please report it.)

 
9/17/2004 12:27:10 AM

Hi,

I got

Error :

java.security.AccessControlException:

access denied

(java.net.SocketPermission

127.0.0.1:1053 connect,resolve)

pls advise...tq
(If this comment was disrespectful, please report it.)

 
11/5/2004 4:51:19 AM

Hello

I am getting the error
Error : java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:1053 connect,resolve)

wat shal i do
(If this comment was disrespectful, please report it.)

 
11/5/2004 4:55:31 AM

Hello

I am getting the error
Error
: java.security.AccessControlException:
access denied
(java.net.SocketPermission
127.0.0.1:1053 connect,resolve)

wat
shal i do

(If this comment was disrespectful, please report it.)

 
1/3/2005 11:54:50 AM

Hello

I am getting the error
Error
: java.security.AccessControlException:
access denied
(java.net.SocketPermission
127.0.0.1:1053 connect,resolve)


(If this comment was disrespectful, please report it.)

 
2/3/2005 7:06:05 AM

I m looking for a chat room which will allow users to chat at all times and to be hosted in a server like geocities.com. is there any chat program which can do this.

please mail me- mex_young@yahoo.com
(If this comment was disrespectful, please report it.)

 
2/3/2005 9:02:05 AM

I ran it on windows xp and it ran at 100% CPU.. this is not good.
(If this comment was disrespectful, please report it.)

 
2/5/2005 1:59:11 PM

Hey nice code! i've gotten to work but not over a network of machines. Also, i'd rather be able to get it to work if i put it up on a personal website for me and my friends, if you could tell me how to do it that'd be great! Other than that, great piece of coding!
(If this comment was disrespectful, please report it.)

 
3/8/2005 6:49:45 PMrenyi[ace]

Nice code. Would've gave u 4* if you commented the server code as well as the client code.

Hard for networking noob like me to understand.

:/
(If this comment was disrespectful, please report it.)

 
3/24/2005 11:32:36 AM

u'r work is superb,but i'm getting

(If this comment was disrespectful, please report it.)

 
10/22/2005 9:32:39 AMBlinky

I have a same problam! This is work on localhost, but when i want it to use in local network, so a use another IP (192.168.0.112) i received this message (java.net.SocketPermission 192.168.0.112:1053 connect,resolve)
Please report it!!
(If this comment was disrespectful, please report it.)

 
12/13/2005 4:35:14 AMNaresh

I have a same problam! This is work on localhost, but when i want it to use in local network, so a use another IP (192.168.0.112) i received this message (java.net.SocketPermission .....connect,resolve)
Please report it!!

(If this comment was disrespectful, please report it.)

 
3/29/2006 10:53:29 AMeurotech

HI. I'VE TRYED YOUR APP; IT WORKS QUITE WEEL, BUT WHEN I HAVE MORE THAN 2 USERS IT LOADS VERY SLOW :(
MAYBE U CAN FIND A SOLUTION FOR THAN. OR MAYBE I'M DOING SOMETH WRONG? :(
BEST WISHES
(If this comment was disrespectful, please report it.)

 
5/14/2006 12:51:56 PMandy

Doesn't work in IE6 on XP SP2. It does work if I use Firefox but uses 100% CPU.
(If this comment was disrespectful, please report it.)

 
8/1/2006 2:44:45 PMraj


Excellent work...!
On a local host it runs succesfully but then when I am running it on a network with specific IP iam getting the error (java.net.SocketPermission 198.236.235.10:6023 connect,resolve)when iam running it on a network.
suggest a solution for this.. thanks,
(If this comment was disrespectful, please report it.)

 
10/17/2006 8:06:36 AMGunawan

good, but I need some about chat video with java programming.please give some..

(If this comment was disrespectful, please report it.)

 
11/2/2006 4:13:17 AMRomi Senha

this is good....
(If this comment was disrespectful, please report it.)

 
11/27/2006 1:52:10 PMEddy

i dont believe the logged users is working would you by any chance know how you could get the logged users

(If this comment was disrespectful, please report it.)

 
2/16/2007 6:12:46 AMsss

thank u... still i didnt worked this... i will tell my words later ma...
(If this comment was disrespectful, please report it.)

 
3/23/2007 6:09:51 AMvijay

Nice code, but when i am start chating it is giving Error : Login Name cannot be more than 10 characters long

pls , give me the solutions.
thankyou.
(If this comment was disrespectful, please report it.)

 
3/25/2007 8:18:18 AMddd

nice work man
(If this comment was disrespectful, please report it.)

 
7/25/2007 5:41:24 PMMohsin S

Nice Work man! keep it up ...
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.