J2ME is the Java for Embedded Mobile Device.
t=/opt/wtk && mkdir -p “$t” && cd “$t” unp sun_java_wireless_toolkit-2_5_2-linux.bin
* http://java.sun.com/javame/downloads
Ant based preprocessors : VPP & ANtenna
ed2k://|file|j2me_wireless_toolkit-2_1_01-linux-i386.bin|13836285|4e81d9f0b3cb7cc632bfb31cb87ce0bb| ed2k://|file|j2me_wireless_toolkit-2_2-linux-i386.bin|17637106|c84f56623d48be947d9ef10af8c1c09f|
# ed2k://|file|j2me_wireless_toolkit-2_2-linux-i386.bin|17637106|c84f56623d48be947d9ef10af8c1c09f| mkdir -p /opt/WTK-2.2 && cd /opt/WTK-2.2 unzip -q j2me_wireless_toolkit-2_2-linux-i386.bin # warning [[../j2me_wireless_toolkit-2_2-linux-i386.bin]]: # 20480 extra bytes at beginning or within zipfile # (attempting to process anyway) ./bin/emulator -Xdescriptor:apps/Demo3D/bin/Demo3D.jad ./bin/emulator -Xjam:force
# ed2k://|file|j2me_wireless_toolkit-2_1_01-linux-i386.bin|13836285|4e81d9f0b3cb7cc632bfb31cb87ce0bb|
DESTDIR=/usr/local/local/${OSTYPE}/opt/j2me_wireless_toolkit-2_1_01 mkdir -p ${DESTDIR} && cd ${DESTDIR} unzip -q ~/j2me_wireless_toolkit-2_1_01-linux-i386.bin
# ed2k://|file|smtk_0_13_2_59.exe|8186089|7b21c7c2bd2fb3da48f8239979fba11f|
Nokia6630 :
Unable to install, Invalid file.
WTK crash :
ALERT: java/lang/ClassFormatError: Bad version information. JAVAC?=javac -target 1.2 -source 1.2
.jar+ .jad should be converted to .prc for palm (pose) http://java.sun.com/products/midp4palm/index.html
ipaq h3870 :
UA=Mozilla/2.0 (compatible; MSIE 3.02; Windows CE; PPC; 240x320) ?
HP IPAC Pocket PC H2200 working with windows CE (wabaVM and SuperWaba)
Sharp GX10, GX10i & GX20.
AddType application/java-archive jar AddType text/vnd.sun.j2me.app-descriptor jad AddType application/x-jam jam
Addtype text/vnd.wap.wml wml Addtype application/vnd.wap.wmlc wmlc Addtype text/vnd.wap.wmlscript wmls Addtype application/vnd.wap.wmlscriptc wmlsc Addtype image/vnd.wap.wbmp wbmp
Linking to etc\lib\ExEnV2.jar Java compiler : javac.exe Creating EXN archive ... Converting Class files to PVC... PVC linking... > Severe Error========== > CLASS ID NOT FOUND
Never Use Classes out of exen API (System.out)
Each manufacturer provide their own SDK (classes + api + emulator)
There is also an OpenSource Applet emulator Project : http://www.barteo.net/microemulator/
Currently it is midp1.0 complient, midp2.0 API should not be too hard to add
There are some strange bug i can not resolve using MS JVM (IE3+) classes must be compiled using java 1.1 target code generation.
Also porting midlets to java applets is possible, all you have to do is rewrite midp classes that your midlet is using (using awt layer).
String config = System.getProperty( microedition.configuration" ); if( config ==== null ){=== isCLDC = ( config.indexOf( "CLDC-" ) ==== -1 );=== } else { isCLDC = false; } String profiles = System.getProperty("microedition.profiles" ); if( profiles ==== null ){=== isMIDP = ( profiles.indexOf( "MIDP-" ) ==== -1 );===
J2ME does not provide Object.clone() method then to use this copy contructor you must have to write you own :
Class A { String name; }
Class A { String name; public A(A arg) { this.name = arg.name; } }
Eclipse for Debian http://fincos.homeip.net/debian/
http://sourceforge.net/tracker/index.php?func=detail&aid=1177053&group_id=86829&atid=581073 http://eclipseme.org/eclipseme.feature_0.9.1_site.zip
# Unhandled event loop exception Reason: no jawin in java.library.path Unhandled event loop exception Reason: java.lang.NoClassDefFoundError
/opt/wtk/bin/emulator -Xdescriptor:j2metest.jad com.sun.kvem.midletsuite.InvalidJadException: Reason = 36 jar cvfm ./${PACKAGE}.jar -C tmp MANIFEST.MF . adding: META-INF/ (in=0) (out=0) (stored 0%) Invalid manifest file specified. /opt/wtk/bin/emulator -Xdescriptor:${PACKAGE}.jad com.sun.kvem.midletsuite.InvalidJadException: Reason = 36 Error in opening jar file: /mnt/sda5/backup/00000000-current/nrv/mnt/hda5/home/rzr/src/j2metest/j2metest.jad check MIDlet-Jar-URL: /opt/wtk/bin/emulator -Xdescriptor:${PACKAGE}.jad com.sun.kvem.midletsuite.InvalidJadException: Reason = 13 The file Manifest is missing the required attribute:MIDlet-Name You used : jar cvf ./${PACKAGE}.jar -C tmp . emulator: ALERT: java/lang/ClassFormatError: Bad version information. Method............: b7b82148 'com/sun/midp/midlet/MIDletState.createMIDlet (static)' javac -target 1.2 -source 1.2