You are on page 1of 41

Beginners Guide to Building J2ME Apps

First install Java SDK


1
(and don ask me why) If ya have lazy comp such as mine ( II! "#$ %&z! 1'$%( )*%! +in ,)! I
recommend to install Java - SDK Version 1.4.2_08 . /ou mi0ht install 1i0er (Java 1.#) 2ut 3clipse will han0 a little 2it (if
you don know what4s 3clipse don worry).
+here to find Java SDK5 6o to Sun4s we2 site! I think it is http788www.sun.com ! find their Search 2o9 and type7 j2sdk-
1_4_2_08-windows-i586-p.exe or Java - SDK 1.:.-;$<
+hen you download it on yr comp! =ust start typical installation! don chan0e default settin0s. 1hat4s how you4ll have 2oth
Java SDK and u2lic Java )3
-
.
(ravo> ?ow it4s time to install 3clipse. It4s really coooool ID3
"
! you can fill it up with cooool plu0ins such as J-%3@olish!
or 3lipse%3 so you can develop coool J-%3 apps.
Download and installation of 3clipse is easier than installin0 Java SDK. Just 0o to 6oo0le and type A3clipse ".$B and that4s
it5 Cn 3clipse site you 2etter find version ".$. File name is pro2a2ly eclipse-SDK-3.0-win32.ip or somethin0 like
that.
Download it on yr comp and =ust e9tract it somewhere. I always e9tract it at )CC1 D7E
I use +in)*) for that task.
?ow that you installed Java and 3clipse! 0o a0ain to Sun4s we2site and search for J-%3 +ireless 1oolkit. It4s free. 1he file
name should 2e j2!e_wireless_"oolki"-2_2-windows.exe
Download it and install it. +hen ya finish it up! start its tool Ktoolbar! =ust to see the ma0ic of emulation. First! this window
should appear7
Dhoose pen pro!e"t! select #e$o%#& pen 'ro!e"t& then (un and emulator will appear
1
Java Standard Development Kit F cooool stuffG you can develop anythin0 what you can ima0ine with Java SDK for free. +hat you need 2eside
SDK is ?otepad or +ordpad or %S +ord! and the world of pro0rammin0 is yours. (utH
-
Java )untime 3nviroment F send me email if you want to hear my opinion a2out it (zareacI0mail.com)
"
ID3 is Inte0rated Development 3nviroment. It helps you develop yr poetry in Java! it helps you edit yr sonets! scru2 Jem! compile! run! de2u0!
o2serve! implement! inherit and all other sweet thin0s from one place. /ou can do it all in %S +ord or ?otepad! and then click File8Save! and then
0o on Start8)un8cmd.e9e and then chan0e directory with cdE and then find emulator.e9e or compiler =avac.e9e! and so on! and on F it will kill you.
Definitely use any ID3! and it4s 2est if ID3 is free! such is 3clipse
file from 3clipse%3 we2 site! and you have fast link! you mi0ht start the installation over the ?et.
(ut if you4re poor 2astard with dial@up! then you 2etter 0o to your e9@0irlfriend and download the file to install it locally!
that is from yr hard drive. *nd don worry! you have all the prereKuisites
for doin0 the installation! 2ut if you4re not sure check ne9t chapters. ?ow what follows is description of 3clipse%3
installation. It is description of 1+C DIFF3)3?1 +*/S to install the 2itch! so 2e carefull what you want! and what you
are. 1wo options are
Installing via the EclipseME Update site!!!! (over the ?et)
Installing via a downloaded archive site!!! (from the hard drive)
?ow read this 3clipse%3 tutorial! and after that I4m comin0 2ack.
If you want to see application
you should definitely click on
2uttons pointed 2y red arrows.
It4s cool isn4t it5 6uys from Sun
did their =o2. (utH +hat if you
want to create yr own apps.
1hat4s where 3clipse =umps in.
6o to folder where you installed
3clipse and start the tool. 1his
shouldn4t 2e a pro2lem. /ou4ll
find there an icon e"lipse.e)e
Eclipse.exe
It4s nice! isn4t it.
Start the eclipse! and follow the
steps on the followin0 pa0es.
*ctually! you have to install
3clipse%3 lu0in. It4s cool
stuf! it lets you run emulator
from 3clipse ID3. 1hat means
you can write yr Java apps!
compile them! and then run
them in emulator! =ust like we
did with Demo"D.
Installation of 3clipse%3 is
little 2it tricky if yr an idiot
such as me. +hy is that5 1here
are two ways to install it7 over
the net or from yr hard drive. If
ya didnt download
eclipse!e.#ea"$re_0.%.5_
si"e.ip


J2ME Development using Eclipse
"From zero to mobile in minutes"




Installation
This document provides instructions on how to install or upgrade EclipseME.
0.Before ou !egin
1. Install the "ireless #ool$it%s&
-. Installing EclipseME
a. Decide on our approach
2. Installing via the EclipseME Update site
c. Installing via a downloaded archive site
". 'onfigure the "ireless #ool$it (ettings
:. 'hange Eclipse)s De!ug (ettings
#. 'onfigure *ro+uard %,ptional&
'. 'onfigure ,#- options %,ptional&
L. Updating our EclipseME installation
a. If ou installed via the EclipseME Update (ite
2. If ou installed a downloaded archive site
<. .emoving EclipseME
a. #he /0ormal/ wa
2. #he /Brute 1orce/ method
c. .emoving EclipseME traces from a pro2ect
0. Before ou !egin
1. Please make sure you have all the prerequisites. *+ou ,a-e& don .orr+/
-. If you have a version of EclipseME prior to 0.5.0 installed remove it !efore installing a new one. In
addition read the migration instructions to see if there are any specific steps you need to take to
update a pro"ect created with the old version to the new version.
If you have EclipseME version 0.5.0 or later installed you do not need to remove it. The installation
procedure !elow will automatically upgrade your EclipseME installation.
". #lthough it is not mandatory we strongly strongly suggest that you configure Eclipse to use separate
source and output foldrs in new pro"ects. $egretta!ly this is not Eclipse%s default setting. *do t,is000/
To make this change &elect the Preferences menu item from Eclipse%s Window menu e'pand the Java
item in the left pane and click on the Build Path item. In the right(hand pane select the Folders radio
!utton. #fter you do this the dialog should look like this)

If you do not configure Eclipse for separate source and output folders some features of EclipseME such
as resource folders will not work.
:. *inally if you have !een using Eclipse without EclipseME to do +,ME development using a -ireless
Toolkit your Eclipse pro"ect may need some classpath changes. &ee the section on converting an
e'isting pro"ect to an EclipseME pro"ect.
3. Install the "ireless #ool$it%s&
Install any of the wireless toolkits you want to use. -hen you do this make note of the !ase directory into
which each is installed as you will need this information in &tep .. *+ou did t,is& didnt +ou1/
/ni' users ( if you install a -ireless Toolkit for use !y more than one user on your system please ensure that
all the users have the appropriate read and e'ecute permissions on the contents of the toolkit. *or e'ample
-T0%s contain a preverifier that EclipseME will need to access during the !uild process. If the user doing the
!uild does not have e'ecute permissions on the preverifier the !uild will fail. &imilarly if the user does not
have e'ecute permissions on the emulator he or she will not !e a!le to test the !uild.
2. Installing EclipseME
1eginning with version 0.5.5 EclipseME is provided as an Eclipse 2archive site.2 -ith version 0.5.0 and earlier
one simply un3ipped the distri!ution file into the Eclipse installation directory or plugin directory. #his is no
longer the installation procedure. Please follow the instructions !elow instead.
If you are updating EclipseME you should also use the procedure !elow. 4ew installations and updates follow
the same series of steps.
There are two !asic ways of installing or updating EclipseME)
5. 6ou can simply to use Eclipse%s !uilt(in updates feature to directly install or update via EclipseME%s
update site.
,. 6ou can download an archive site file manually and then install from it.
Installing via the EclipseME Update site!!!!
1. *rom the Eclipse Help menu select Software Updates and then Find and install...
-. 6ou will !e presented with the following dialog)

&elect the (earch for new features to install radio !utton.
Press 0e4t.
". 6ou will ne't !e presented with the following dialog)

Press the 0ew .emote (ite... !utton.
:. In the 0ew Update (ite dialog that appears enter a name for the update site and the /$7
http566eclipseme.sourceforge.net6updates6 and press ,pen.

#. The update site will now !e listed in the Install dialog.

Ensure that there is a check ne't to the EclipseME update site then press 0e4t.
'. 6ou will ne't !e presented with the following dialog)

Ensure that there is a check ne't to EclipseME. 8ther availa!le features can !e installed !y checking
them as well. Press 0e4t.
L. The installation process will ne't display the license agreement for EclipseME.

&elect I accept the terms of the license agreements and press 0e4t.
<. The ne't dialog that appears displays the possi!le locations into which you can install EclipseME.

In many cases the only site that will !e listed will !e the main Eclipse installation directory. If you have
other plugins or features installed however you may see additional sites.
#lthough you may install EclipseME elsewhere we recommend that you install it in your main Eclipse
installation directory.
8nce you have selected a site press 1inish.
M. #t present the EclipseME package is not digitally signed. 9Maintaining the keys required to digitally sign
+#$ files costs :;00<=year. If anyone is interested in funding EclipseME to this e'tent we%ll !e happy to
sign the +#$ files.> #s a result the following warning dialog will !e displayed)

Presuming that you are certain that you o!tained the EclipseME distri!ution file from a reputa!le source
9such as directly downloading it yourself from &ource*orge.net> it should !e safe to trust the
installation package.
If you choose to continue press the Install !utton.
50. #t this point Eclipse will !egin to install EclipseME from the site archive file. -hen the installation is
complete you will see one of the following two dialogs)
11.
0ew
installatio
ns

Updates

Even though the dialog
shown during new installations suggests that it may !e possi!le to continue without restarting you
should definitely restart Eclipse at this point.
5,. 8nce Eclipse restarts the installation procedure is complete.
5.. In the vast ma"ority of the cases the installation procedure a!ove will properly handle updating a
previous version of EclipseME.
1:. /nder some rare circumstances even after Eclipse restarts EclipseME will not end up properly
2registered2 inside Eclipse. This can generally !e corrected !y closing Eclipse and then restarting Eclipse
adding the -clean parameter to the other parameters you normally use. /sing the -clean option forces
Eclipse to rescan and update all its plugin information.
1#. If the plug(in is properly installed there will !e a J2ME entry in the Window / Preferences dialog.

Installing via a downloaded archive
site!!!
The process of installing EclipseME via a downloaded archive file is very similar to that of installing it via the
EclipseME update site.
1. ?ownload the latest archive site from the EclipseME downloads page.
-. *rom the Eclipse Help menu select Software Updates and then Find and install...
". 6ou will !e presented with the following dialog)

&elect the (earch for new features to install radio !utton. 6ou should select this option even if you
are updating EclipseME.
Press 0e4t.
:. 6ou will ne't !e presented with the following dialog)

Press the 0ew -rchived (ite... !utton.
#. In the (elect 7ocal (ite -rchive dialog that appears select the distri!ution @IP file and press ,pen.

'. The site archive file will now !e listed in the Install dialog.

Ensure that there is a check ne't to the distri!ution file then press 0e4t.
L. 6ou will ne't !e presented with the following dialog)

Ensure that there is a check ne't to EclipseME. 8ther availa!le features can !e installed !y checking
them as well. Press 0e4t.
<. The installation process will ne't display the license agreement for EclipseME.

&elect I accept the terms of the license agreements and press 0e4t.
M. The ne't dialog that appears displays the possi!le locations into which you can install EclipseME.

In many cases the only site that will !e listed will !e the main Eclipse installation directory. If you have
other plugins or features installed however you may see additional sites.
#lthough you may install EclipseME elsewhere we recommend that you install it in your main Eclipse
installation directory.
8nce you have selected a site press 1inish.
1$. #t present the EclipseME package is not digitally signed. 9Maintaining the keys required to digitally sign
+#$ files costs :;00<=year. If anyone is interested in funding EclipseME to this e'tent we%ll !e happy to
sign the +#$ files.> #s a result the following warning dialog will !e displayed)

Presuming that you are certain that you o!tained the EclipseME distri!ution file from a reputa!le source
9such as directly downloading it yourself from &ource*orge.net> it should !e safe to trust the
installation package.
If you choose to continue press the Install !utton.
55. #t this point Eclipse will !egin to install EclipseME from the site archive file. -hen the installation is
complete you will see one of the following two dialogs)
1-.
0ew
installatio
ns

Updates

Even though the dialog
shown during new installations suggests that it may !e possi!le to continue without restarting you
should definitely restart Eclipse at this point.
5.. 8nce Eclipse restarts the installation procedure is complete.
5;. In the vast ma"ority of the cases the installation procedure a!ove will properly handle updating a
previous version of EclipseME.
1#. /nder some rare circumstances even after Eclipse restarts EclipseME will not end up properly
2registered2 inside Eclipse. This can generally !e corrected !y closing Eclipse and then restarting Eclipse
adding the -clean parameter to the other parameters you normally use. /sing the -clean option forces
Eclipse to rescan and update all its plugin information.
1'. If the plug(in is properly installed there will !e a J2ME entry in the Window / Preferences dialog.

8. 'onfigure the *lug9In)s "ireless #ool$it (ettings
In order to use the plug(in you must configure at least one -ireless Toolkit. In order to do this perform the
following steps)
1. &elect the Preferences menu item from Eclipse%s Window menu.
-. E'pand the +,ME item in the pane to the left and click on Platfor !oponents.

". $ight(click on Wireless "ool#its and select $dd Wireless "ool#it.
:. In the resulting dialog select the root directory of the wireless toolkit installation.

If you%re adding a -ireless Toolkit for which EclipseME has e'plicit support 9or for certain /niversal
Emulator Interface 9/EI> compati!le -T0%s> once you have selected the root directory of the -T0
installation EclipseME should !e a!le to identify the toolkit and you can press the Finish !utton to
complete the operation.
If you select the root install directory for your -T0 and EclipseME responds with an 2Invalid wireless
toolkit root2 then you are attempting to add a -T0 for which EclipseME does not provide direct
9native> support and for which it could not locate /niversal Emulator Interface 9/EI> information. The
/EI interface allows EclipseME to query the emulator to determine the required settings classpaths
etc. EclipseME assumes that the emulator is located in a directory named !in. This is usually !ut not
always located under the root of the -T0 installation area. If it is EclipseME will find it automatically
when you select the -T0 root directory.
If the !in directory is not directly under the root of the -T0 installation then you need to help
EclipseME locate it so that EclipseME can interrogate the emulator. *ind the !in directory and select
that directory%s parent in the 1rowse dialog. Thus in the e'ample !elow the !in directory was nested
several layers deep. &electing "#:2 9!in%s parent> allows this toolkit to !e recogni3ed.

If EclipseME persists in showing the 2Invalid wireless toolkit root2 error even when you have selected
the parent of the !in directory then either the emulator has a non(standard name or the emulator
does not support the /EI standard. In either case EclipseME can not support it for the time !eing. In
this case please feel free to su!mit an $*E to ask for support for this -T0 to !e added.
#. -hen you have succesfully completed adding the toolkit you should !e a!le to e'pand the Wireless
"ool#its and other items in the right(hand pane and see the toolkits definitions profiles and
configurations that are installed.

;. 'hange Eclipse)s De!ug (ettings
1ecause of some quirks in the wireless toolkits &un%s in particular if you are going to de!ug your MI?let using
Eclipse you must change several of the default de!ug settings. To do this)
1. &elect the Preferences menu item from Eclipse%s Window menu.
-. E'pand the Java item in the left pane and click on the %e&u' entry.
". Ensure that !oth Suspend e(ecution on uncau'ht e(ceptions and Suspend e(ecution on copilation
errors near the top of the dialog are 0,# checked.
:. Increase the %e&u''er tieout near the !ottom of the dialog to at least 55000 ms.
#. The resulting settings should look something like this)

If you do not make these changes you will get errors when you try to run your MI?let.
<. 'onfigure *ro+uard %,ptional&
If you will !e using ProAuard to produce o!fuscated packages you will need to configure it into the plug(in. To
do this)
1. &elect the Preferences menu item from Eclipse%s Window menu.
-. E'pand the J2ME item in the left pane and click on the )&fuscation entry.
.. Bonfigure the ProAuard $oot ?irectory near the top of the dialog.
:. Bonfigure any other ProAuard(specific settings that you need. *or more information on ProAuard see
the ProAuard &ource*orge site.
#. The resulting settings should look something like this)

=. 'onfigure EclipseME)s ,ver #he -ir %,#-& options %,ptional&
If you will !e using EclipseME to de!ug your MI?let in 8ver The #ir 98T#> mode you may want to ad"ust the
8T# Preferences. To do this)
1. &elect the Preferences menu item from Eclipse%s Window menu.
-. E'pand the J2ME item in the left pane and click on the )ver "he $ir entry.
". The default settings look like this)

#t this point you are ready to use EclipseME to create MI?let suites.
Updating our EclipseME installation
Eclipse implements a versioning system that allows you to update features and plugins without having to first
remove the older versions. #s a result the process of upgrading to a new version of EclipseME is e'tremely
easy.
If ou installed via the EclipseME Update (ite
1. *rom the Eclipse Help menu select Software Updates and then Find and install...
-. 6ou will !e presented with the following dialog)

&elect the (earch for new features to install radio !utton.
Press 0e4t.
". The update site you previously configured will !e listed in the Install dialog.

Ensure that there is a check ne't to the EclipseME update site then press 0e4t.
*rom this point the process is identical to the original installation procedure outlined a!ove.
4ote that updating EclipseME via the Search for updates of currentl* installed features does not work at this
time. 6ou need to follow the procedure a!ove to update directly from the &ource*orge site. -e anticipate
correcting this in the future.
If ou installed from a downloaded archive site
The process of upgrading is identical to the process of initial installation. &imply download the new archive site
file and go through the process a!ove using that file. If you wish !efore upgrading using the new file you
may use the .emove !utton to remove the old archive file from the installer.
.emoving EclipseME
8!viously we hope that you find EclipseME so useful that you will never want to !e without it. If you really feel
you need to remove it however or if you want to do a completely 2clean2 install you can follow these steps to
remove EclipseME from your Eclipse installation)
#he /0ormal/ wa
The most straightforward way to remove EclipseME is to use Eclipse%s configuration management.
1. *rom the Eclipse Help menu select Software Updates and then Mana'e !onfi'uration...
-. 6ou will !e presented with the following dialog)

E'pand the entry in the left pane for your Eclipse installation directory and click on the entry for
EclipseME.
". #t this point the dialog should look something like this)

Blick on the Uninstall link in the right pane.
;. Eclipse will ask you to confirm that you want to uninstall EclipseME. #nswer 26es2 and EclipseME will !e
removed. 4ote that Eclipse will have to restart the work!ench after the uninstall so that it can update
its feature and plugin metadata.
5. If you have any of the optional EclipseME features 9such as the &iemens feature> installed Eclipse will
require that you uninstall them !efore uninstalling EclipseME itself. In this case it is 80 not to restart
the work!ench !etween uninstalling the feature and uninstalling EclipseME itself.
4ote that removing EclipseME using this technique will remove the current version of the EclipseME feature
and plugins from your Eclipse installation directory. If you updated EclipseME from an older version the plugin
and feature directories for the older versions will still !e present inside your Eclipse directory. If you really
want to remove all vestiges of EclipseME you can get rid of those directories using the 21rute *orce2 method
!elow.
#he /Brute 1orce/ method
If the 24ormal2 method doesn%t work or if you want to make a!solutely sure that everything is gone you can
always remove EclipseME the 2!rute force2 way)
5. Blose any running copies of Eclipse.
-. 8pen the features directory within your Eclipse installation directory.
". ?elete any directories whose name !egin with 2eclipseme2. 9e.g. eclipseme.feature_0.6.1>
:. 8pen the plugins directory within your Eclipse installation directory.
#. ?elete any directories whose name !egin with 2eclipseme2. 9e.g. eclipseme.core_0.6.1
eclipseme.docs_0.6.1 etc.>
'. Invoke eclipse using the +clean command line option. This will force Eclipse to re(scan its lists of
installed features and plugins in order to ensure that the appropriate updates to Eclipse%s metadata are
performed.
.emoving EclipseME traces from a pro2ect
If you want to remove all traces of EclipseME from a pro"ect you need to do the following from outside
Eclipse)
1. EclipseME creates a file named .eclipseme in the root of each +,ME pro"ect. $emove this file.
-. EclipseME adds a !uild command and a 2nature2 to the .project file associated with each Eclipse
pro"ect. # typical Eclipse .project file looks like this)
3. <xml version="1.0" encoding="UTF-8"?>
4. <projec!escripion>
". <n#me>$#per%lic& '#v# (o )indo*<+n#me>
,. <commen><+commen>
-. <projecs>
8. <+projecs>
.. </0ild1pec>
10. </0ild%omm#nd>
11. <n#me>org.eclipse.jd.core.j#v#/0ilder<+n#me>
12. <#rg0mens>
13. <+#rg0mens>
14. <+/0ild%omm#nd>
1". </0ild%omm#nd>
1,. <n#me>eclipseme.core.preveri3ier<+n#me>
1-. <#rg0mens>
18. <+#rg0mens>
1.. <+/0ild%omm#nd>
20. <+/0ild1pec>
21. <n#0res>
22. <n#0re>org.eclipse.jd.core.j#v#n#0re<+n#0re>
23. <n#0re>eclipseme.core.n#0re<+n#0re>
24. <+n#0res>
<+projec!escripion>
The underlined items are the ones you should remove.
Bopyright C ,005 http)==eclipseme.sourceforge.net. #ll rights reserved.
THIS IS WHERE I COME BACK
Just to remem2er7 these are the mem2ers of 6an0 of Four
j2sdk-1_4_2_08-windows-i586-p.exe
eclipse-SDK-3.0-win32.exe
eclipse!e.#ea"$re_0.%.5_si"e.ip
j2!e_wireless_"oolki"-2_2-windows.ip
(ravo> I think you made it. ?ow what5 +ell we mi0ht develop some stuff and run itH
)estart the 3clipse and choose
2ile 3 4e. 3'ro!e"t5 +hen this dialo0 appears choose J2ME Midlet 6uite
I invented a pro=ect called 7are (you 2etter call yr pro=ect with the same name) and then 3clipse 0ave me some fancy nfo
a2out where and how my 3sr" files will 2e placed. 1hat4s e9actly what ne9t dialo0 shows7
/ou should 0et somethin like this. If you didn4t! check chapter 0. Before ou !egin
from 3clipse%3 tutorial. /ou have to have 3sr" and 3res folders. Dlick 2inis,. 1hen ri0ht@click 3sr" folder.
/ou should 2e prompted with an amazin0 4e. dialo0
Dhoose 4e. and then t,er5 and then 8lass cause you aint 0onna playin0 karaoke 2ut makin some hot J-%3 *pps!
remem2er5
*fter you clicked 4e)t define yr %IDlet class and packa0e. I think it4s the 2est thin0 for you to copy my settin0s so I don4t
have to read yr nasty emails
Dlick Finish. ?ow 3clipse 2eats like hell! and it creates new file called 7areM9#let.!a-a. *lso 3clipse opens it in its editor.
Delete all the stuff it wrote in 7areM9#let.!a-a and copy8paste this src7
+4
4 %re#ed on 5#6 17 200"
4+
p#c&#ge 8#re9
+44
4 :#0;or <#r&o =cimovic7 >5F
4+
impor j#v#x.microediion.lcd0i.!ispl#69
impor j#v#x.microediion.midle.5?!le9
impor j#v#x.microediion. lcd0i.!ispl#6#/le9
p0/lic cl#ss <#re5?!le exends 5?!le
@
p0/lic <#re5?!leAB
@
C
p0/lic void s#r=ppAB
@
!ispl#6#/le c0rren = !ispl#6.ge!ispl#6A;isB.ge%0rrenAB9
$ol6%#nv#s pc = ne* $ol6%#nv#sAB9
!ispl#6.ge!ispl#6A;isB.se%0rrenApcB9
C
p0/lic void p#0se=ppAB
@
C
p0/lic void desro6=ppA/oole#n 3l#gB
@
C
C
?ow 2e smart and create new class 'ol+8an-as the same way you created 7areM9#let class. 1hat class should 2e in the
same packa0e :are as 7areM9#let is. Don4t for0et to mention that in class dialo0. *nd don think tooo much. 1he source for
'ol+8an-as is7
+4
4 %re#ed on 5#6 17 200"
4
4+
p#c&#ge 8#re9
+44
4 :#0;or <#r&o =cimovic7 >5F
4
4+
impor j#v#x.microediion.lcd0i.49
p0/lic cl#ss $ol6%#nv#s exends %#nv#s
implemens D0nn#/le
@
$ol6%#nv#sAB
@
x = 09
= ne* T;re#dA;isB9
.s#rAB9
C
p0/lic void p#inA(r#p;ics gB
@

g.dr#*EineAx7 ",7 1007 100B9
C
p0/lic void &e6$ressedAin &B
@
x F= "9
rep#inAB9
C
p0/lic void r0nAB
@
do
@
x F= "9
rep#inAB9
r6
@
T;re#d.sleepA"000B9
C
c#c;AGxcepion excepionB @ C
C *;ileAr0eB9
C
in x9
T;re#d 9

C
1hat4s it. +hen ya save 'ol+8an-as and 7areM9#let at the same time 3clipse compiles Jem.
?ow it4s time to )N? yr app in emulator. 1his is where the ma0ic comes! and pro2lems too. (ut don wory! this tut covers it
all. Dlick (un! and choose (un5 like I showed in ne9t pic
?e9t select ;ireless <ool=it E$ulator and press 4e.
1his dialo0 should show up7
/ou definitely should check Midlet> and then click 2utton 6ear", on the ri0ht to find out our 7areM9#let. ?e9t dialo0
will prompt! so you =ust select 7areM9#let
Dlick CK and then previous dialo0 will show up with defined Midlet space. Dlick (un and application starts. It4s a silly
one7 line is drawn every # secs on screen! 2ut if ya ea0er to wait! you can click 2y mouse any 2utton and line will 2e drawn
immediately.
3mulator rolls overH.
Feel free to send yr comments and reKuests for clarification at zareacI0mail.com

You might also like