logo
Home / ICE Developer Center / Start Programming

Start Programming with iPush

On-the-fly "Hello world" with Eclipse (page 1 of 5)

Step-by-Step develop an iPush client with Eclipse

July 4, 2006, by Tony Hsiao, Technical Consultant of ICE Technology Corp.

Level: Beginning

API: Java Package

Printing-friendly version

Background

This article shows the developer how to use the Java development tool - Eclipse to write a simple iPush client in 10 minutes. This illustrates the simplicity of iPush programming for developing real-time messaging applications.

Requirements

Before you start to exercise this programming example, make sure your environment got:

  1. J2SDK 1.3 or above installed. (get J2SDK from http://java.sun.com)
  2. Eclipse 3.0 or above installed. (get Eclipse from http://www.eclipse.org)
  3. iPush V2 Java Package API (Java.zip) and extract it to a folder. (get iPush V2 Java Package API from http://www.icetechnology.com/developer/download.jsp, need you to be a member of ICE Developer Center first)

Start it up

Follow the instruction in each step to build your iPush Java application with Eclipse.

Step 1 - Create a new Project

Open the Eclipse, and select [File] / [New] / [Project].

Figure 1. open a new project

Step 2 - Select a wizard

(a) In [New Project] dialog , select Java Project to launch the wizard.

(b) Click the [Next] button.

Figure 2. select Java Project wizard

Step 3 - Set properties of the project

(a) In [New Java Project] dialog, type iPushDemo in the Project name field.

(b) In Project layout pane, we recommend you select Create separate source and output folders.

(c) Click [Next] button to continue.

Figure 3. give a project name

Step 4 - Add iPush Java API to the project

(a) Click <Libraries> tab, and click [Add External JARs] button.

Figure 4. switch to <Libraries> tab

(b) In the pop-up [JAR Selection] dialog, select the iPush V2 Java Package library file - iceipush2.jar which you've downloaded.

Figure 5. add iceipush2.jar as external package

Note: actually, we recommend you select iceipush2_jvm1.5.jar instead of iceipush2.jar to get faster connection to iPush Server when you are using J2SDK 1.5 or JRE 1.5.

(c) Now you can see the iceipush2.jar shown in dialog. Click [Finish] button to generate this new project.

Figure 6. finish and generate this iPushDemo project


Page 1 of 5  |  1  2  3  4  5

next page