4.3 Mobile Phone Midlet Building And Deployment

To build Java application a few things should be set up. First of all, Eclipse for Java Developers needs to be installed, available at Eclipse site. The next required component is Siemens Mobility Toolkit (SMTK), its Official http://wwww.siemens-mobile.com site is not available anymore but SMTK still can be found in the Internet, for example, at http://www.siemens-club.ru (unfortunatelly, this site is only in Russian). The toolkit comprises of at least two modules, SMTK Core Pack which is located here: http://download.siemens-club.ru/files/smtk/smtk_2_00_3b.exe and Siemens CX65 phone emulator itself, it can be found here: http://download.siemens-club.ru/files/smtk/cx65_11_119_41.exe. In fact, more than one emulator could be installed at once, the SMTK basically allows to choose which one to emulate. To bind Eclipse platform and the emulator toolkit there is an eclipseME plugin available at http://eclipseme.org.

As soon as all abovementioned tools are installed and set up, phone midlet might be built. Run Eclipse. Select File -> Import. In opened wizard dialog select General -> Existing Projects into workspace. Click Next and select root JSR75Patch project directory location. The project should appear in Projects list in the wizard. Click Finish to complete, the project will appear in Package explorer view. In same manner import the second project called PUploaderCom.


If there are many precompilation errors it means that EclipseME plugin has not been set up properly or basically a new empty workspace has been created. A detailed EclipseME configuration guidance is accessible here: http://eclipseme.org/docs/configuring.html. In our case Siemens Mobility Toolkit 2.00.3b should be imported as a device to be used by J2ME projects under J2ME -> Device management item settings accesible by Windows -> preferences drop-down Eclipse menu.

After that all already imported projects should be configured to use that just imported J2ME device. It could be done by right mouse click on a project in Package Explorer and filling Group and Device fields in J2ME settings.

Finally the projects should be free from precompilation errors.

One more thing should be done before building procedure - the midlet should be configured which remote server to use for data upload. In Package Explorer in PUploaderCom project double click on PUploaderCom.jad file. A new window with JAD properties will appear. Choose User Defined tab and three properties will be displayed. Set Default-Host to your web server host name or IP address which will process data received from our security system (or systems). Set Default-Port number if using non-standard HTTP port. Set Default-Addr to our PHP script, by default it is set to /dl/dlLog.php. For more information about web server configuration please refer to the next section below. The midlet is configured now.

In Package Explorer do right click on PUploaderCom project and choose J2ME -> Create Package. Two files, PUploaderCom.jad and PUploaderCom.jar will appear under deployed item in the project tree. Building is complete.