Exit Print View

Java Platform Micro Edition Software Development Kit Version 3.0

Get PDF Book Print View

Document Information

Getting Started

Java ME Platform SDK Features

Using Sample Projects

Running a Project

Troubleshooting

Sample Project Overview

Configuring the Web Browser and Proxy Settings

Resolving Reference Problems

Running MIDP and CLDC Sample Projects

Running the Demos Sample Project

Colors

Properties

Http

FontTestlet

Stock

Add Stock Symbols to the Ticker

Change the Update Interval

Remove a Stock

Stock Tracker

What If?

Alerts

Tickets

ManyBalls

MiniColor

Chooser

HttpExample

HttpView

PushExample

Running FPDemo

Running Games

Running Network Demo

Socket Demo

Datagram Demo

Running PhotoAlbum

Running UIDemo

Creating and Editing Projects

Viewing and Editing Project Properties

Running Projects in the Emulator

Searching the WURFL Device Database

Finding Files in the Multiple User Environment

Profiling Applications

Monitoring Network Traffic

Lightweight UI Toolkit

Security and MIDlet Signing

BD-J Support

CLDC Emulation on a Windows Mobile Device

Installing CLDC Emulation on a Windows Mobile Emulator

On-device Debugging

Command Line Reference

Logs

JSR Support

JSR 75: PDA Optional Packages

JSR 82: Bluetooth and OBEX Support

JSR 135: Mobile Media API Support

JSR 172: Web Services Support

JSR 177: Smart Card Security (SATSA)

JSR 179: Location API Support

JSRs 184, 226, and 239: Graphics Capabilities

JSR 205: Wireless Messaging API (WMA) Support

JSR 211: Content Handler API (CHAPI)

JSR 238: Mobile Internationalization API (MIA)

JSR 229: Payment API Support

JSR 256: Mobile Sensor API Support

Index

Socket Demo

In this application one emulator acts as the socket server, and the other as the socket client.

  1. In the first emulator, launch the application, then select the Server peer. Choose Start. The emulator explains that the demo wants to send and receive data over the network and asks, “Is it OK to use network?” Choose Yes. The Socket Server displays a screen that indicates it is waiting for a connection.

  2. In the second emulator, launch the application, select the Client peer, then choose Start. The emulator explains that the demo wants to send and receive data over the network and asks, “Is it OK to use network?” Choose Yes. The Socket Client displays a screen that indicates it is connected to the server. Use the down navigation arrow to highlight the Send box. Type a message in the Send box, then choose the Send soft key.

    For example, in the client, type Hello Server In the Send box. Choose the Send soft key. The emulator activates a blue light during the transmission.

  3. On the emulator running the Socket Server, the Status reads: Message received - Hello Server. You can use the down arrow to move to the Send box and type a reply. For example, Hello Client, I heard you. Select Send.

  4. Back in the Socket Client, the status shows the message received from the server. Until you send a new message, the Send box contains the previous message you sent.