Documente Academic
Documente Profesional
Documente Cultură
Abstract—Java applets are used in e-learning, mainly for It has two important APIs (Application Programming
creating animations. Many leading educational and Interface) - The CLDC API (Connected Limited Device
professional organizations have large repositories of Configuration) and the MIDP API (Mobile Information
animations, created using Java applets which are mostly for Device Profile) [8].
desktops. Use of mobile phones is increasing especially amongst Only a subset of Core Java APIs java.lang, java.io and
students, and creating new eLearning content for mobile java.util are supported by J2ME. For example, the java.lang
phones is resource intensive. It is desirable to have a
in J2ME (CLDC 1.1 version) has 17 classes and 1 interface,
methodology to adapt existing Java animations on mobile
phones. This paper presents a methodology (APP2MID) which compared with the java.lang of Java SE (JDK 1.6 version),
converts the Java applet into Java MIDlet that can run on which has 35 classes and 8 interfaces. J2ME also possesses
mobile phones. The conversion methodology is divided in three many features which are specific and limited to J2ME itself.
logical phases and will help the user to create MIDlets from the Table 1 shows the core Java APIs supported by CLDC 1.1 [8].
available Java applets, maintaining the original programming
logic. We illustrate this methodology using a case study. TABLE I
CORE JAVA SE APIS SUPPORTED BY J2ME
I. INTRODUCTION
Package Classes
Manuscript received August 20, 2009. This work was supported in part
II. CONVERSION PROCESS: APP2MID
by the TTSL IIT Bombay Center of Excellence in Telecommunications The conversion process APP2MID has three logical phases.
(TICET) project of IIT Bombay.
These phases convert the original Java applet into various
Kapil Kadam is M. Tech. from Walchand College of Engineering,
Sangli, India and is currently working as Project Engineer at the formats, in a cascading manner to achieve the final goal of
Department of Computer Science and Engineering of IIT Bombay, India. creating a MIDlet. The Java applet is not converted directly
Phone: +91-22-25764987; fax: +91-22-25720022; e-mail: into MIDlet, as it may create problems for code extraction.
kkapilkk@gmail.com
For example, multiple uses of standard keywords like ‘if’, in
Sameer Sahasrabudhe is a graduate in Fine arts. He is currently working
as a Project Manager at the Department of Computer Science and a Java applet may get replaced by single one in Java MIDlet.
Engineering of IIT Bombay, India. Phone: +91-22-25764913; fax: +91-22- Due to the unsystematic code identification it can lead to
25720022; e-mail: s1000brains@iitb.ac.in
Authorized licensed use limited to: UNIVERSIDAD DE SANTIAGO DE CHILE. Downloaded on May 12,2010 at 16:22:45 UTC from IEEE Xplore. Restrictions apply.
compilation errors and some unidentifiable exceptions too. In order to achieve this we wrote another class “Converter”
In order to avoid such errors we designed the methodology in the “APP2MIDconverter.java” program mentioned in
in three phases, which are described below. Refer Fig. 1. Phase-II. This class “Converter” does the MIDlet XML to
Java MIDlet conversion. The output of this phase is a desired
Java MIDlet. Schematic representation of this phase is shown
Phase I Phase II Phase III Testing in Fig. 4.
Phase
Java Applet Applet XML to MIDlet XML
to Applet MIDlet XML to Java MIDlet
XML Output
Transformation MIDlet Testing
MIDlet XML
Input XML to XML
Applet XML Transformer
429
Authorized licensed use limited to: UNIVERSIDAD DE SANTIAGO DE CHILE. Downloaded on May 12,2010 at 16:22:45 UTC from IEEE Xplore. Restrictions apply.
is a Java applet program which contains the code for the of the Phase-I, which is the applet XML (Figure7). After
basic angles animation. Fig. 5 shows the output of processing through conversion phase-II we got the MIDlet
BasicAngles.java applet when executed in applet viewer and XML (Fig 8), which shows the portion of MIDlet XML. At
Fig. 6 shows the small portion of the code. the end of conversion phase-II we get the XML
representation of MIDlet.
The desired output at this phase is XML representation of
MIDlet. The transformation adds packages required for
MIDlet. For example package “javax.microedition.midlet”
represented as XML tag
<import module=“javax.microedition.midlet”>
in the MIDlet XML (Fig. 8).
A. Phase-I Results
As mentioned in the conversion phase-I the input for this
phase is Java applet program i.e. BasicAngles.java (refer
Fig. 6) which is converted into applet XML. The output of
conversion phase-I is shown in Fig. 7 which shows the small
portion of the XML applet.
As mentioned in the conversion phase-I about standard
Java class structure & XML tags, it can be seen from the Fig.
7 that the standard class structure of Java applet (refer Fig.
6) is well represented in the form of XML.
For example class “BasicAngles” with visibility attribute Fig. 8: XML MIDlet
“public” (Fig 6) is represented as a XML tag
<class name=“BasicAngles” visibility=“public”> C. Phase-III Results
in Fig 7. Other code of Java applet was also converted in the The output of phase-II i.e. MIDlet XML is the input for
form of XML tags. phase-III. The XML representation of desired MIDlet intends
to convert this into Java MIDlet. Every tag of this XML is
B. Phase-II Results
processed and converted into Java MIDlet format
As said earlier the input of the second phase is the output maintaining its standards.
430
Authorized licensed use limited to: UNIVERSIDAD DE SANTIAGO DE CHILE. Downloaded on May 12,2010 at 16:22:45 UTC from IEEE Xplore. Restrictions apply.
For example XML tag and were converted successfully. On critical review of the
<import module=“javax.microedition.midlet”> converted applets we have found the following aspects,
from Fig. 8 is converted to following Java statement of which can be addressed in the future:
MIDlet. • It is necessary to try and convert all possible Java SE
“import javax.microedition.midlet” classes used in animation.
as shown in Fig. 9. • The MIDlet created using this methodology was of the
The rest of the XML tags are also processed to generate the same screen size of the applet. This feature made it
Java MIDlet. The generated Java MIDlet is the mobile mandatory to the user to use scrolling to view the
version of the original Java applet i.e. BasicAngles.java and animation on the smaller screen size of mobile phones.
ready to be tested. The output of conversion phase-III is • The MIDlet created using this methodology will be
shown in Fig. 9 which shows the small portion of the final compatible only with the mobile handsets with API
Java MIDlet code. support of MIDP 2.0, and CLDC 1.1.
ACKNOWLEDGEMENT
We acknowledge the support of Prof. Sridhar Iyer,
(Project OSCAR, IIT Bombay) and Prof. D.B. Kulkarni
(Walchand College of Engineering, Sangli) for their
invaluable guidance. We also acknowledge the support of
the TICET Project (Department of Computer Science and
Engineering, IIT Bombay).
REFERENCES
[1] P. Thornton; Houser, “Using Mobile Phones in Education.”
Proceeding of 2nd IEEE International Workshop on Wireless and
Mobile Technologies in Education. Digital Object Identifier
10.1109/WMTE.2004.1281319, pp ii-ii.
[2] B. Shen, W. T. Ooi, G.Morabito and E. Steinbach, “Multimedia
Applications in Mobile/Wireless Context.” IEEE Transaction on
Multimedia. Volume 10, Issue 5, Aug 2008, Digital Object Identifier
10.1109/TMM.2008.921722, pages 673-674.
[3] Anders Mller, Christian Kirkegaard and Michael I. Schwartzbach,
“Static analysis of xml transformations in java.” IEEE Transactions
on Software Engineering Volume 30, Issue 3, March 2004, Digital
Object Identifier 10.1109/TSE.2004.1271173, pages 181-192.
Fig. 9: Java MIDlet [4] P. Kamthan, “Java Applets in Education” published on: Sunday, 7th
March 1999, URL1:http://tech.irt.org/articles/js151/index.htm.
URL2:http://oscar.iitb.ac.in/documents/java.pdf.
D. Testing Phase Results [5] IBM, “Xml related technologies and programming with Java”,(book).
We tested the resultant Java MIDlet on Sun’s wireless Publisher: Printice-Hall of India, ISBN: 8120325060.
[6] Kim Topley, “J2ME in Nutshell”,(book). Publisher: O’Reilly, ISBN:
toolkit emulator, which is mainly used to test J2ME 059600253x.
applications. The MIDlet worked without any errors. The [7] Hari Menon, “Portability Analysis in Mobile Gaming using J2ME.”
results are shown in Fig. 10. Morgantown, West Virginia, 20006.
[8] Sun Microsystems, Inc. “J2me building blocks for mobile
devices,white paper on kvm and the connected, limited device
configuration (CLDC).” May 19 2000.
URL: http://java.sun.com/products/cldc/wp/KVMwp.pdf.
[9] Harsh Jain, “Java to Xml, URL:https://java2xml.dev.java.net
[10] Sudipto Chanda, “Creating apps for mobiles”, PCQUEST, Jan 1,
2009, URL: http://java. sun.com/javame/technology.
[11] Project OSCAR, IIT Bombay, India, URL: http://oscar.iitb.ac.in/.
[12] Nokia N72, URL:http://www.nokia.co.in/find-
products/products/nokia-n72/technical-specifications
[13] Sony Ericsson W580i,
URL:http://www.gsmarena.com/sony_ericsson_w580-1928.php.
IV. CONCLUSION
The outputs of the case study of the Basic Angles
animation applet, confirms the success of the conversion
methodology: APP2MID. Some more applets were also tried
431
Authorized licensed use limited to: UNIVERSIDAD DE SANTIAGO DE CHILE. Downloaded on May 12,2010 at 16:22:45 UTC from IEEE Xplore. Restrictions apply.