Optimizations in the Cibyl Binary Translator for J2ME Devices

Total Page:16

File Type:pdf, Size:1020Kb

Optimizations in the Cibyl Binary Translator for J2ME Devices Optimizations in the Cibyl binary translator for J2ME devices Simon Kagstr˚ om¨ ,Hakan˚ Grahn, and Lars Lundberg Department of Systems and Software Engineering, School of Engineering, Blekinge Institute of Technology Ronneby, Sweden {ska, hgr, llu}@bth.se Abstract ing Cibyl, our goals have been to produce compact trans- lated code with performance close to native Java code for The Java J2ME platform is one of the largest software plat- common cases. Compared to implementing a Java byte- forms available, and often the only available development code backend for a C/C++ compiler, the binary translation platform for mobile phones, which is a problem when port- approach can require less engineering, since Java bytecode ing C or C++ applications. The Cibyl binary translator (which is type-safe and modeled for the characteristics of targets this problem, translating MIPS binaries into Java high-level Java code) might not be a good match for the bytecode to run on J2ME devices. This paper presents compiler structure. The general design of Cibyl has been the optimization framework used by Cibyl to provide com- described in an earlier paper [8], and this paper focuses on pact and well-performing translated code. Cibyl optimizes optimizations made to reduce the size and improve the per- expensive multiplications/divisions, floating point support, formance of the translated binaries. function co-location to Java methods and provides a peep- hole optimizer. The paper also evaluates Cibyl perfor- The optimizations we employ for Cibyl share some sim- mance both in a real-world GPS navigation application ilarities with regular compiler optimizations, e.g., use of where the optimizations increase display update frequency function inlining and constant propagation, but is also sig- with around 15% and a comparison against native Java nificantly different. Since the GCC compiler has already and the NestedVM binary translator where we show that optimized the high-level C code, the goal of the Cibyl bi- Cibyl can provide significant advantages for common code nary translator is to make the translation into Java bytecode patterns. as efficient as possible. Because of this, the binary transla- tion optimizations we apply are mostly local in scope, act- ing on a small set of adjacent instructions or the opposite 1. Introduction act on large entities such as entire functions. The main contributions of this paper are the following. A large majority of the mobile phones sold today We first describe the set of optimizations we make and how come with support for the Java 2 Platform, Micro Edition these improve size and performance. We then perform a (J2ME) [17], and the installation base can be measured in benchmark on an application ported with Cibyl to illustrate billions of units [14]. Mobile phones are also quickly be- the optimizations in a real-world setting. Finally, we com- coming more and more powerful, having processing speed pare Cibyl against native Java and another binary translator, and memory comparable to desktop computers of a few NestedVM [1] in a micro benchmark (an implementation years ago. J2ME is a royalty-free Java development envi- of the A* algorithm) to study performance characteristics ronment for mobile phones, and is often the only available in detail. The performance results show that Cibyl is sig- method of extending the software installed on the phone. nificantly faster than NestedVM and close to native Java This poses a severe problem when porting C or C++ appli- performance on the cases we target. cations to J2ME devices, which can often require a com- plete rewrite in Java of the software, possibly assisted by The rest of the paper is structured as follows. In Sec- automated tools [3, 6, 10, 11]. tion 2 we introduce the Cibyl binary translator. The main Cibyl is a binary translator which targets this problem. part of the paper then follows in Section 3 where we de- Cibyl translates MIPS binaries compiled with GCC into scribe the optimizations performed by Cibyl and Section 4 Java bytecode, and provides means to integrate with na- where we evaluate our optimizations. Section 5 describes tive J2ME classes. Cibyl therefore allows C and C++ pro- related work and finally we conclude and present future di- grams to be ported to run on J2ME phones. When design- rections in Section 6. Java/J2ME Generate syscall Syscalls.java API wrappers CRunTime.java Java Compiler etc C source C compiler / Compiled MIPS to java Jasmin Java preverifier, Midlet.jar code linker program binary translator assembler archiver Figure 1. Translation process in Cibyl. Gray boxes show unmodified third-party tools. 2. Cibyl if the program causes an exception, the call chain emit- ted by the JVM will be human readable. The 1-1 map- Cibyl uses the GCC [16] compiler to produce a ping also enables some optimizations, which will be dis- MIPS I [7] binary, which is thereafter translated into Java cussed later. We handle register-indirect function calls spe- bytecode by the Cibyl tools. Figure 1 shows the translation cially since Java bytecode does not support function point- process with Cibyl, where we use a set of tools to translate ers. To support function pointers, we generate a special the MIPS binary. Apart from the binary translator, which “call table” method that switches on the function address outputs Java bytecode assembly to Jasmin [12], we also and calls the corresponding method indirectly. Indirect have a stub code generator to produce stubs for calls into jumps, generated by GCC for example in some switch native Java code. When translating, Cibyl uses Java local statements, are handled similarly through a “jump table” variables to represent MIPS registers, which contributes to in the method which switches on possible jump destina- producing efficient and compact code compared to using tions in the method (which can be found through the ELF class member variables or static class variables. The MIPS relocation information). instruction set is well suited for binary translation, and most arithmetic instructions can be directly translated to a se- Compared to the integer instruction set, the MIPS float- quence of loading source registers (local variables) on the ing point instruction set is more difficult to translate [8]. Java operand stack, performing the operation and storing Floating point is therefore supported by a hybrid approach into the destination register. where we use the GCC soft-float support, but implement We use a Java integer array to represent memory as seen the runtime support functions using native Java floats. GCC by the MIPS binary. This means that 32-bit memory ac- generates calls to functions such as addsf3 for a float- cesses are performed efficiently by simply indexing the ing point add, passing an integer representation of the memory array with the address divided by four, but also source registers, and our hybrid approach implements this that 8- and 16-bit accesses need an extra step of masking through a Java method that converts the integer representa- and shifting the value in memory to get the correct result. tion to real floats, performs the add and returns the integer- Since a common pattern is to use the same base register representation of the result. This solution provides a trade- repeatedly with different offsets, we pre-calculate the ar- off between implementation complexity and performance, ray index and use special memory access registers for these with a very simple implementation but less performance cases. To reduce space, we also perform the more expen- than an implementation of the MIPS FPU instruction set. sive 8- and 16-bit accesses through functions in the runtime support instead of generating bytecode directly. Similarly, expensive arithmetic operations such as unsigned multipli- cations are also implemented in the runtime layer. Since 3. Optimizations 32-bit access is easiest to support efficiently, Cibyl focuses on performance for this case. Cibyl uses a 1-1 mapping between C functions and We perform a number of optimizations in Cibyl apart generated Java methods, which brings a number of ben- from the general code generation optimizations described efits. First, this mapping enables the J2ME profiler to above to improve performance and reduce the size of the produce meaningful output for Cibyl programs. Second, generated Java class files. 3.1. 32-bit multiplications/divisions ity through emitting bytecode instructions directly, replac- ing the function call. The MIPS instruction for multiplication always produce This allows us to reduce the overhead of floating point a 64-bit result, split in the hi/lo register pair. We trans- operations significantly, at the cost of a slightly larger trans- late this to Java bytecode by casting the source registers to lated file. With this approach, we output Java bytecode for 64-bit longs, perform the multiplication, split the resulting floating point operations directly to inline the GCC helper value and place it in hi/lo. As expected, this generates functions for soft floats. We use this functionality for other many instructions in Java bytecode, and is also fairly in- purposes as well, e.g., to throw and catch Java exceptions efficient and we perform it in the runtime support to save from C code. space. Often, however, only the low 32 bits of the value is ac- 3.4. Function co-location tually used and in these cases we perform a 32-bit multipli- cation which can be done natively in Java bytecode. This is One large source of overhead is method calls, i.e., trans- safe since the lo/hi registers are not communicated across lated C function calls. Since Cibyl uses local variables for functions in the MIPS ABI, so if the hi register is unused the register representation, it needs to pass up to 7 argu- we simply skip producing it.
Recommended publications
  • Incubating the Next Generation of Offshore Outsourcing Entrepreneurs
    Mobile Phone Programming Introduction Dr. Christelle Scharff Pace University, USA http://atlantis.seidenberg.pace.edu/wiki/mobile2008 Objectives Getting an overall view of the mobile phone market, its possibilities and weaknesses Providing an overview of the J2ME architecture and define the buzzwords that accompanies it Why mobile phones? Nowadays mobile phones outnumber desktop computers for Internet connections in the developer world A convenient and simpler alternative to the desktop/laptop for all (developed and developing countries) Mobile phones are computers! Some numbers and important facts: • Target of 10 million iphones sales by the end of 2008 (just one year after being launched) • Google phone to be launched in 2008 • 70% of the world’s mobile subscriptions are in developing countries, NY Times April 13, 2008 Global Handset Sales by Device Type http://linuxdevices.com/files/misc/StrategyAnalytics- mobilephone-segments.jpg Devices A wide variety of devices by the main vendors: • E.g, Nokia, Motoral, Sony Ericson A wide variety of operating systems • E.g., Blackberry, Palm OS, Windows CE/Mobile, Symbian, motomagx, linux A wide variety of development environments • E.g., Java ME, Qualcomm’s BREW, Google’ Android, Google App Engine (GAE) for mobile web applications, JavaFX Programming languages: • Java, Python, Flast-lith, Objective C Operating Systems http://mobiledevices.kom.aau.dk Mobile Web Access to wireless data services using a mobile device cHTML (Compact HTML) is a subset of HTML that excludes JPEG images,
    [Show full text]
  • Development of Mobile Phone Game Based on Java ME
    Yang Liu Development of Mobile Phone Game Based on Java ME Bachelor’s Thesis Information Technology May 2011 DESCRIPTION Date of the bachelor's thesis th 15 May, 2011 Author(s) Degree programme and option Yang Liu Information Technology Name of the bachelor's thesis Development of Mobile Phone Game Based on Java ME Abstract Recently, mobile phones have become more and more widespread in more than one aspect. Meanwhile, a large number of advanced features have also been applied into mobile devices. As we know, mobile phone game is one of them. In this final thesis, I develop a Chinese Chess game. Chinese Chess, also called Xiang Qi, is one of the most popular and oldest board games worldwide, which is more or less similar to Western Chess related to the appearance and regulations. In order to spread China culture and make individuals realize how fun and easy this game is, I introduce this Chinese Chess game as the topic in terms of my final thesis. In this final thesis, I use API (JSR 118) to build a user interface so as to set the board and pieces in the first place. Thereafter, some relevant basic rules are drawn up through logical control. This project is designated to be run on Java ME platform and Java SDK simulation software. Subject headings, (keywords) Java ME, JDK, Java SDK, MIDP, CLDC, API, Chinese Chess Pages Language URN 63 p.+app.28 English Remarks, notes on appendices Tutor Employer of the bachelor's thesis Matti Koivisto Mikkeli University of Applied Sciences ACKNOWLEDGEMENT In the first place, I would like to represent my greatest appreciation to my supervisor Mr.
    [Show full text]
  • JAVA User's Guide Siemens Cellular Engine
    s JAVA User's Guide Siemens Cellular Engine Version: 08 DocID: TC65_AC75_JAVA User's Guide_V08 Supported products: TC65, TC65 Terminal, AC75 JAVA™ Users Guide JAVA User's Guide s Confidential / Released Document Name: JAVA User's Guide Supported products: TC65, TC65 Terminal, AC75 Version: 08 Date: June 12, 2006 DocId: TC65_AC75_JAVA User's Guide_V08 Status: Confidential / Released General Notes Product is deemed accepted by recipient and is provided without interface to recipient’s products. The documentation and/or product are provided for testing, evaluation, integration and information purposes. The documentation and/or product are provided on an “as is” basis only and may contain deficiencies or inadequacies. The documentation and/or product are provided without warranty of any kind, express or implied. To the maximum extent permitted by applicable law, Siemens further disclaims all warranties, including without limitation any implied warranties of merchantability, completeness, fitness for a particular purpose and non-infringement of third-party rights. The entire risk arising out of the use or performance of the product and documentation remains with recipient. This product is not intended for use in life support appliances, devices or systems where a malfunction of the product can reasonably be expected to result in personal injury. Applications incorporating the described product must be designed to be in accordance with the technical specifications provided in these guidelines. Failure to comply with any of the required procedures can result in malfunctions or serious discrepancies in results. Furthermore, all safety instructions regarding the use of mobile technical systems, including GSM products, which also apply to cellular phones must be followed.
    [Show full text]
  • Java in Embedded Linux Systems
    Java in Embedded Linux Systems Java in Embedded Linux Systems Thomas Petazzoni / Michael Opdenacker Free Electrons http://free-electrons.com/ Created with OpenOffice.org 2.x Java in Embedded Linux Systems © Copyright 2004-2007, Free Electrons, Creative Commons Attribution-ShareAlike 2.5 license http://free-electrons.com Sep 15, 2009 1 Rights to copy Attribution ± ShareAlike 2.5 © Copyright 2004-2008 You are free Free Electrons to copy, distribute, display, and perform the work [email protected] to make derivative works to make commercial use of the work Document sources, updates and translations: Under the following conditions http://free-electrons.com/articles/java Attribution. You must give the original author credit. Corrections, suggestions, contributions and Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under a license translations are welcome! identical to this one. For any reuse or distribution, you must make clear to others the license terms of this work. Any of these conditions can be waived if you get permission from the copyright holder. Your fair use and other rights are in no way affected by the above. License text: http://creativecommons.org/licenses/by-sa/2.5/legalcode Java in Embedded Linux Systems © Copyright 2004-2007, Free Electrons, Creative Commons Attribution-ShareAlike 2.5 license http://free-electrons.com Sep 15, 2009 2 Best viewed with... This document is best viewed with a recent PDF reader or with OpenOffice.org itself! Take advantage of internal
    [Show full text]
  • Web Services Edge East Conference & Expo Featuring FREE Tutorials, Training Sessions, Case Studies and Exposition
    JAVA & LINUX FOCUS ISSUE TM Java COM Conference: January 21-24, 2003 Expo: January 22-24, 2003 www.linuxworldexpo.com The Javits Center New York, NY see details on page 55 From the Editor Alan Williamson pg. 5 Java & Linux A Marriage Made in Heaven pg. 6 TCO for Linux Linux Fundamentals: Tools of the Trade Mike McCallister ...and J2EE Projects pg. 8 Programming Java in Linux – a basic tour $40010 60 Linux Vendors Life Is About Choices pg. 26 Feature: Managing HttpSession Objects2003 SAVEBrian A. Russell 8 PAGE CONFERENCE Create a well-designed session for a better Web appEAST INSERT PAGE18 63 Career Opportunities Bill Baloglu & Billy Palmieri DGE pg. 72 Integration: PackagingE Java Applications Ian McFarland for OS X Have great looking double-clickable applications 28 Java News ERVICES pg. 60 S EB Specifications: JCP Expert Group Jim Van Peursem JDJ-IN ExcerptsW Experiences – JSR-118 An inside look at the process 42 SPECIALpg. 61 INTERNATIONAL WEB SERVICES CONFERENCE & EXPO Letters to the Editor Feature: The New PDA Profile Jim Keogh OFFER!pg. 62 The right tool for J2ME developers 46 RETAILERS PLEASE DISPLAY UNTIL MARCH 31, 2003 Product Review: exe4j Jan Boesenberg by ej-technologies – a solid piece of software 56 Interview: JDJ Asks ...Sun on Java An exclusive chance to find out what’s going on at Sun 58 SYS -CON Blair Wyman MEDIA Cubist Threads: ‘(Frozen)’ A snow-packed Wyoming highway adventure 74 Everybody’s focused on exposing applications as Web services while letting someone else figure out how to connect them. We’re that someone else.
    [Show full text]
  • Oracle® Java ME Embedded Getting Started Guide for the Windows Platform Release 3.3 E35132-02
    Oracle® Java ME Embedded Getting Started Guide for the Windows Platform Release 3.3 E35132-02 June 2013 This book describes how to use Oracle Java ME SDK to develop embedded applications, using both the NetBeans and Eclipse Integrated Development Environments, on a Windows XP or Windows 7 platform. Oracle Java ME Embedded Getting Started Guide for the Windows Platform, Release 3.3 E35132-02 Copyright © 2012, 2013, Oracle and/or its affiliates. All rights reserved. This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations.
    [Show full text]
  • J2ME: the Complete Reference
    Color profile: Generic CMYK printer profile Composite Default screen Complete Reference / J2ME: TCR / Keogh / 222710-9 Blind Folio i J2ME: The Complete Reference James Keogh McGraw-Hill/Osborne New York Chicago San Francisco Lisbon London Madrid Mexico City Milan New Delhi San Juan Seoul Singapore Sydney Toronto P:\010Comp\CompRef8\710-9\fm.vp Friday, February 07, 2003 1:49:46 PM Color profile: Generic CMYK printer profile Composite Default screen Complete Reference / J2ME: TCR / Keogh / 222710-9 / Front Matter Blind Folio FM:ii McGraw-Hill/Osborne 2600 Tenth Street Berkeley, California 94710 U.S.A. To arrange bulk purchase discounts for sales promotions, premiums, or fund-raisers, please contact McGraw-Hill/Osborne at the above address. For information on translations or book distributors outside the U.S.A., please see the International Contact Information page immediately following the index of this book. J2ME: The Complete Reference Copyright © 2003 by The McGraw-Hill Companies. All rights reserved. Printed in the United States of America. Except as permitted under the Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of publisher, with the exception that the program listings may be entered, stored, and executed in a computer system, but they may not be reproduced for publication. 1234567890 CUS CUS 019876543 ISBN 0-07-222710-9 Publisher Copy Editor Brandon A. Nordin Judith Brown Vice President & Associate Publisher Proofreader Scott Rogers Claire Splan Editorial Director Indexer Wendy Rinaldi Jack Lewis Project Editor Computer Designers Mark Karmendy Apollo Publishing Services, Lucie Ericksen, Tara A.
    [Show full text]
  • Effective Inline-Threaded Interpretation of Java Bytecode
    Effective Inline-Threaded Interpretation of Java Bytecode Using Preparation Sequences Etienne Gagnon1 and Laurie Hendren2 1 Sable Research Group Universit´eduQu´ebec `a Montr´eal, [email protected] 2 McGill University Montreal, Canada, [email protected] Abstract. Inline-threaded interpretation is a recent technique that im- proves performance by eliminating dispatch overhead within basic blocks for interpreters written in C [11]. The dynamic class loading, lazy class initialization, and multi-threading features of Java reduce the effective- ness of a straight-forward implementation of this technique within Java interpreters. In this paper, we introduce preparation sequences, a new technique that solves the particular challenge of effectively inline-threa- ding Java. We have implemented our technique in the SableVM Java virtual machine, and our experimental results show that using our tech- nique, inline-threaded interpretation of Java, on a set of benchmarks, achieves a speedup ranging from 1.20 to 2.41 over switch-based inter- pretation, and a speedup ranging from 1.15 to 2.14 over direct-threaded interpretation. 1 Introduction One of the main advantages of interpreters written in high-level languages is their simplicity and portability, when compared to static and dynamic compiler-based systems. One of their main drawbacks is poor performance, due to a high cost for dispatching interpreted instructions. In [11], Piumarta and Riccardi introduced a technique called inlined-threading which reduces this overhead by dynamically inlining instruction sequences within basic blocks, leaving a single instruction dispatch at the end of each sequence. To our knowledge, inlined-threading has not been applied to Java interpreters before.
    [Show full text]
  • Android Cours 1 : Introduction `Aandroid / Android Studio
    Android Cours 1 : Introduction `aAndroid / Android Studio Damien MASSON [email protected] http://www.esiee.fr/~massond 21 f´evrier2017 R´ef´erences https://developer.android.com (Incontournable !) https://openclassrooms.com/courses/ creez-des-applications-pour-android/ Un tutoriel en fran¸caisassez complet et plut^ot`ajour... 2/52 Qu'est-ce qu'Android ? PME am´ericaine,Android Incorporated, cr´e´eeen 2003, rachet´eepar Google en 2005 OS lanc´een 2007 En 2015, Android est le syst`emed'exploitation mobile le plus utilis´edans le monde (>80%) 3/52 Qu'est-ce qu'Android ? Cinq couches distinctes : 1 le noyau Linux avec les pilotes ; 2 des biblioth`equeslogicielles telles que WebKit/Blink, OpenGL ES, SQLite ou FreeType ; 3 un environnement d'ex´ecutionet des biblioth`equespermettant d'ex´ecuterdes programmes pr´evuspour la plate-forme Java ; 4 un framework { kit de d´eveloppement d'applications ; 4/52 Android et la plateforme Java Jusqu'`asa version 4.4, Android comporte une machine virtuelle nomm´eeDalvik Le bytecode de Dalvik est diff´erentde celui de la machine virtuelle Java de Oracle (JVM) le processus de construction d'une application est diff´erent Code Java (.java) ! bytecode Java (.class/.jar) ! bytecode Dalvik (.dex) ! interpr´et´e L'ensemble de la biblioth`equestandard d'Android ressemble `a J2SE (Java Standard Edition) de la plateforme Java. La principale diff´erenceest que les biblioth`equesd'interface graphique AWT et Swing sont remplac´eespar des biblioth`equesd'Android. 5/52 Android Runtime (ART) A` partir de la version 5.0 (2014), l'environnement d'ex´ecution ART (Android RunTime) remplace la machine virtuelle Dalvik.
    [Show full text]
  • OPEN SOURCE VERSUS the JAVA Platformpg. 6
    OPEN SOURCE VERSUS THE JAVA PLATFORM pg. 6 www.JavaDevelopersJournal.com Web Services Edge West 2003 Sept. 30–Oct. 2, 2003 Santa Clara, CA details on pg. 66 From the Editor Best Laid Plans... Alan Williamson pg. 5 Viewpoint In Medias Res Bill Roth pg. 6 Q&A: JDJ Asks... IBM-Rational J2EE Insight Interview with Grady Booch 10 We Need More Innovation Joseph Ottinger pg. 8 Feature: JSP 2.0 Technology Mark Roth J2SE Insight The community delivers a higher performing language 16 Sleeping Tigers Jason Bell pg. 28 Graphical API: Trimming the Fat from Swing Marcus S. Zarra Simple steps to improve the performance of Swing 30 J2ME Insight The MIDlet Marketplace Glen Cordrey pg. 46 Feature: Xlet: A Different Kind of Applet Xiaozhong Wang The life cycle of an Xlet 48 Industry News for J2ME pg. 68 Network Connectivity: java.net.NetworkInterface Duane Morin Letters to the Editor A road warrior’s friend – detecting network connections 58 pg. 70 RETAILERS PLEASE DISPLAY Labs: ExtenXLS Java/XLS Toolkit Peter Curran UNTIL SEPTEMBER 30, 2003 by Extentech Inc. – a pure Java API for Excel integration 62 JSR Watch: From Within the Java Community Onno Kluyt Process Program More mobility, less complexity 72 From the Inside: The Lights Are On, SYS -CON MEDIA but No One’s Home Flipping bits 74 WE’VE ELIMINATED THE NEED FOR MONOLITHIC BROKERS. THE NEED FOR CENTRALIZED PROCESS HUBS. THE NEED FOR PROPRIETARY TOOL SETS. Introducing the integration technology YOU WANT. Introducing the Sonic Business Integration Suite. Built on the Business Integration Suite world’s first enterprise service bus (ESB), a standards-based infrastructure that reliably and cost-effectively connects appli- cations and orchestrates business processes across the extended enterprise.
    [Show full text]
  • A Generic DRM Framework for J2ME Applications
    A Generic DRM Framework for J2ME Applications Nuno Santos, Pedro Pereira, Luís Moura e Silva WIT-Software Rua Pedro Nunes, IPN, 3030-Coimbra, Portugal Email: [email protected] Abstract Recently, a new generation of mobile phones with support for Java has been taking widespread acceptance by the market, creating a business potential for downloadable Java Games and enterprise applications. However, it is relatively easy to forward Java programs between two Java phones. This opens the door for illegal peer-to-peer forwarding, with the consequent loss of revenues for content providers and operators. Therefore, DRM solutions are essential in order to protect copyrighted Java applications. In this paper we present a generic DRM framework that supports different solutions for protecting the copyright of Java applications. This framework is mainly targeted to Mobile Operators, it is totally transparent to content providers and does not require any special support at the user’s handsetss. It also allows the development of new custom built DRM solutions, providing a flexible platform for Java oriented DRM techniques. Keywords: Java J2ME; DRM; copyright-protection; code instrumentation. 1. Introduction The first generation of Java [1] enabled phones were very limited in terms of functionality. They were only able of downloading MIDlet1 applications from the network and of executing them. They offered no simple way to copy a Java application to another terminal or PC. These limitations were a natural Digital Rights Management (DRM) [2] solution, since the only way to obtain a Java application was by downloading it from the network. However, the most recent mobile phones are much more feature-rich.
    [Show full text]
  • Series 60 MIDP SDK 2.1 for Symbian OS 60
    PLATFORM Series 60 MIDP SDK 2.1 for Symbian OS 60 Getting Started Guide Version 1.0 May 26, 2004 SERIES Series 60 MIDP SDK Getting Started Guide | 2 Legal Notice Copyright © 2004 Nokia Corporation. All rights reserved. Nokia and Nokia Connecting People are registered trademarks of Nokia Corporation. Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. Other product and company names mentioned herein may be trademarks or trade names of their respective owners. Disclaimer The information in this document is provided “as is,” with no warranties whatsoever, including any warranty of merchantability, fitness for any particular purpose, or any warranty otherwise arising out of any proposal, specification, or sample. Furthermore, information provided in this document is preliminary, and may be changed substantially prior to final release. This document is provided for informational purposes only. Nokia Corporation disclaims all liability, including liability for infringement of any proprietary rights, relating to implementation of information presented in this document. Nokia Corporation does not warrant or represent that such use will not infringe such rights. Nokia Corporation retains the right to make changes to this specification at any time, without notice. License A license is hereby granted to download and print a copy of this specification for personal use only. No other license to any other intellectual property rights is granted herein. Version 1.0 | May 26, 2004 Series 60 MIDP SDK Getting
    [Show full text]