Need help with Socket prog using Java wireless toolkit
Hi, I am not able to communicate between client (Palm emulator) and server (Java on computer) using Java Wireless toolkit.
Can anyone please tell me a site that shows an example. I have seen a bunch of examples but they all run by importing com.sun.kjava which seems to have vanished into thin air. So I cannot run them. Someone please show me some lines of code that will send just one character from client Palm emulator to server. thanks.
Syed
[473 byte] By [
razarizvi] at [2007-9-26 10:49:33]

hi,
I hope that you already have the J2ME Toolkit and that your emulator works okay. In the toolkit you get several examples to show you how to program a MIDlet. One has to do with a HTTP client server connection. Also in the API documentation for the J2ME there is a Connector class that you used to set up this communication and in the description of this class it pretty thoroughly explains how to set up an HTTP protocol client.
However, if you want to do some other kind of networking then you are pretty much out of luck, as the TCPIP socket protocol has not been fully implemented and is optional to the J2ME specifications, only the HTTP protocol is certain to be available. This means that mobile phone companies can add other networking functionality to their phone's java virtual machine if they feel like it. This is a bummer I know.
I hope this helps.
Cheers,
Mark
Hi,
One other thing! Java on the Palm only allows for the HTTP protocol. So if your Java server is not networking using HTTP, it going to have to, you don't have a choice here. I can only suggest that you use a webserver and change your Java server to a Java servlet to talk to your Palm device using Java on both ends.
Cheers,
Mark