Thursday, March 1, 2007

RE: Hello World! [Eclipse Rocks!]

Using the EclipseME plugin I was easily able to build the proverbial "Hello World!" application :) In addition to the development setup I mentioned earlier, I also needed a little bit of configuration before I could start coding, which I will detail below.

Steps to configure the EclipseME plugin:
  1. Got to "Window > Preferences > J2ME".
  2. Set the WTK Root to the root folder of your wireless toolkit installation.
  3. Under J2ME, select "Device Management".
  4. In this tab, click on "Import".
  5. Specify the wireless toolkit root folder again in the "Specify search directory" text box.
  6. Now, click "Refresh" which searches the directory for installed devices. (I'm using the Sun Wireless Toolkit 2.5)
  7. Import all the devices in the list & click "Finish".
  8. Select a default device and click "OK".
And that's it :) We are done!!

Now, make a new J2ME Midlet Suite whose JAD file should be changed to make CLDC version equal to 1.0 and the MIDP version to 2.0. Then make a J2ME Midlet which I named "HelloWorld", containing the following code:

import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.TextBox;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;


public class HelloWorld extends MIDlet {

private Display display = null;
private TextBox textBox = null;

public HelloWorld() {
}

protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
}

protected void pauseApp() {
}

protected void startApp() throws MIDletStateChangeException {
display = Display.getDisplay(this);
textBox = new TextBox("Simple", "Hello World!", 100, 0);
display.setCurrent(textBox);
}
}

Right click on your project, go to "J2ME > Create Package". This will create a "deployed" folder which contains a .jad and .jar file.

You could now copy these files to your phone and then open the JAD file via your phone. It should launch the "HelloWorld!" app! :)

You can also make a new "Run" configuration to execute the jar file from the Sun Wireless Toolkit emulator. This can be done from the "Run > Run" menu by making a new configuration under "Wireless Toolkit Emulator". Once created you can launch it easily!

Some points to note:
  1. For the Emulator configuration choose the "Midlet" form of executable rather than the "Over the Air" option.
  2. When you make a new J2ME Midlet Suite, in the screen for Java Settings, if you see a "J2ME Library (failed to get library information)" do not worry cause once you click finish, that particular problem goes away.

29 comments:

Anonymous said...

When you make a new J2ME Midlet Suite, in the screen for Java Settings, if you see a "J2ME Library (failed to get library information)" do not worry cause once you click finish, that particular problem DOESN'T GO away

Hi i am a Spanish java learner. Any idea of why it doesn't it work?

email: estono

Unknown said...

There few things you need to do:
1. Make sure you install Sun WTK.
2. In Eclipse, you need to configure the Device Management (under Window-->Preference) using WTK.
3. Chose a device from the WTK device list (under Project-->Properties J2ME tag).

Anonymous said...

студенты видео он лайн http://free-3x.com/ порно фото разрыва малолеток free-3x.com/ школи порно [url=http://free-3x.com/]free-3x.com[/url]

Anonymous said...

...please where can I buy a unicorn?

Anonymous said...

consolidating credit card debt [url=http://loveepicentre.com/]updating graphics card in wxp[/url] black christian dating site http://loveepicentre.com/ dating grand pianos

Anonymous said...

Hello,

When ever I surf on web I never forget to visit this website[url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips].[/url]Plenty of useful information on kite-m.blogspot.com. Do you pay attention towards your health?. Here is a fact for you. Recent Research indicates that closely 50% of all United States adults are either obese or weighty[url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips].[/url] Therefore if you're one of these citizens, you're not alone. Infact many among us need to lose 10 to 20 lbs once in a while to get sexy and perfect six pack abs. Now next question is how you can achive quick weight loss? [url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips]Quick weight loss[/url] is really not as tough as you think. If you improve some of your daily diet habbits then, its like piece of cake to quickly lose weight.

About me: I am writer of [url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips]Quick weight loss tips[/url]. I am also health expert who can help you lose weight quickly. If you do not want to go under hard training program than you may also try [url=http://www.weightrapidloss.com/acai-berry-for-quick-weight-loss]Acai Berry[/url] or [url=http://www.weightrapidloss.com/colon-cleanse-for-weight-loss]Colon Cleansing[/url] for quick weight loss.

Anonymous said...

diabetes guide [url=http://usadrugstoretoday.com/products/lynoral.htm]lynoral[/url] separation anxiety training http://usadrugstoretoday.com/products/singulair.htm what is staff infection http://usadrugstoretoday.com/products/avandia.htm
which is the best mineral makeup [url=http://usadrugstoretoday.com/products/arava.htm]arava[/url] sugarfree tea usa [url=http://usadrugstoretoday.com/products/levothroid.htm]diabetic friend happen hear house talk thought wanted[/url]

Anonymous said...

hypertension stage 3 [url=http://usadrugstoretoday.com/categories/controllo-delle-nascite.htm]controllo delle nascite[/url] weight loss in atkins induction period http://usadrugstoretoday.com/categories/ayuda-para-dormir.htm sycamore mineral springs resort layout http://usadrugstoretoday.com/products/betnovate.htm
epic dental alb [url=http://usadrugstoretoday.com/categories/anti-acidity.htm]anti acidity[/url] stress affects work [url=http://usadrugstoretoday.com/products/doxazosin.htm]serious blood diseases[/url]

Anonymous said...

http://webhealthcentre.in/cymbalta/cymbalta-dosages
[url=http://webhealthcentre.in/coreg/coreg-sleep]companies with drug tests[/url] anna nicole and drug overdose [url=http://webhealthcentre.in/topiramate/topiramate-for-treating-alcohol-dependence]topiramate for treating alcohol dependence[/url]
tn drug registry http://webhealthcentre.in/anacin/anacin-ingredents
[url=http://webhealthcentre.in/drugs/affects-of-drugs-and-the-lives-of-others]how to make the drug ice[/url] drug seiezer [url=http://webhealthcentre.in/cyproheptadine/cyproheptadine-hcl-4mg-for-animals]cyproheptadine hcl 4mg for animals[/url]
what hrs do pharmacy techs work at walgreens http://webhealthcentre.in/crestor/side-effects-from-crestor
[url=http://webhealthcentre.in/cytoxan]michigan pharmacy technician license requirements[/url] cure for drug adiction [url=http://webhealthcentre.in/progesterone/when-was-progesterone-first-used-during-pregnancy]when was progesterone first used during pregnancy[/url] pharmacy university in georgia [url=http://webhealthcentre.in/health-care/wyoming-health-insurance]wyoming health insurance[/url]

Anonymous said...

http://healthportalonline.in/celebrex/legal-celebrex
[url=http://healthportalonline.in/cefdinir/what-is-cefdinir-used-for]new mexico school of pharmacy[/url] drake pharmaceutical electronic drug reference [url=http://healthportalonline.in/ceftin/ceftin-order-online-no-prescription]ceftin order online no prescription[/url]
shippees pharmacy wanaque http://healthportalonline.in/cetirizine
[url=http://healthportalonline.in/caffeine/effects-caffeine]levitra 2b ny ny[/url] cvs pharmacy chicago [url=http://healthportalonline.in/calcium/calcium-carbonate-uroliths-dog]calcium carbonate uroliths dog[/url]
drug rebate program exclusions http://healthportalonline.in/celadrin/celadrin
[url=http://healthportalonline.in/cipro/effectiveness-of-cipro-and-bladder-infections]bilbo pharmacy[/url] yaz birth control online pharmacy [url=http://healthportalonline.in/carbidopa/cafergot-prescription]cafergot prescription[/url] keystone pharmacy omaha [url=http://healthportalonline.in/carbamazepine/effets-secondaires-novo-carbamazepine]effets secondaires novo carbamazepine[/url]

Anonymous said...

store in maryland called valu city fashion http://topcitystyle.com/bikkembergs-sport-pants-for-men-navy-blue-item2457.html designer media cabinets [url=http://topcitystyle.com/?action=products&product_id=1683]fortune fashions and brian segell[/url] high fashion prom dresses
http://topcitystyle.com/de-puta-madre-69-funky-brand15.html elmar window fashions philadelphia pa [url=http://topcitystyle.com/?action=products&product_id=2423]fashion nails[/url]

Anonymous said...

equity shoes http://topcitystyle.com/richmond-shirts-brand18.html chaco shoes resole [url=http://topcitystyle.com/?action=products&product_id=2051]mens designer jeans[/url] naomi klein
http://topcitystyle.com/-leather-shoes-on-sale-category13.html most comfortable walking shoes [url=http://topcitystyle.com/-casual-armani-category34.html]shoes songs[/url]

Anonymous said...

Thanks a lot ... this helped me create my first hello world mobile app :D

Anonymous said...

heart diffused vessel [url=http://usadrugstoretoday.com/categories/anti-champignons.htm]anti champignons[/url] behavioral health counselor http://usadrugstoretoday.com/products/synthroid.htm
key and heart tattoos [url=http://usadrugstoretoday.com/products/omnicef.htm]omnicef[/url] boston tea party 1773 [url=http://usadrugstoretoday.com/products/cialis-soft-tabs.htm ]cn smoke [/url] online diet for parasites
healthfirst health plans in ny [url=http://usadrugstoretoday.com/products/maxaman.htm]maxaman[/url] calcium in loss weight http://usadrugstoretoday.com/categories/anti-depressant-anti-anxiety.htm
blood pressure pills [url=http://usadrugstoretoday.com/products/fluoxetine.htm]fluoxetine[/url] myrtle beach medical services [url=http://usadrugstoretoday.com/categories/la-sante-des-os.htm ]generic style reference [/url] muscle sex clips

Anonymous said...

valentino fashion group http://luxefashion.us/leather-shoes-page7.html calvin klein sunglasses [url=http://luxefashion.us/cesare-paciotti-shoes-brand35.html]lauren motyl[/url] lauren burch
http://luxefashion.us/dolce-amp-gabbana-polo-shirts-brand2.html discount nike basketball shoes [url=http://luxefashion.us/bacci-abbracci-polo-shirts-brand57.html]fashion show games[/url]

Anonymous said...

http://xwp.in/emsam/emsam-insomnia-message-board
[url=http://xwp.in/carbohydrate/fast-food-carbohydrate-counter]pharmacy in chevy chase maryland[/url] cialis blindness cause http://xwp.in/amlodipine/introduction-about-combination-of-amlodipine-and-perindopril
pemberton pharmacy http://xwp.in/hyzaar/hyzaar-medication
[url=http://xwp.in/elimite/prescription-medicine-endep]decline retiree drug subsidy[/url] justin hardee criminal drugs http://xwp.in/amaryl/daily-dosage-amaryl
tel drug form http://xwp.in/dexamethasone
[url=http://xwp.in/angina/prevent-angina-pectoris]drug usuage between teens[/url] say no to drugs lesson plan 1st grade http://xwp.in/carbohydrate/carbohydrate-addicts-diet-book devils claw contradiction with drugs http://xwp.in/ceftin/side-effects-of-ceftin

Anonymous said...

clothes sell online http://topcitystyle.com/underwear-page4.html fashion furry boots in uk [url=http://topcitystyle.com/?action=products&product_id=1990]pics of chanel perfume[/url] fashion show ideas
http://topcitystyle.com/springfield-t-shirts-for-men-brand109.html orthotic shoes insert [url=http://topcitystyle.com/d-amp-g-sport-style-shirt-for-men-blue-item1268.html]fashioniasta[/url]

Anonymous said...

sunday bingo in pennsylvania http://xwn.in/betting_hairy-pussy-betting-fucked-by-black-cock nj lottery new years million
[url=http://xwn.in/roulette_casinos-casino-roulette-gambling]win bingo[/url] transatlantic lottery sweepstakes [url=http://xwn.in/slots_server-pci-slots]server pci slots[/url]
keno net casino gambling free http://xwn.in/keno_free-keno-game
[url=http://xwn.in]mega millions lottery payout[/url] free casino bonuses casino blackjack [url=http://xwn.in/baccarat_baccarat-tree-ornament]baccarat tree ornament[/url]
casino printing calculators http://xwn.in/jackpot_jackpot-party-online-game gambling entertainment [url=http://xwn.in/online-casinos_realtime-gamgling-casinos]realtime gamgling casinos[/url]

Anonymous said...

indiana winning lottery numbers http://wqm.in/casino-online_size-of-hollywood-florida-hardrock-casino-concert-hall casinos affected by fires southern california
[url=http://wqm.in/jackpot_free-jackpot-party-video-slot]joker poker pinball[/url] blackjack cheet sheet [url=http://wqm.in/poker-online_poker-and-web-cams]poker and web cams[/url]
electronic bingo http://wqm.in/online-casino_shooting-star-casino
[url=http://wqm.in/keno_video-keno-30-days-free-trial]bus service to indian casinos in california[/url] offtrack betting san diego [url=http://wqm.in/jokers_jokers-livid]jokers livid[/url]
ny state casinos http://wqm.in/betting_nfl-betting-odds-major-newspapers tropicana casinos and resorts [url=http://wqm.in/gambling-online_craps-online-gambling-free-bonus]craps online gambling free bonus[/url]

Anonymous said...

calories chicken breast [url=http://usadrugstoretoday.com/products/karela.htm]karela[/url] california medical plans http://usadrugstoretoday.com/products/lasuna.htm bump on scalp that causes hair loss http://usadrugstoretoday.com/products/cipro.htm
blood clots in legs relief [url=http://usadrugstoretoday.com/products/pletal.htm]pletal[/url] leeches for medical reasons [url=http://usadrugstoretoday.com/products/neurontin.htm]pills berry[/url]

Anonymous said...

free movie sound bytes [url=http://moviestrawberry.com/films/film_feet_of_flames/]feet of flames[/url] cant hardly wait movie online http://moviestrawberry.com/genres/incredible_variety_of_films/?page=33 antique movie projectors
melanie movie [url=http://moviestrawberry.com/films/film_touched/]touched[/url] free movie theater tickets http://moviestrawberry.com/films/film_play_misty_for_me/ black sex movie
scary movie 4 soundtrack [url=http://moviestrawberry.com/films/film_the_flintstones/]the flintstones[/url] street fighter the movie game
romeo movie [url=http://moviestrawberry.com/films/film_nite_tales_the_movie/]nite tales the movie[/url] the warriors movie http://moviestrawberry.com/films/film_rock_a_doodle/ the odyssey movie
movie john q [url=http://moviestrawberry.com/films/film_all_my_friends_are_leaving_brisbane/]all my friends are leaving brisbane[/url] predator picture movie http://moviestrawberry.com/films/film_the_witches_hammer/ movie vantage

Anonymous said...

straight movie monster [url=http://moviestrawberry.com/films/film_beef/]beef[/url] nicole kidmans new movie http://moviestrawberry.com/films/film_fantasia/ free hentai movie gallery
movie themed memorabilia [url=http://moviestrawberry.com/films/film_gun_fury/]gun fury[/url] the tv movie our mothers death http://moviestrawberry.com/films/film_kickboxer/ hairy women movie trailers
resident evil extiction movie [url=http://moviestrawberry.com/films/film_whats_the_worst_that_could_happen/]whats the worst that could happen[/url] celebrity movie sex news caster
famous movie quote [url=http://moviestrawberry.com/films/film_immortel/]immortel[/url] movie action torrent http://moviestrawberry.com/films/film_the_curse_of_the_komodo/ a movie about witch school with a clumbizy girl
the movie passdine [url=http://moviestrawberry.com/films/film_totally_baked_a_pot_u_mentary/]totally baked a pot u mentary[/url] blues brothers movie http://moviestrawberry.com/films/film_the_visitor/ homeward bound movie

Anonymous said...

when did you ovulate on clomid 3 7 | clomid prescription - drug clomid, pcos and clomid success rates

Anonymous said...

xanax cheap order xanax online no prescription mastercard - do people buy xanax online

Anonymous said...

cheap generic xanax xanax lasting time - buy xanax no prescription mastercard

Anonymous said...

when to take clomid | buy clomid cheap online - clomid buy online, male infertility clomid

Anonymous said...

[url=http://onlinecasino4nl.com ]online casino [/url]home. http://superonlinecasino24.com casino bonus zonder storting online casino "That's your letter," he said. "And here's the answer."

Anonymous said...

online payday loans http://2applyforcash.com Keycleddy Payday Loans Online talPagmelamak [url=http://www.2applyforcash.com/]Online Payday Loans No Credit Check[/url] same day payday loans online These others consist of friends, sells, goods!!Launching a new product or service can be risky, curious about what you can learn from interacting with this person.They are the kind of people who expect to earn so much audio guides because you can automate your marketing and easily scale your business.

Anonymous said...

xanax medication what is xanax for anxiety - ambien with xanax overdose