i need a "hello world" j2me application that actually works on a cell phone

By A N D ·
i am using netbeans 6.5 as my ide. i also have the sun java wireless toolkit. i tried the example applications, but they only work in the emulator and not on a real cell.
please provide me the complete source code for a program that actually shows "Hello World" on a cell (im just starting to learn java) and also on steps on how to convert it into a working cell app.

its getting frustrating to see that all the programs given in the java me books i have give "invalid application" error.

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

Writing J2ME applications in Linux for mobiles......

Collapse -

does not work

by A N D In reply to Writing J2ME applications ...

are you sure the code works.
it gives me 3 direct errors whe compiled with sun wtk 2.5.2 so working on the cell is out of question.

maybe my wtk is faulty (anyway to verify that) but compiling in netbeans gives the same problem!

please help!

Collapse -

You will have to read and slowly understand.....

by Peconet Tietokoneet In reply to does not work

If you follow the instructions carefully and the coding you should get the results that you need. You do not say what you have done other than saying "it does not work". You will have to put down WHAT you have done/not done, only until you do i can not help you more.

The people on here are not mind readers, though it might seam so. I am trying to go onto the Mind readers course but they are full at the moment. :)

Collapse -

here's what i did till now

by A N D In reply to You will have to read and ...

started sun wtk for cldc 2.5.2

created new project called HelloWorld (settings MIDP 2 & CLDC 1.1 with media API included)

saved the code on the given website into a file called (note that no alterations were made. it was ctrl+c & ctrl+v)

located the folder where HelloWorld was created

saved the file into the src folder.

pressed build in the WTK.

gives 3 errors pointing at the word "extends" and other 2 pointing at word "Command".

pressing run gives some error (which is obvious as the build command too gave an error) and the emulator does not work.

ok, so i assumed (didnt say it actually is) that the site was giving wrong coding (not likely, but thats how things are to be debugged, right?) so i searched directly for actually working source code neatly arranged in folders as required by wtk. now i placed that file into the apps folder. then opened the project & pressed build. Voila! it build properly & ran on both emulator & my MOTOROKR E6 properly.

so now i know my wtk works(at least sometimes). also the new source code i have is working.
now i delete this new project, restart my computer (just in case!) & start a new project in wtk with exactly the same name and settings & finally copy the src folder from the downloaded file into my project's src folder. as far as possible everything in the original project and my duplicate project is the same, so it should work, right? okay, i press build- all's fine. press run- the emulator shows some class not included error- java.lang not found.

now i get depressed!!!

so i start a autopsy on both files simultaneously. the only difference i find is in the .jad file in the bin folder. the original source has a proper jar file size specified but my project shows the default 100 bytes. but isn't the wtk supposed to take care of that? and anyway how am i supposed to predict the jar file size even before it is created?
except for that one single entry everything is the same.
so now i close wtk delete my project and restore the original source project. build & run it & it's working fine. just my project- which is an exact duplicate refuses to work!

just tell me whats wrong & how to solve this!!! it's getting frustrating! please help, really, really quick!!!

i'm beginning to lose faith in java real fast. it just made me realize what a masterpiece c++ was. it was simple & powerful unlike java which seems to be neither. first u need to learn about thousands of classes and methods (why did they change the name? wasn't "functions" good enough?) just to get a code which no one can guarantee, works.

Back to Software Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums