Solved

Simple JAVA Server

Posted on 2001-06-22
3
185 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
  • 2
3 Comments
 
LVL 1

Expert Comment

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

Expert Comment

by:goldwarlock
Comment Utility
btw: visit my site
www.xanga.com/goldwarlock
0
 
LVL 2

Accepted Solution

by:
jorj earned 50 total points
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

743 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now