i'm a student and not very good in java programming language.
my lecturer had asked me to develop a simple messenger that have basic features like chat, transfer file, add friend and so on.. anyone here can help me and give me the coding or explain to me how to do it?

Get a book from school library Java How to Program 6th edition from Deitel and read chapter 24. That will give you an idea where to start

Me and a friend of mine developed two chat programs as thought experiments into threading when we were first starting out in Java.

The first was a console based program that used processor threading to read/write to a text file stored over a shared network drive. It had simple admin functions such as ban/silence/clear file and was a fantastic example of learning the client-server relationship.

You can download that program here:

You can use that to get some ideas on how you could handle some of the functionalities that you want to.

The second program was more similar to what you were wanting to write. It had a simple gui, sent messages over the internet like a program such as AIM would, and could add/delete people off a friends list stored in an XML file.

I'm sorry I don't have a copy of that program to show you, but it can be done using Java's connectivity classes in a fairly small size.

thanks for the advice and explaination..i will get back and try and read the info..if i still don't understand i will ask later..but if u have any new info do let me know..thanks

I agree with thegathering, the best way to make a chat program is usually to write inputted lines to a .txt file. This not only works very smoothly but can also be tooled to archive chat lines as well. Good luck! :cool:

ok. but actually i still don't get a picture on how to start my project.

ok. but actually i still don't get a picture on how to start my project.

What are your requirements specifically? Does it have to be over internet? What functions must it have? Does it have to have a GUI?

Start with a list of requirements and work on design from there.

as i said before, it must have the basic features juz like send and receive msg(chat), add friends( require login)..em..of course it will have GUI like any other messenger..it does not specifically have to be on the internet but if i manage to develop it, it will be used on LAN in my faculty..can i use jave xml to the develop this..?

>can i use jave xml to the develop this
Can you justify why do you need to use XML and how you intend to use it?

XML simply describes data, you can't write a program with it. But you can do your communication through XML sent over your connected clients. If you're interested in using XML with chat clients, take a look at the Jabber protocol.