Java Setup Notes: Difference between revisions

From Mobile Application Design
Jump to navigationJump to search
No edit summary
No edit summary
 
(53 intermediate revisions by 33 users not shown)
Line 1: Line 1:
[http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$102 motorola ringtones] [http://domc4tvi.blogdiario.com/ cheap soma] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1103 tenuate online] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$87 buy adipex] [http://discussions.csbsju.edu/general/messages/25/rizo-242.html cheap meridia] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832239) free samsung ringtones] [http://getelor.blogdiario.com/ mtv ringtones] [http://www.csun.edu/learningnet/discussion/file.php?0,file=146 qwest ringtones] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832200) cheap carisoprodol] [http://c4tacdom.jubiiblog.de/ free sonyericsson ringtones] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1082 clonazepam online] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$112 real ringtones] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1073 cheap diazepam] [http://www.hcs.harvard.edu/~twiki/pub/Main/AngelKristofer/konevow.htm free mono ringtone] [http://www.hcs.harvard.edu/~twiki/pub/Main/AngelKristofer/soseh.htm verizon ringtones] [http://caboel.blogdiario.com/ cheap clonazepam] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1031?id=atch1139 wwe ringtones] [http://drongetpas.blogdiario.com/ didrex] [http://www.hcs.harvard.edu/~twiki/pub/Main/AngelKristofer/pinyt.htm free sprint ringtones] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832195) buy adipex] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832202) cingular ringtones] [http://www.csun.edu/learningnet/discussion/file.php?0,file=110 cheap tramadol] [http://mkiss47346.blogspot.com advice casino online] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832240) sharp ringtones] [http://www.forumhosting.org/forum.php?mforum=monoror cheap cyclobenzaprine] [http://www.forumhosting.org/forum.php?mforum=rellileto sprint ringtones] [http://discussions.csbsju.edu/general/messages/25/rojyl-228.html valium online] [http://www.csun.edu/learningnet/discussion/file.php?0,file=122 meridia online] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832244) free sonyericsson ringtones] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=313 alltel ringtones] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=328 free funny ringtones] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832247) ultracet online] [http://eralchi.blogdiario.com/ music ringtones] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1067 valium online] [http://www.forumhosting.org/forum.php?mforum=fonewbur cheap cialis] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=346 phentermine online] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1031?id=atch1143 free mtv ringtones] [http://www.hcs.harvard.edu/~twiki/pub/Main/CoyarCharline/hocij.htm levitra online] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1030?id=atch1116 free free ringtones] [http://www.forumhosting.org/forum.php?mforum=wolena clonazepam online] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1031?id=atch1127 verizon ringtones] [http://www.rso.cmich.edu/prevet/messageboard/000031b3.htm generic viagra] [http://www.forumhosting.org/forum.php?mforum=cnaorboc buy ambien] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=342 free nextel ringtones] [http://elllimacc87.blogspot.com lexapro and valium] [http://www.csun.edu/learningnet/discussion/file.php?0,file=131 cheap ambien] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=368 wellbutrin online] [http://www.forumhosting.org/forum.php?mforum=getboctroc buy wellbutrin] [http://www.forumhosting.org/forum.php?mforum=pasletosit free tracfone ringtones] [http://www.forumhosting.org/forum.php?mforum=rolouacel free mp3 ringtones] [http://basacelta.blogdiario.com/ free real ringtones] [http://www.forumhosting.org/forum.php?mforum=escaffey phentermine] [http://www.forumhosting.org/forum.php?mforum=pijasper cheap soma] [http://www.hcs.harvard.edu/~twiki/pub/Main/CoyarCharline/vuzo.htm generic diazepam] [http://www.forumhosting.org/forum.php?mforum=tevaith norco online] [http://bocvidom.jubiiblog.de/ cheap fioricet] [http://eltaget.jubiiblog.de/ free cingular ringtones] [http://sitbasel.jubiiblog.de/ real ringtones] [http://nodelolo.jubiiblog.de/ albuterol online] [http://www.forumhosting.org/forum.php?mforum=darerla polyphonic ringtones] [http://caviou.jubiiblog.de/ cheap prozac] [http://rolvidel.jubiiblog.de/ cheap cialis] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=315 ambien online] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1102 celexa online] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1093 propecia online] [http://www.csun.edu/learningnet/discussion/file.php?0,file=149 samsung ringtones] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832223) motorola ringtones] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1030?id=atch1118 free funny ringtones] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832245) free sprint ringtones] [http://www.csun.edu/learningnet/discussion/file.php?0,file=150 sprint ringtones] [http://cocoleto.blogdiario.com/ phentermine online] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$97 free free ringtones] [http://trrelvar.blogdiario.com/ kyocera ringtones] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1030?id=atch1114 buy zyban] [http://www.csun.edu/learningnet/discussion/file.php?0,file=158 free mono ringtones] [http://discussions.csbsju.edu/general/messages/25/gulel-233.html ultram online] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1088 xenical online] [http://www.hcs.harvard.edu/~twiki/pub/Main/AngelKristofer/veco.htm free real ringtone] [http://chibovi.blogdiario.com/ cheap xenical] [http://www.forumhosting.org/forum.php?mforum=chitrel cingular ringtones] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=331 kyocera ringtones] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$122 sonyericsson ringtones] [http://handspunyarns.blogspot.com valium overdose] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832209) ericsson ringtones] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=326 cheap fioricet] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$116 soma] [http://liricbo.blogdiario.com/ wellbutrin online] [http://carolli.blogdiario.com/ cheap fioricet] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1089 cheap wellbutrin] [http://www.forumhosting.org/forum.php?mforum=olositbo sharp ringtones] [http://leeticarus.blogspot.com what does valium do] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=341 nexium online] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1031?id=atch1138 free midi ringtones] [http://www.csun.edu/learningnet/discussion/file.php?0,file=156 sonyericsson ringtones] [http://www.rso.cmich.edu/prevet/messageboard/000031c4.htm generic paxil] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832221) midi ringtones] [http://sand-stars.blogspot.com valium sale] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1086 ambien online] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$124 free sprint ringtones] [http://orladron.jubiiblog.de/ cheap adipex] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=316 cheap ativan] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1091 buy nexium] [http://www.hcs.harvard.edu/~twiki/pub/Main/AngelKristofer/zyxuwu.htm free sagem ringtones] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832199) cheap ativan] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=336 free mono ringtones] [http://delricc.blogdiario.com/ cheap lorazepam] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=327 free ringtones] [http://taroelt.jubiiblog.de/ free mono ringtones] [http://www.csun.edu/learningnet/discussion/file.php?0,file=147 real ringtones] [http://www.rso.cmich.edu/prevet/messageboard/000031b2.htm generic ativan] [http://discussions.csbsju.edu/general/messages/25/gejobi-229.html buy phentermine] [http://www.hcs.harvard.edu/~twiki/pub/Main/CoyarCharline/popydi.htm generic norco] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1031?id=atch1142 ericsson ringtones] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$92 buy cialis] [http://www.forumhosting.org/forum.php?mforum=acdrago ultram online] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832229) nokia ringtones] [http://www.csun.edu/learningnet/discussion/file.php?0,file=129 levitra online] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832237) real ringtones] [http://cacorol.blogdiario.com/ ericsson ringtones] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1104 ortho online] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832211) free ringtones] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=353 free samsung ringtones] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832206) cyclobenzaprine online] [http://relgetvar.jubiiblog.de/ cheap wellbutrin] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=349 punk ringtones] [http://pasorbas.jubiiblog.de/ free cool ringtones] [http://vigetc.jubiiblog.de/ buy clomid] [http://livior.blogdiario.com/ free alltel ringtones] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1030?id=atch1106 lortab online] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832207) online diazepam] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1031?id=atch1130 free sagem ringtones] [http://www.forumhosting.org/forum.php?mforum=sajohnst cheap ativan] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1030?id=atch1123 free motorola ringtones] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$105 free nextel ringtones] [http://racalmon.jubiiblog.de/ meridia online] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1030?id=atch1115 free nokia ringtones] [http://algetca.jubiiblog.de/ cheap paxil] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1031?id=atch1132 free sony ericsson ringtones] [http://silly-n.blogspot.com best bonus casino online] [http://delelro.jubiiblog.de/ free sprint ringtones] [http://www.forumhosting.org/forum.php?mforum=vipasac free alltel ringtones] [http://www.forumhosting.org/forum.php?mforum=lirolsit xenical online] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$130 tramadol] [http://www.forumhosting.org/forum.php?mforum=coeignus fioricet online] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=347 free polyphonic ringtones] [http://www.forumhosting.org/forum.php?mforum=rebangas carisoprodol online] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$90 ativan online] [http://getnoel.blogdiario.com/ cheap ambien] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832196) alltel ringtones] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1097 buy clomid] [http://www.hcs.harvard.edu/~twiki/pub/Main/CoyarCharline/pecybu.htm alprazolam online] [http://www.forumhosting.org/forum.php?mforum=notrocvi samsung ringtones] [http://boeldron.jubiiblog.de/ nokia ringtones] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1078 adipex online] [http://basor5or5.blogdiario.com/ verizon ringtones] [http://www.forumhosting.org/forum.php?mforum=acrolbas kyocera ringtones] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832246) free tracfone ringtones] [http://www.hcs.harvard.edu/~twiki/pub/Main/AngelKristofer/votebu.htm qwest ringtones] [http://www.rso.cmich.edu/prevet/messageboard/000031ad.htm generic xanax] [http://www.hcs.harvard.edu/~twiki/pub/Main/CoyarCharline/pyhux.htm clonazepam online] [http://www.csun.edu/learningnet/discussion/file.php?0,file=133 buy xenical] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=319 free cingular ringtones] [http://www.csun.edu/learningnet/discussion/file.php?0,file=119 cialis online] [http://www.rso.cmich.edu/prevet/messageboard/000031c1.htm generic alprazolam] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832227) cheap nexium] [http://www.csun.edu/learningnet/discussion/file.php?0,file=116 cheap fioricet] [http://sitracget.blogdiario.com/ free funny ringtones] [http://www.csun.edu/learningnet/discussion/file.php?0,file=144 mp3 ringtones] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=362 ultracet online] [http://trocgetou.jubiiblog.de/ ativan online] [http://www.csun.edu/learningnet/discussion/file.php?0,file=152 verizon ringtones] [http://www.rso.cmich.edu/prevet/messageboard/000031b0.htm generic diazepam] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=325 free ericsson ringtones] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1030?id=atch1110 rivotril] [http://www.hcs.harvard.edu/~twiki/pub/Main/AngelKristofer/nini.htm free ringtone] [http://forum.kharkiv.edu/SForums/topic.asp?TOPIC_ID=309&FORUM_ID=3&CAT_ID=3 carisoprodol online] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832255) xanax online] [http://cochibas.blogdiario.com/ free ringtones] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$125 tracfone ringtones] [http://www.csun.edu/learningnet/discussion/file.php?0,file=125 buy vicodin] [http://pasricac.blogdiario.com/ free wwe ringtones] [http://www.csun.edu/learningnet/discussion/file.php?0,file=113 buy phentermine] [http://www.csun.edu/learningnet/discussion/file.php?0,file=135 cheap cyclobenzaprine] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832250) free verizon ringtones] [http://bascnadar.blogdiario.com/ buy hydrocodone] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=371 xenical online] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832218) cheap levitra] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=329 order hydrocodone] [http://forum.kharkiv.edu/SForums/topic.asp?TOPIC_ID=316&FORUM_ID=3&CAT_ID=3 meridia online] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=343 nokia ringtones] [http://www.rso.cmich.edu/prevet/messageboard/000031af.htm cheap ultram] [http://www.csun.edu/learningnet/discussion/file.php?0,file=111 soma online] [http://www.csun.edu/learningnet/discussion/file.php?0,file=138 propecia online] [http://eleltrac.blogdiario.com/ ativan online] [http://www.forumhosting.org/forum.php?mforum=lebowles cheap adipex] [http://getsitolo.jubiiblog.de/ cheap lorazepam] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$114 samsung ringtones] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1031?id=atch1133 free mono ringtones] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1030?id=atch1125 sprint ringtones] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=355 cheap soma] == Setting up your environment ==
== Setting up your environment ==


Having a good environment setup is essential for everything you will be doing with Java ME - writing, compiling, packaging, debugging, obfuscating, tearing your hair out etc etc. Use the instructions here to setup your environment on Windows or OS X (currently experimental).  
Having a good environment setup is essential for everything you will be doing with Java ME - writing, compiling, packaging, debugging, obfuscating, tearing your hair out etc etc. Use the instructions here to setup your environment on Windows or OS X (currently experimental).  


<h2>Java   Wireless Toolkit</h2>
<h2>Java + Wireless Toolkit</h2>
#Java Standard Edition Development Kit (JDK) - you need to have some version of Java installed on your machine. Try to get version 1.4.2 (or later). This is essential for development. NOTE: You MUST have the JDK installed before you install the Java Wireless Toolkit as you will need the tools it contains (such as javac) to compile and run your MIDlets.
#Java Standard Edition Development Kit (JDK) - you need to have some version of Java installed on your machine. Try to get version 1.4.2 (or later). This is essential for development. NOTE: You MUST have the JDK installed before you install the Java Wireless Toolkit as you will need the tools it contains (such as javac) to compile and run your MIDlets.
#Download it here: http://java.sun.com/j2se/downloads/index.html. Get the version without any other bundled software. It should be called something like JDK 5.0 Update 8.
#Download it here: http://java.sun.com/j2se/downloads/index.html. Get the version without any other bundled software. It should be called something like JDK 5.0 Update 8.
Line 29: Line 29:
   <p>A good way to test if this worked is to type the preverify command without any arguments in the command line. You should see something like this on your screen. </p>
   <p>A good way to test if this worked is to type the preverify command without any arguments in the command line. You should see something like this on your screen. </p>
<pre>
<pre>
C:\> preverify<br />
C:\> preverify
Usage: PREVERIFY.EXE [options] classnames|dirnames ...<br />
Usage: PREVERIFY.EXE [options] classnames|dirnames ...
<br />
 
where options include:<br />
where options include:
   -classpath <directories separated by ';'><br />
   -classpath <directories separated by ';'>
                   Directories in which to look for classes<br />
                   Directories in which to look for classes
   -d <directory> Directory in which output is written <br />
   -d <directory> Directory in which output is written
   @<filename>    Read command line arguments from a text file.<br />
   @<filename>    Read command line arguments from a text file.
</pre>
</pre>


Line 48: Line 48:


<h3>Mac OS X</h3>
<h3>Mac OS X</h3>
None of the manufacturers have bothered to port their SDKs for the Mac, and neither has Sun, but there is a way to develop MIDP 1.0 and 2.0 applications using Apache Ant, MPowerplayer MIDP 2.0 SDK and J2ME Polish. Get 'em while they're hot:  
None of the manufacturers have bothered to port their SDKs for the Mac, and neither has Sun, but there are a number of ways to develop MIDP 1.0 and 2.0 applications on OS X using either
* MPowerplayer + EclipseME + Eclipse OR
* Apache Ant, MPowerplayer and J2ME Polish. OR
* Netbeans + MPowerplayer OR
* Mobile.Processing + MPowerplayer.
 
Whichever method you choose, you're going to need MPowerplayer.
 
<h5>MPowerplayer MIDP 2.0 SDK</h5>
# Download this from http://www.mpowerplayer.com/products-sdk.php
# Save the file somewhere in your src folder and unzip it. On my machine this looked like this:
<pre>
/Users/michael/src/mobile/mpp-sdk
</pre>
# [Optional] I like making shortcuts so that it's easy for me to run the application. Fire up your favourite editor and type this
<pre>java -jar /Users/michael/src/mobile/mpp/player.jar $1 &</pre>
and then save that somewhere in your path as '''mpp'''. I saved it as <pre>/Users/michael/mpp</pre>
Then, make it executable by typing:  
<pre>chmod 755 mpp</pre>
Now, all you need to do to run JAD/JAR files in the emulator is type <pre>mpp [filename.jad/filename.jar]</pre>
 
----


<h5>Apache Ant</h5>
<h5>Apache Ant (OPTIONAL - ONLY FOR J2ME POLISH USERS)</h5>
# Download Apache Ant from http://download.nextag.com/apache/ant/binaries/apache-ant-1.6.5-bin.tar.gz  
# Download Apache Ant from http://download.nextag.com/apache/ant/binaries/apache-ant-1.6.5-bin.tar.gz  
# Save it somewhere easy and memorable - on my machine I save all my downloaded source files to <pre>/Users/michael/src</pre>
# Save it somewhere easy and memorable - on my machine I save all my downloaded source files to <pre>/Users/michael/src</pre>
Line 83: Line 104:
This means that Ant is installed and we're ready to roll.
This means that Ant is installed and we're ready to roll.


<h5>MPowerplayer MIDP 2.0 SDK</h5>
<h5>J2ME Polish (OPTIONAL - ONLY FOR ADVANCED STUDENTS)</h5>
# Download this from http://www.mpowerplayer.com/products-sdk.php
# Download [http://j2mepolish.org/downloads/j2mepolish-2.0-beta1.html J2ME Polish]. I got the latest 2.0 beta version. It seems to work well.  
# Save the file somewhere in your src folder and unzip it. On my machine this looked like this:
# Run the downloaded JAR file
# Choose the GPL or Evaluation license
# Select the directory where you installed the MPP-SDK as the path to your wireless toolkit.  
# Test if everything installed correctly by running one of the J2ME Polish sample applications
<pre>
<pre>
/Users/michael/src/mobile/mpp-sdk
cd /Applications/J2ME-Polish/samples/menu
ant
</pre>
</pre>
# [Optional] I like making shortcuts so that it's easy for me to run the application. Fire up your favourite editor and type this
# You should see a few messages from Ant letting you know that it's building the application. The build is configured to store all the JAD and JAR files inside the dist folder.
<pre>java -jar /Users/michael/src/mobile/mpp/player.jar $1
# Once it's done, if you created a shortcut to the MPowerplayer SDK like I suggested above, you should be able to run it by typing something like
<pre>
mpp dist/Sony-Ericsson-P900-en_US-example.jad
</pre>
# I included a modified build.xml with extensive comments file in the [http://uberthings.com/teaching/mobile_application_design/1/code.zip HelloMidlet] code samples. Open it up in a text editor and read through to learn how it works.
 
<h5>Building</h5>
To build applications with J2ME Polish, Mpowerplayer and Ant, you need to do the following:
 
# Copy the build.xml file into your MIDlet's directory.
# Check the paths inside the build.xml file to ensure that they're pointing to the right folders for your source folders, Mpowerplayer and J2ME Polish
# Type ant. Watch the magic unfold.
 
<h2>IDE's</h2>
<h3>Eclipse</h3>
 
[http://eclipse.org Eclipse] is a fantastic open source Java Integrated Development Environment (IDE) which has a few sweet J2ME plugins. The one I use the most is called [http://eclipseme.org EclipseME]. <s>Although Eclipse is cross-platform, EclipseME doesn't work very well on OS X.</s> OS X works nicely with EclipseME and the MPowerplayer SDK.
 
'''Windows'''
 
# Download Eclipse from http://www.eclipse.org/downloads/. Install it somewhere easy - like C:\eclipse
# Configuring and install EclipseME using the excellent installation and configuration instructions [http://eclipseme.org/docs/installEclipseME.html here] to guide you through this process.
# Once you're done - we're ready to start coding! Yeah!
 
'''OS X'''
 
# Install EclipseME from the download site.
# Go to Window->Preferences. Select J2ME.
# When it asks you for the WTK Root - select the folder where you installed the Mpowerplayer SDK - for me it was /Users/michael/src/mobile/mpp-sdk.
# Go to Device Manager. Hit Import. Select the Mpowerplayer directory again. It will only find one emulator. Select it.
# Hit Apply. Then ok.
 
'''Initial Directory structures'''
# For my projects, I like to set up my source files in the /src folders of my projects and all external files to be in /res - this is how you do it in Eclipse.
[http://uberthings.com/teaching/mobile_application_design/i/j2me_setup.jpg J2ME Setup]
 
[http://uberthings.com/teaching/mobile_application_design/i/java_build_path.jpg Java Build Path]
 
<h3>Netbeans</h3>
Download Netbeans from Sun here - http://www.netbeans.org/. I don't use it much, but I've heard good things. Let me know how it treats you.
 
<h3>Mobile.Processing</h3>
 
[http://mobile.processing.org/ Mobile.Processing] is an open source programming environment for people who want to design and prototype software for mobile phones. It is based on and shares the same design goals as the open source [http://processing.org Processing ] project. Sketches programmed using Mobile Processing run on Java Powered mobile devices. Mobile.Processing is extremely easy to get up and running with, but has some drawbacks which will prevent us from using it.
 
Mobile.Processing is available for both Windows and Mac OS X. Download it [http://mobile.processing.org/download/index.php here].

Latest revision as of 20:10, 10 September 2007

Setting up your environment

Having a good environment setup is essential for everything you will be doing with Java ME - writing, compiling, packaging, debugging, obfuscating, tearing your hair out etc etc. Use the instructions here to setup your environment on Windows or OS X (currently experimental).

Java + Wireless Toolkit

  1. Java Standard Edition Development Kit (JDK) - you need to have some version of Java installed on your machine. Try to get version 1.4.2 (or later). This is essential for development. NOTE: You MUST have the JDK installed before you install the Java Wireless Toolkit as you will need the tools it contains (such as javac) to compile and run your MIDlets.
  2. Download it here: http://java.sun.com/j2se/downloads/index.html. Get the version without any other bundled software. It should be called something like JDK 5.0 Update 8.
  3. Java ME, Wireless Toolkit (WTK). This contains the essential tools that we need to build, package and install mobile applications. Download it here: http://java.sun.com/products/j2mewtoolkit/. Get the [J2ME Wireless Toolkit 2.2 http://java.sun.com/products/sjwtoolkit/download-2_2.html], or if you feel living on the bleeding edge - grab the Sun [Java Wireless Toolkit 2.5 for CLDC, Beta http://java.sun.com/products/sjwtoolkit/download-2_5.html](the toolkit formerly known as J2ME Wireless Toolkit). Careful, you may cut yourself.
  4. I'm going to assume that you will install this into the
    C:\WTK\
    directory - if you install it somewhere else, just modify the paths accordingly.

Paths

To play nicely with the grown-ups, Java needs to know where all your files are, so we need to add the location of the Java binaries to the system path.

Windows 95/98

Go to Start->Run. Type in command. Then type

SET PATH=%PATH%;C:\WTK\bin

You should also edit your C:\autoexec.bat file to include this line, so you don't have to enter it every single time you restart your computer. After you've done this, you should be able to run the tools included in the Java Wireless Toolkit from any directory on your system.

Windows 2000/XP

  1. Go to Control Panel -> System.
  2. Click on the Advanced Tab
  3. Click on the Environment Variables button
  4. Double-click the PATH variable in the System variables box
  5. At the end of the Variable value field, add the path to your J2ME WTK installation - for me this is something like ;C:\WTK
  6. If you had to install the J2SE SDK too, it's a good idea to add the paths for that as well - for me this was C:\j2sdk1.4.2_03;C:\j2sdk1.4.2_03\bin.

A good way to test if this worked is to type the preverify command without any arguments in the command line. You should see something like this on your screen.

C:\> preverify
Usage: PREVERIFY.EXE [options] classnames|dirnames ...

where options include:
   -classpath <directories separated by ';'>
                  Directories in which to look for classes
   -d <directory> Directory in which output is written
   @<filename>    Read command line arguments from a text file.

Emulators

Windows

Depending on your target device, you should download and install the SDK for that particular handset or family of handsets from the manufacturer's site. Since this course is based around the Nokia Series 60 handsets, we're going to grab the Nokia Series 60 2nd Edition SDK, Feature Pack 2 and 3 as well as the Nokia Series 60 3rd Edition SDK (for the N80). You'll also need to get serial numbers for these SDKs, so don't forget to request those as well. Download them from here:

Series 60 SDKs

Mac OS X

None of the manufacturers have bothered to port their SDKs for the Mac, and neither has Sun, but there are a number of ways to develop MIDP 1.0 and 2.0 applications on OS X using either

  • MPowerplayer + EclipseME + Eclipse OR
  • Apache Ant, MPowerplayer and J2ME Polish. OR
  • Netbeans + MPowerplayer OR
  • Mobile.Processing + MPowerplayer.

Whichever method you choose, you're going to need MPowerplayer.

MPowerplayer MIDP 2.0 SDK
  1. Download this from http://www.mpowerplayer.com/products-sdk.php
  2. Save the file somewhere in your src folder and unzip it. On my machine this looked like this:
/Users/michael/src/mobile/mpp-sdk
  1. [Optional] I like making shortcuts so that it's easy for me to run the application. Fire up your favourite editor and type this
java -jar /Users/michael/src/mobile/mpp/player.jar $1 &

and then save that somewhere in your path as mpp. I saved it as

/Users/michael/mpp

Then, make it executable by typing:

chmod 755 mpp

Now, all you need to do to run JAD/JAR files in the emulator is type

mpp [filename.jad/filename.jar]

Apache Ant (OPTIONAL - ONLY FOR J2ME POLISH USERS)
  1. Download Apache Ant from http://download.nextag.com/apache/ant/binaries/apache-ant-1.6.5-bin.tar.gz
  2. Save it somewhere easy and memorable - on my machine I save all my downloaded source files to
    /Users/michael/src
  3. Here is the process. To try keep things clean, we're going to be installing into /usr/local.
tar -zxvf apache-ant-1.6.5-src.tar.gz
cd /usr/local
sudo mkdir ant
cd ant
sudo cp -R ~/src/apache-ant-1.6.5/bin .
sudo cp -R ~/src/apache-ant-1.6.5/lib .
  1. Set up the paths in your environment
pico ~/.bash_login

Add these lines somewhere

export ANT_HOME=/usr/local/ant
export JAVA_HOME=/Library/Java/Home
export PATH=${PATH}:${ANT_HOME}/bin

Shut down your shell, open it up again and type

ant

You should see something like this 

Buildfile: build.xml does not exist!
Build failed

This means that Ant is installed and we're ready to roll.

J2ME Polish (OPTIONAL - ONLY FOR ADVANCED STUDENTS)
  1. Download J2ME Polish. I got the latest 2.0 beta version. It seems to work well.
  2. Run the downloaded JAR file
  3. Choose the GPL or Evaluation license
  4. Select the directory where you installed the MPP-SDK as the path to your wireless toolkit.
  5. Test if everything installed correctly by running one of the J2ME Polish sample applications
cd /Applications/J2ME-Polish/samples/menu
ant
  1. You should see a few messages from Ant letting you know that it's building the application. The build is configured to store all the JAD and JAR files inside the dist folder.
  2. Once it's done, if you created a shortcut to the MPowerplayer SDK like I suggested above, you should be able to run it by typing something like
mpp dist/Sony-Ericsson-P900-en_US-example.jad 
  1. I included a modified build.xml with extensive comments file in the HelloMidlet code samples. Open it up in a text editor and read through to learn how it works.
Building

To build applications with J2ME Polish, Mpowerplayer and Ant, you need to do the following:

  1. Copy the build.xml file into your MIDlet's directory.
  2. Check the paths inside the build.xml file to ensure that they're pointing to the right folders for your source folders, Mpowerplayer and J2ME Polish
  3. Type ant. Watch the magic unfold.

IDE's

Eclipse

Eclipse is a fantastic open source Java Integrated Development Environment (IDE) which has a few sweet J2ME plugins. The one I use the most is called EclipseME. Although Eclipse is cross-platform, EclipseME doesn't work very well on OS X. OS X works nicely with EclipseME and the MPowerplayer SDK.

Windows

  1. Download Eclipse from http://www.eclipse.org/downloads/. Install it somewhere easy - like C:\eclipse
  2. Configuring and install EclipseME using the excellent installation and configuration instructions here to guide you through this process.
  3. Once you're done - we're ready to start coding! Yeah!

OS X

  1. Install EclipseME from the download site.
  2. Go to Window->Preferences. Select J2ME.
  3. When it asks you for the WTK Root - select the folder where you installed the Mpowerplayer SDK - for me it was /Users/michael/src/mobile/mpp-sdk.
  4. Go to Device Manager. Hit Import. Select the Mpowerplayer directory again. It will only find one emulator. Select it.
  5. Hit Apply. Then ok.

Initial Directory structures

  1. For my projects, I like to set up my source files in the /src folders of my projects and all external files to be in /res - this is how you do it in Eclipse.

J2ME Setup

Java Build Path

Netbeans

Download Netbeans from Sun here - http://www.netbeans.org/. I don't use it much, but I've heard good things. Let me know how it treats you.

Mobile.Processing

Mobile.Processing is an open source programming environment for people who want to design and prototype software for mobile phones. It is based on and shares the same design goals as the open source Processing project. Sketches programmed using Mobile Processing run on Java Powered mobile devices. Mobile.Processing is extremely easy to get up and running with, but has some drawbacks which will prevent us from using it.

Mobile.Processing is available for both Windows and Mac OS X. Download it here.