You are here

Write J2ME Application by using Javascript?

Do you have interest on developing J2ME application? But you have only some basic javascript and XML knowledge, How? Mojax could help you to develop J2ME applicaiton with javascript and XML, without any Java language.

mojax is one of the worlds first Mobile AJAX Application Frameworks.
Unlike traditional AJAX Web Frameworks, mojax Moblets do not run within
a browser and are not subject to the availability and quality of a
network connection. Also, unlike a web application running on a mobile
device, a mojax moblet has access to lower level device features such
as Camera API, Push Messaging, Bluetooth, Location Services, Contacts
and more.

With mojax's help you can very easily develop one J2ME application which has functions of Google map client, Flickr client, yahoo weather or stock client, only in few lines of code.

mojax sample

Here is Hello World example of mojax:

<moblet default="main" name="HelloWorld">
<screen id="main">
Hello World!

Only 7 lines code in XML format, comparing with the J2ME Hello World codes, which one do you like?

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class Hello extends MIDlet
private Display display;
public Hello()
display = Display.getDisplay(this);

public void startApp()
Form f = new Form("main");
f.append("Hello World!");

public void pauseApp()

public void destroyApp(boolean unconditional)

No need care of low level api, mojax will finish everything. Like J2ME Polish, mojax also use CSS style to define the GUI, textbox, layout, image box, hyperlink......
Here is one CSS example:

<moblet default="main">
<screen id="main" layout="vertical">
<box layout="vertical" style="border: 1px solid #FF0000" valign="center" halign="center">
<textbox style="border: 1px solid #00ff00">vertical</textbox>
<textbox style="border: 1px solid #0000ff">text</textbox>
</moblet> style of mojax in css

Interesting? All the actions in mojax such as menu, click, choose were performed by Javascript.

<screen id="main" layout="vertical" valign="center" halign="center">
<textbox focusable="true" onClick="show(info, 1)" width="100%">
Show info as Layer
<textbox focusable="true" onClick="show(info)" width="100%">
Show info as Screen

javascript in mojax

This method is a little bit like Rubby, I think mojax open one door for the beginner of J2ME , if you have the tough experience of learning J2ME. mojax is not Mobile AJAX
clarifies that mojax is not really supporting AJAX, even though it's
quite similar in concept. The reason it that it doesn't support an HTML
browser with DOM editing. If you are fear of the difficulty of J2ME Polish API, maybe mojax is one good choice for you.


I cant register i dont see register link only login. Can you register me pleas!!