Are you a interested in programming but don't have a laptop or you are not close to your laptop but have your phone with you. You can still program with your phone using J2me Sdk Mobile. I will show you how to use this app on your java or symbian phone to create an app.
Firstly, download the app from www.mumey.wen.ru Open the app and click on New Project. Enter HelloWorld as the Project Name and select a directory to save the project files by clicking on browse for the Project Location. Click Create and allow access until you see Source Packages and Resources. Open Source Packages, press Options (left soft key), go down and select Project Properties.
Select Build, select Creating JAR. Change JAD file Name from HelloWorld.jad to HelloWorld_jad and JAR file Name from HelloWorld.jar to HelloWorld_jar then OK it, go back and press Ok again and allow access. You would be taken back to Source Packages, press Options again (left soft key), select New. Select MIDlet as the File Type, click Next. Change MIDlet Name to HelloWorld and Class Name to HelloWorld (they don't have to be the same), leave MIDlet Icon empty for now then click finish and allow access. You will be taken to a white background with codes. Clear every line of code, by pressing 5; deleting everything: click save and go to the next line by pressing down till you get to the last line and the background is all white with no codes then you go up to the first line, select it by pressing 5 and put the code (or you might call it text) below:
import javax.microedition.midlet.*; import javax.microedition.lcdui.*; public class HelloWorld extends MIDlet { public void startApp() { Form f = new Form("My first app"); f.append("Hello World"); Display.getDisplay(this).setCurrent(f); } public void pauseApp() { } public void destroyApp(boolean unconditional) { } } ClickSave (OK), you will go back to that white background with codes, press Menu (right soft key) and click on Build (it has a hammer icon), allow access untill the app closes. Open the app again for compiling, allow access untill it closes. Open the app again for preverifing, allow access as usual until it closes. Open the app the last time for jaring, it probably given you an error like this pre-jar:
do-jar:
JARing:java.io.IO Exception: Failed to write to file BUILD FAILED. When you get that message or even if you don't, exit the app and open blueFTP (if you don't have one, search for it on www.skenpomobile.com or google it and download), goto the Project Folder with blueFTP, goto the build folder, copy manifest.mf and goto preverified folder and create a new folder there named META-INF, and paste the manifest.mf file into the new folder. Go back to the preverified folder and mark HelloWorld.class and META-INF, press Menu (left soft key) and select Compress items (jar). Change JAR name to HelloWorld_jar then press OK and allow access until you get compression completed successfully. Exit BlueFTP and goto the preverifed folder without any app and rename the file from HelloWorld_jar to HelloWorld.jar. Open the HelloWorld app and you will get a Hello World Message. Bravo, you just built your first app with J2ME SDK MOBILE.
Post a Comment