Microemulator is J2ME Device Emulator is pure Java implementation of J2ME in J2SE. It allows demonstrate MIDlet (MIDP/CLDC) based applications as a standalone Java application or as web browser applet.
Context:
1. Running application
2. Applet config
3. Building MicroEmulator from sources
Requirements:
- J2SE 1.4+
There are two methods of running apps in emulator:
1. As an application:
- java org.microemu.app.Main (MIDlet application main class) or, java org.microemu.app.Main (MIDlet jad file)
-
- microemulator.jar must be in CLASSPATH
- java -jar microemulator.jar (MIDlet application main class) or, java -jar microemulator.jar (MIDlet jad file)
- (MIDlet application main class) parameter is optional, if used MIDlet application jar file must be in CLASSPATH
- (MIDlet jad file) must have .jad extension,
- for Nokia UI support include nokiaui.jar to the CLASSPATH,
- for Siemens API support include siemensapi.jar to the CLASSPATH.
2. In applet:
Preparing applet version of MIDlet should be done by selecting Save for Web menu item from File menu
in standalone MicroEmulator application. During that process additional MIDlet bytecode modification
is performed in order to satisfy some compatibility issues running Java ME code inside Java SE.
Produced html code:
- for Nokia UI support include nokiaui.jar to the archive attribute,
- for Siemens API support include siemensapi.jar to the archive attribute.
There is additional parameter in applet definition tag if you want start applet with another device than default:
eg. minimum phone included in distribution has org/microemu/device/minimum/device.xml
and remember to include new device jar into applet archive tag
eg. minimum phone included in distribution has minimum.jar
Example for SimpleDemo MIDlet, Nokia UI support and Minimum device:
Example for SimpleDemo MIDlet and Minimum device with Mouse and color:
Example for SimpleDemo MIDlet and Large Skin:
3. Building MicroEmulator from sources
We are using maven2 to build project
To build project you need this environment variables:
JAVA_HOME, SWT_HOME (to build swt module) and WTK_HOME to compile and test MIDlets
To create Eclipse projects run:
mvn eclipse:clean eclipse:eclipse -DdownloadSources=trueTo run build without tests:
mvn -Dmaven.test.skip=true
- Project Admins : barteo, vlads
- Developers : 4
- Development Status : 5 - Production/Stable
- Intended Audience : Developers
- License : GNU Library or Lesser General Public License (LGPL)
- Operating System : OS Independent (Written in an interpreted language)
- Programming Language : Java
- Topic : Software Development, Emulators
- Translations : English
- User Interface : Java AWT, Java Swing, Java SWT
- Project UNIX name : microemulator
- Registered : 2001-06-25 08:56
OPERA MINI MOD
konfigurasi:
- double-click “microemulator.jar”. atau ketik “java -jar microemulator.jar” di console (Command Prompt). (Anda harus memiliki JRE agar bisa menjalankan ini)
- lalu ke “Options > Select device”, klik “Add…”, terus ke “microemulator\devices” pilih “microemu-device-resizable.jar”
- pilih “Resizable device” lalu “Set as default”
- klik “Resize” dan masukan ukuran yang anda inginkan (misal sesuai ukuran monitor anda)
- trus “File > Open JAD” pilih opera mini jad yang tadi kamu download
- “Opera Mini” muncul di daftar, klik “Start”
Save page dan download :
- Buat shortcut untuk microemulator.jar dengan cara klik kanan -> create shortcut
- Klik kanan shortcut tersebut - Properties - timpa field targe dengan : C:\WINDOWS\system32\java.exe -cp microemulator.jar;lib/microemu-jsr-75.jar org.microemu.app.Main –impl org.microemu.cldc.file.FileSystem org.microemu.examples.fcview.FCViewMIDlet apps\mini.jad
- edit file config2.xml di C:/Documents and Settings/usernamekamu/.microemulator/config2.xml menggunakan text editor (misal notepad / notepad++ dll)
- tambahkan baris-baris berikut sebelum
- Save
- Jalankan microemulator dengan klik dua kali pada shortcut yang tadi dibuat
- Selesai, fitur save web page muncul
org.microemu.cldc.file.FileSystem
proxy untuk browsing :
Edit config2.xml di C:/Documents and Settings/usernamekamu/.microemulator/config2.xml
…
…
ganti webcache.mydomain.com dengan proxy kamu dan 8080 dengan port proxy yang kamu gunakan.
No comments:
Post a Comment