{"id":1124,"date":"2008-05-06T21:54:55","date_gmt":"2008-05-06T21:54:55","guid":{"rendered":"https:\/\/kweaver.org\/cs\/how-to-write-a\/"},"modified":"2008-05-06T21:54:55","modified_gmt":"2008-05-06T21:54:55","slug":"how-to-write-a","status":"publish","type":"post","link":"https:\/\/kweaver.org\/cs\/how-to-write-a\/","title":{"rendered":"How to Write a Java MIDlet Program for Wireless Cellular Phones and Handheld PDAs Using J2ME"},"content":{"rendered":"<p style=\"margin-bottom: 0\">I used the following article to help me figure out &#8212; finally &#8212; how to get a Java program on a mobile phone.&#160; I&#8217;ve done it several times with Visual Basic, but never with Java.<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">&#160;<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">Quoted from <cite>http:\/\/www.codeguru.com\/cpp\/w-p\/ce\/networking\/article.php\/c7911\/<\/cite>:<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">&#160;<\/p>\n<blockquote style=\"margin-top: 0; margin-bottom: 0;\">\n<p style=\"margin-top: 0; margin-bottom: 0;\"><a href=\"http:\/\/www.codeguru.com\/cpp\/w-p\/ce\/networking\/article.php\/c7911\/\"> CodeGuru: How to Write a Java MIDlet Program for Wireless Cellular Phones and Handheld PDAs Using J2ME <\/a><\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">&#160;<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">\n<!--StartFragment--><br \/>\nHow to Write a Java MIDlet Program for Wireless Cellular   Phones and Handheld PDAs Using J2ME<\/p>\n<\/blockquote>\n<p style=\"margin-top: 0; margin-bottom: 0;\">&#160;<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">1.&#160; The first step was already done, I had Java on my computer already.<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">2.&#160;&#160; Install<br \/>\nJava 2 Platform, Micro Edition Wireless Tool Kit.&#160; I did a search on that, and ended up at <a href=\"http:\/\/java.sun.com\/products\/sjwtoolkit\/\">http:\/\/java.sun.com\/products\/sjwtoolkit\/<\/a> and I read and followed the article until I got to Downloads, and ended up at <a href=\"http:\/\/java.sun.com\/products\/sjwtoolkit\/download.html\">http:\/\/java.sun.com\/products\/sjwtoolkit\/download.html<\/a>.&#160; I downloaded the Windows version, since we run Windows XP and installed it per directions.<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">&#160;<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">3.&#160; Next, I copied his code into my own file, SampleMidlet.java.&#160;&#160; A few of the lines were too long and did not paste right, so I had to fix them. <\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">&#160;<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">4.&#160; I then ran the Wireless Toolkit as his directions show.<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">&#160;<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">5.&#160; Next I copied my SampleMidlet.java into the src file as he indicated.  <\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">\n<!--EndFragment-->\n<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">6.&#160; Then run the Wireless Toolkit again and Build your project (you can leave it open).<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">&#160;<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">7.&#160; Then run your project.&#160; You&#8217;ll get a phone emulator with your new project on it.&#160;<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">&#160;<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">8.&#160; The last step of the CodeGuru&#8217;s directions to use, is to build the package.&#160;Click on Project, Package, Create Package. <\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">&#160;<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">Here&#8217;s where directions differ, since he is writing about the Palm.&#160; I have a Cingular 8525 (or AT&amp;T 8525), and want to use the Intent Midlet manager.<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">&#160;<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">When you build your package, you get two files in your Bin file.&#160; You really only need one, the SampleProject.java file.<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">&#160;<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">9.&#160; Get that file onto your phone, anyway you like.&#160; You can either email it as a file attachment, or copy and paste it using ActiveSync.&#160; <\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">&#160;<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">10.&#160; Find the java file that you just saved on your mobile phone using File Explorer, and double click on it.&#160; MidLet Manager will open and ask if you want to install the midlet.&#160;Click on Yes.&#160;&#160; Then double click on SampleProject that you just installed, and the program will execute.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I used the following article to help me figure out &#8212; finally &#8212; how to get a Java program on a mobile phone.&#160; I&#8217;ve done it several times with Visual Basic, but never with Java. &#160; Quoted from http:\/\/www.codeguru.com\/cpp\/w-p\/ce\/networking\/article.php\/c7911\/: &#160; CodeGuru: How to Write a Java MIDlet Program for Wireless Cellular Phones and Handheld PDAs [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1124","post","type-post","status-publish","format-standard","hentry","category-blog"],"_links":{"self":[{"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/posts\/1124","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/comments?post=1124"}],"version-history":[{"count":0,"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/posts\/1124\/revisions"}],"wp:attachment":[{"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/media?parent=1124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/categories?post=1124"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/tags?post=1124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}