Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Simple JAVA Server

Posted on 2001-06-22
3
Medium Priority
?
226 Views
Last Modified: 2013-11-24
Hi,

I'm a newbie in Java so.. please don't laugh ;)

I need a simple Java server on which clients can connect. And every Message one Client send, all connected clients should recieve them.

If somebody maybe have some samples ...

I use JBuilder 4.

Of course the server should be in a own Thread...

Thanks alot
Lycar
0
Comment
Question by:Lycar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Expert Comment

by:goldwarlock
ID: 6219538
Use Java Servlets
Any example on generic servlet will help you
0
 
LVL 1

Expert Comment

by:goldwarlock
ID: 6219608
btw: visit my site
www.xanga.com/goldwarlock
0
 
LVL 2

Accepted Solution

by:
jorj earned 200 total points
ID: 6223443
You don't need a servlet for this; a java server will do the job.

Basicaly you have to create a server that listens on a port. When a new client connect you will have to create a client object which keep also the port number the clients has connected, its nick and whatever you need and put the client in a list. Any incomming message is then sent by going throught the list and calling a client.sendMessage() method. You must take care of the nickname to be unique in the list, so you can use the nick as an ID in order to know each message's source.

As I saw you are a java programmer so you will not have problem in creating a java server. With the rest I can give you more details if you need.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question