MicroEmulator & Opera Mini Mod

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:

<applet code=”org.microemu.applet.Main”
width=226 height=471 archive=”microemu-javase-applet.jar,(MIDlet application jar)”>
<param name=”midlet” value=”(MIDlet application main class)”>
</applet>

– 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:

<param name=”device” value=”({device class name} | {device.xml file location})”>

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:

<applet code=”org.microemu.applet.Main”
width=157 height=285 archive=”microemu-javase-applet.jar,nokiaui.jar,minimum.jar,simpledemo.jar”>
<param name=”midlet” value=”org.microemu.midp.examples.simpledemo.SimpleDemo”>
<param name=”device” value=”org/microemu/device/minimum/device.xml”>
</applet>

Example for SimpleDemo MIDlet and Minimum device with Mouse and color:

<applet code=”org.microemu.applet.Main”
width=157 height=285 archive=”microemu-javase-applet.jar,minimum.jar,simpledemo.jar”>
<param name=”midlet” value=”org.microemu.midp.examples.simpledemo.SimpleDemo”>
<param name=”device” value=”org/microemu/device/minimum/device-color.xml”>
</applet>

Example for SimpleDemo MIDlet and Large Skin:

<applet code=”org.microemu.applet.Main”
width=292 height=618 archive=”microemu-javase-applet.jar,large.jar,simpledemo.jar”>
<param name=”midlet” value=”org.microemu.midp.examples.simpledemo.SimpleDemo”>
<param name=”device” value=”org/microemu/device/large/device.xml”>
</applet>

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=true

To run build without tests:
mvn -Dmaven.test.skip=true

DOWNLOAD MICROEMULATOR 2.0.2

OPERA MINI MOD

konfigurasi:

  1. double-click “microemulator.jar”. atau ketik “java -jar microemulator.jar” di console (Command Prompt). (Anda harus memiliki JRE agar bisa menjalankan ini)
  2. lalu ke “Options > Select device”, klik “Add…”, terus ke “microemulator\devices” pilih “microemu-device-resizable.jar”
  3. pilih “Resizable device” lalu “Set as default”
  4. klik “Resize” dan masukan ukuran yang anda inginkan (misal sesuai ukuran monitor anda)
  5. trus “File > Open JAD” pilih opera mini jad yang tadi kamu download
  6. “Opera Mini” muncul di daftar, klik “Start”

Save page dan download :

  1. Buat shortcut untuk microemulator.jar dengan cara klik kanan -> create shortcut
  2. 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
  3. edit file config2.xml di C:/Documents and Settings/usernamekamu/.microemulator/config2.xml menggunakan text editor (misal notepad / notepad++ dll)
  4. tambahkan baris-baris berikut sebelum </config>
  5. <extensions>
    <extension>
    <className>org.microemu.cldc.file.FileSystem</ className>
    <properties>
    <property VALUE=”C:\” NAME=”fsRoot”/>
    </properties>
    </extension>
    </extensions>

  6. Save
  7. Jalankan microemulator dengan klik dua kali pada shortcut yang tadi dibuat
  8. Selesai, fitur save web page muncul

proxy untuk browsing :

Edit config2.xml di C:/Documents and Settings/usernamekamu/.microemulator/config2.xml

<config>

<system-properties>
<system-property name=”http.proxyHost” value=”webcache.mydomain.com”></system-property>
<system-property name=”http.proxyPort” value=”8080″></system-property>
<system-property name=”http.nonProxyHosts” value=”localhost”></system-property>
</system-properties>

</config>

ganti webcache.mydomain.com dengan proxy kamu dan 8080 dengan port proxy yang kamu gunakan.

ariefew.co.cc

11 Responses

  1. Gmana caranya kl mo jalanin teashark di pc? Apa sama aja? Aq punya yg jar, trus yg jad kubuat pake generator. Tp pas jalanin malah muncul operamini.

  2. @lanz
    caranya sama aja…. tinggal sesuaikan jad teashark

  3. buat yang ingin nambah wawasan, lagi boring or suntuk, lagi cari pendapatan tambahan sambil nge-net, silakan berkunjung ke blog saya di:
    http://arjip.wordpress.com

  4. @arjip,
    berkunjung….

  5. mas arief
    aku mau nanya kalo yf yang gretz uploadnya yang bisa disitus mana yah di ziddu ama 4shared loading kelamaan jadi server jauh.trims

  6. aku
    pernah nyoba pake opera mini di hp
    dia malah bisa upload tapi ukurannya terbatas
    hanya sampai 200 kb aku mau upload sekitar
    1.600 kb mgk siapa tau mencoba opera mini
    disini bisa upload lebih dari 2.5 mb
    trims

  7. @ adezt.
    yf maksudnya Your Freedom ???
    download di websitenya langsung gratis kok…

  8. saya kok ga bisa2 munculin fitur save page yah, saya udah kopi paste line itu dan mengedit file xml berkali2, tapi tidak muncul2 juga. apa setting yang lain?

  9. saya tidak berhadil memunculkan fitur save page, padahal semua langkah yg saya lakukan sama. cuma muncul DOS, lalu tertutup. apa masalahnya ya??

  10. saya jg tidak berkasil

  11. Keep up the good work, bookmarked and referred a few mates.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: