#rzr@nrv:WTK104/$ uname -a Linux nrv 2.4.22-amiloa #12 mer nov 5 18:34:14 CET 2003 i686 GNU/Linux #root@nrv/# apt-get install j2sdk1.4 # j2sdk1.3 may also works ? #rzr@nrv:WTK104/$ java -version java version "1.4.1" Java(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.4.1-01) Java HotSpot(TM) Client VM (build Blackdown-1.4.1-01, mixed mode)
http://java.sun.com/j2me/ http://developer.java.sun.com/developer/releases/j2mewtoolkit/ umask 000 #if root (shared) sh j2me_wireless_toolkit-1_0_4_01-bin-linuxi386.bin sh j2me_wireless_toolkit-2_0-bin-linuxi386.bin
#rzr@nrv:WTK104/$ ./bin/emulator -Xdescriptor:./apps/games/bin/games.jad #rzr@nrv:WTK2.1/$ ./bin/emulator -Xdescriptor:./apps/audiodemo/bin/audiodemo.jad #rzr@nrv:WTK104/$ ./bin/ktoolbar /opt/WTK2.1/bin/emulator -XJam:force
# http://wireless.java.sun.com/midp/articles/wtoolkit/ # http://wireless.java.sun.com/midp/articles/wtoolkit/src/HelloMIDlet.java # http://www.javasig.com/grokshop.html API=/opt/WTK104/lib/midpapi.zip #/opt/WTK2.1/lib/midpapi20.zip CFLAGS=-bootclasspath ${API} PATH+=:/opt/WTK104/bin/ javac ${CFLAGS} HelloMIDlet.java preverify -classpath ${API} HelloMIDlet cd output && \ jar cf HelloWorld.jar HelloMIDlet.class #rzr@nrv:j2me/$ cat output/HelloWorld.jad MIDlet-1: HelloWorld, HelloWorld.png, HelloMIDlet MIDlet-Jar-Size: 1178 MIDlet-Jar-URL: HelloWorld.jar MIDlet-Name: HelloWorld MIDlet-Vendor: Sun Microsystems MIDlet-Version: 1.0 #rzr@nrv:j2me/$ emulator -Xdescriptor:./output/HelloWorld.jadNote : Preverification performs certain checks on the Java bytecodes ahead of runtime. If this first verification pass is ok, the preverifier annotates the classfiles (using standard Java bytecode "attributes", so that these are still plain old Java bytecodes and will be executable in VMs not aware of the benefits of preverification), and then saves the annotated class files or passes them along to the next tool in the compile chain.
A Graphics application :
http://wireless.java.sun.com/midp/articles/game/ javac -d ./ -bootclasspath /opt/WTK2.1//lib/cldcapi10.zip \ SimpleGameCanvas.java javac -d ./ -bootclasspath /opt/WTK2.1//lib/cldcapi10.zip \ SimpleGameMIDlet.java preverify \ -classpath /opt/WTK2.1/lib/midpapi20.zip:/opt/WTK2.1//lib/cldcapi10.zip:. \ -d ./ SimpleGameMIDlet preverify \ -classpath /opt/WTK2.1/lib/midpapi20.zip:/opt/WTK2.1//lib/cldcapi10.zip:. \ -d ./ SimpleGameCanvas jar cf SimpleGame.jar SimpleGameCanvas.class SimpleGameMIDlet.class emulator \ -classpath /opt/WTK2.1/lib/midpapi20.zip:/opt/WTK2.1//lib/cldcapi10.zip:. \ -Xdescriptor:SimpleGame.jad
# /opt/Nokia/Tools/Nokia_Developers_Suite_for_J2ME/bin/RunNDSforJ2ME.sh # dos2unix \ /opt/Nokia/Devices/Series_60_MIDP_Concept_SDK_Beta_0_3_1_Nokia_edition/\ bin/emulator # /opt/Nokia/Devices/Series_60_MIDP_Concept_SDK_Beta_0_3_1_Nokia_edition/\ bin/emulator Mini3d.jad
ed2k://|file|j2me_wireless_toolkit-1_0_4_01-bin-linuxi386.bin|8497890|130ff250ee530e90fbf13036e3de1093| ed2k://|file|j2me_wireless_toolkit-2_1-beta-bin-linux-i386.bin|12901111|18112812c506e6400e24448c4e1df3fd| ed2k://|file|midp-2_0-src-linux-i686.zip|8082579|efc9fe30de9874cc5df99d8c971f2249| ed2k://|file|nds_jme_linux_v_2_0.tar.gz|14639906|6b2759b11535b680cd704c87d31fde55|
They provide a free downloadable SDK for windows, with a few tricks you can use it on linux (not fully usable for me , so far). Hope this may helps :
# Some settings tricks, after installing SDK to w32 folders ln -fs /mnt/c/Program\ Files ${HOME}/mnt/program_files/ export SDK_DIR=${HOME}/mnt/program_files/InFusioSDK/ # I use Linux j2sdk (might not be the same version) javac -bootclasspath ${SDK_DIR}etc/lib/ExEnV2.jar \ -classpath ${SDK_DIR}etc/lib/ExEnV2.jar:. MyClass.java wine -- ${SDK_DIR}bin/vmtools/VMTrans.exe -gp -v -w -vd MyClass # Genrerating ROM # I got an error on that one ? please help wine -- ${SDK_DIR}bin/vmtools/exenrom/exenrom.exe \ -gv -dc . -dr ${SDK_DIR}etc/exenrom/ExEnV2/lexen.rom \ -do le_default.exn Bad reference format Severe Error!!! Severe error(FFFF) # starting simulator worked (with win32 compiled binaries) wine -- ${SDK_DIR}bin/simulator_v2/generic/Color/gensimu.exe le_default.exnPlease help to make exen 100% supported on linux
ed2k://|file|smtkS55_09.exe|8886272|36f7b8d5ad2dc1745c97fffef98680ca| ed2k://|file|smtk_0_13_2_59.exe|8186089|7b21c7c2bd2fb3da48f8239979fba11f|
ed2k://|file|tool_semc_j2me_sdk_v12_09.zip|19607827|63268f7801b6d97f2cea1e85089ff1db|
ed2k://|file|idk_doja1.5_vers_1.0.6.zip|6042263|fe5951e575793e3c75b02cd81a424c4c|
# ** Error installing suite (38): JAR did not have the correct media type, it had application/x-java-archive # Content-Type: application/x-java-archive # lynx -mime_header -dump http://rzr.online.fr/docs/java/jclasses/Mini3d.jar # application/java-archive jar # @ /etc/apache/mine.types # or # AddType application/java-archive .jar @ ~/public_html/.htaccess # AddType text/vnd.sun.j2me.app-descriptor jad # is that correct also ? wbmp image/vnd.wap.wbmp wml text/vnd.wap.wml wmlc application/vnd.wap.wmlc wmlsc application/vnd.wap.wmlscriptc wmlscript text/vnd.wap.wmlscript ws text/vnd.wap.wmlscript wsc application/vnd.wap.wmlscriptcJust mimetype conventions, If you cant access server settings, other cases a php script may hack it and force mime type
** Error installing suite (25): A required suite ID attribute in the JAR manifest do not match the one in the JADCompare MANIFEST.MF & .jad (byte per byte) and size must match
ALERT: Unable to load class javax/microedition/lcdui/game/GameCanvas "Application not supported" error WARNING: Attribute value for MicroEdition-Profile defined in JAR manifest is not supported.midp1.0 devices dont support midp2.0 API :)
#No MIDlet Suites found. Check the URL to make sure it is correct. #** Error installing suite (34): The JAD to be installed is for an existing suite, but not from the same domain as the existing one.I got this error with WTK1, A html file with a absolute link solved this trouble ! (check for modes)
"error 503 service not available"On Nokia 7650 reaching a not valid .wml
# The connection dropped, and the installation did not complete. Please try installing again # Unable to create MIDlet Mini3dMIDlet # Warning: Failed to initialize WMA message routing support # chmod -R a+rwX /opt/WTK104 # chmod -R a+rwX /opt/WTK104/appdb/SDK should not be readonly
ATTENTION: Could not lock System prefs.Unix error code -1113590424. 20 nov. 2003 17:32:31 java.util.prefs.FileSystemPreferences syncWorld #root@ttyp4[rzr]# mkdir -p /etc/.java/.systemPrefs/ #root@ttyp4[rzr]# #touch /etc/.java/.systemPrefs/.system.lockThis is a inherent java / linux warning
On Epoc emulator : Program Closed jes-0-javac.microedition.lcdui0@561.. On Nokia 3650 : jes-36e-javax.microedition.lcdui0@1...I got this bug when merging all my classes into a single one