Skip to main content

writing` client server like application

2 replies [Last post]
Joined: 2008-03-21


i have build phoneme contain CLDC and MIDP for ARM 9 board . my board dont have LCD and i have to test java application (network application) with help of this run time on board . so how can i write any network application or client server application with help of this CLDC and MIDP stack? . that is communication will be happen through hyperterminal.
can anybody tell which classes should i use to write this application? or is it possible to develop such kind of application on this stack?

thanks in advance!!!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-06-15

Hi Tuxc,

Congrates on getting the phoneme stack running on your ARM9 board.

Yes with the CLDC, and MIDP libraries/stacks you should be able to run a network app.
The only concern I have is since you have no head on your system (no LCD) how does the graphics work? This may cause an error in execution of example code.

However to test out your system using network code, you should look at the NetworkDemo code that comes with the WTK (Wireless Tool Kit). You will most likely need the WTK to build your Jad/Jar files.

In the NetworkDemo example there is a class in the "socket" package called "" and the run() method has the code you would use to setup a network connection.
One important key to remember is that your network communication needs to happen in it's own thread. This is why the logic in the example is in the run() method and that the class implements Runnable.

If you need more information on how the MIDP network code is designed you should google for the words "j2me generic connection factory".

Best regards,

Joined: 2008-03-21

hello sfitzjava thank u !!!
i'll try with this . one more thing i want to ask if i want to pass msgs from client to server or vice versa or if i want to take input from user there will be use of [b][/b] as used normal java . i found that phoneme ( whtever i build) is not supporting this type of input or . it supports through textboxes (in midlets). so is there is any method to take input (text based) ? .