J2ME is the Java for Embedded Mobile Device.

TODO

WTK

[[RzR]]

OPENSOURCE

BLACKBERRY

emulators under linux

tutorial

t=/opt/wtk && mkdir -p “$t” && cd “$t” unp sun_java_wireless_toolkit-2_5_2-linux.bin

[[Resources]]

OpenSource / Software

Software

* 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

http://sdlc-esd.sun.com/ESD10/JSCDL/j2me_wireless_toolkit/2.1_01-fcs/j2me_wireless_toolkit-2_1_01-linux-i386.bin?AuthParam=1127608155_88bd3411b9a714c6234080db3f53c5f5&TUrl=LxU7fwxQLugy+ErpKYcvIWlVeCBzPG60JI8nt3z9f3UsBDtcUw13tW6+&TicketId=dlJ/PQRHNeA7/Q==&GroupName=SDLC&BHost=sdlcweb7d.sun.com&FilePath=/ESD10/JSCDL/j2me_wireless_toolkit/2.1_01-fcs/j2me_wireless_toolkit-2_1_01-linux-i386.bin&File=j2me_wireless_toolkit-2_1_01-linux-i386.bin

# 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

HARDWARE

Siemens

# ed2k://|file|smtk_0_13_2_59.exe|8186089|7b21c7c2bd2fb3da48f8239979fba11f|

Error messages :

Nokia6630 :

Unable to install, Invalid file.

WTK crash :

ALERT: java/lang/ClassFormatError: Bad version information.
JAVAC?=javac -target 1.2 -source 1.2

Palm

.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)

VODAPHONE

Sharp GX10, GX10i & GX20.

PHILIPS

  • Phillips 530 j2me sdk/emulator

DEPLOY APP

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

EXEN

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)

http://developer.in-fusio.com/bb/viewthread.php?tid=587

EMULATORS

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).

http://rzr.online.fr/docs/java/linux.htm

J2ME

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 );===

http://www.microjava.com/articles/techtalk/optimization

J2ME vs JAVA

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]]

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

errors

  /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 

MISC

MORE

@TaG: midlet Midlet Mobile Nokia Diet3D DoJa API Nokia jdk jre palm JavA AndroiD

<iframe width="560" height="315" src="http://www.youtube-nocookie.com/embed/S0B9UExsPpE" frameborder="0" allowfullscreen></iframe>

j2me.txt · Last modified: 2022/04/16 12:23 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki