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 HelloWorld.java (note that no alterations were made. it was ctrl+c & ctrl+v)
located the folder where HelloWorld was created
saved the HelloWorld.java 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.