Javafx in Action

Total Page:16

File Type:pdf, Size:1020Kb

Javafx in Action Covers JavaFX v1.2 IN ACTION Simon Morris MANNING JavaFX in Action JavaFX in Action SIMON MORRIS MANNING Greenwich (74° w. long.) For online information and ordering of this and other Manning books, please visit www.manning.com. The publisher offers discounts on this book when ordered in quantity. For more information, please contact Special Sales Department Manning Publications Co. Sound View Court 3B Greenwich, CT 06830 email: [email protected] ©2010 by Manning Publications Co. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps. Recognizing the importance of preserving what has been written, it is Manning’s policy to have the books we publish printed on acid-free paper, and we exert our best efforts to that end. Recognizing also our responsibility to conserve the resources of our planet, Manning books are printed on paper that is at least 15% recycled and processed without the use of elemental chlorine. Development Editor: Tom Cirtin Manning Publications Co. Copyeditor: Linda Recktenwald Sound View Court 3B Proofreader: Elizabeth Martin Greenwich, CT 06830 Typesetter: Gordan Salinovic Cover designer: Leslie Haimes ISBN 978-1-933988-99-3 Printed in the United States of America 1 2 3 4 5 6 7 8 9 10 – MAL – 14 13 12 11 10 09 To my father, the coolest folk singer this side of the Mersey. (Be honest, Dad, if you’d known how obsessed I was going to get, would you have agreed to buy my first computer?) contents preface xiii acknowledgments xv about this book xvii about the title xxi about the cover illustration xxii Welcome to the future: introducing JavaFX 1 1 1.1 Introducing JavaFX 2 Why do we need JavaFX Script? The power of a DSL 2 ■ Back to the future: the rise of the cloud 4 ■ Form follows function: the fall and rebirth of desktop Java 6 1.2 Minimum effort, maximum impact: a quick shot of JavaFX 8 1.3 Comparing Java and JavaFX Script: “Hello JavaFX!” 10 1.4 Comparing JavaFX with Adobe AIR, GWT, and Silverlight 11 Adobe AIR and Flex 11 ■ Google Web Toolkit 11 ■ Microsoft Silverlight 12 ■ And by comparison, JavaFX 12 1.5 But why should I buy this book? 12 1.6 Summary 13 vii viii CONTENTS JavaFX Script data and variables 15 2 2.1 Annotating code with comments 16 2.2 Data types 17 Static, not dynamic, types 17 ■ Value type declaration 17 Initialize-only and reassignable variables (var, def) 20 Arithmetic on value types (+, -, etc.) 21 ■ Logic operators (and, or, not, <, >, =, >=, <=, !=) 22 ■ Translating and checking types (as, instanceof) 23 2.3 Working with text, via strings 24 String literals and embedded expressions 24 ■ String formatting 25 ■ String localization 26 2.4 Durations, using time literals 28 2.5 Sequences: not quite arrays 29 Basic sequence declaration and access (sizeof) 29 ■ Sequence creation using ranges ([..], step) 30 ■ Sequence creation using slices ( [..<] ) 31 ■ Sequence creation using a predicate 32 Sequence manipulation (insert, delete, reverse) 32 ■ Sequences, behind the scenes 34 2.6 Autoupdating related data, with binds 34 Binding to variables (bind) 35 ■ Binding to bound variables 36 Binding to a sequence element 36 ■ Binding to an entire sequence (for) 37 ■ Binding to code 37 ■ Bidirectional binds (with inverse) 38 ■ The mechanics behind bindings 39 ■ Bound functions (bound) 40 ■ Bound object literals 42 2.7 Working nicely with Java 43 Avoiding naming conflicts, with quoted identifiers 43 ■ Handling Java native arrays (nativearray of) 44 2.8 Summary 45 JavaFX Script code and structure 46 3 3.1 Imposing order and control with packages (package, import) 47 3.2 Developing classes 48 Scripts 48 ■ Class definition (class, def, var, function, this) 49 Object declaration (init, postinit, isInitialized(), new) 52 ■ Object declaration and sequences 54 ■ Class inheritance (abstract, extends, override) 55 ■ Mixin inheritance (mixin) 58 Function types 61 ■ Anonymous functions 62 ■ Access modifiers (package, protected, public, public-read, public-init) 64 CONTENTS ix 3.3 Flow control, using conditions 67 Basic conditions (if, else) 67 ■ Conditions as expressions 68 Ternary expressions and beyond 69 3.4 Sequence-based loops 70 Basic sequence loops (for) 70 ■ For loops as expressions (indexof) 71 ■ Rolling nested loops into one expression 71 Controlling flow within for loops (break, continue) 72 ■ Filtering for expressions (where) 73 3.5 Repeating code with while loops (while, break, continue) 73 3.6 Acting on variable and sequence changes, using triggers 74 Single-value triggers (on replace) 74 ■ Sequence triggers (on replace [..]) 75 3.7 Trapping problems using exceptions (try, catch, any, finally) 76 3.8 Summary 78 Swing by numbers 79 4 4.1 Swing time: Puzzle, version 1 82 Our initial puzzle data class 82 ■ Our initial GUI class 83 Building the buttons 85 ■ Model/View/Controller, JavaFX Script style 87 ■ Running version 1 88 4.2 Better informed and better looking: Puzzle, version 2 88 Making the puzzle class clever, using triggers and function types 88 ■ Group checking up close: function types 90 ■ Firing the update: triggers 92 ■ Better-looking GUI: playing with the underlying Swing component 92 ■ Running version 2 94 4.3 Game on: Puzzle, version 3 95 Adding stats to the puzzle class 96 ■ Finishing off the puzzle grid GUI 98 ■ Adding a status line to our GUI with a label 101 ■ Running version 3 102 4.4 Other Swing components 103 4.5 Bonus: using bind to validate forms 103 4.6 Summary 105 Behind the scene graph 106 5 5.1 What is a scene graph? 107 Nodes: the building blocks of the scene graph 108 ■ Groups: graph manipulation made easy 108 x CONTENTS 5.2 Getting animated: LightShow, version 1 109 Raindrop animations 109 ■ The RainDrop class: creating graphics from geometric shapes 110 ■ Timelines and animation (Timeline, KeyFrame) 112 ■ Interpolating variables across a timeline (at, tween, =>) 113 ■ How the RainDrop class works 115 ■ The LightShow class, version 1: a stage for our scene graph 115 ■ Running version 1 118 5.3 Total transformation: LightShow, version 2 118 The swirling lines animation 118 ■ The SwirlingLines class: rectangles, rotations, and transformations 119 ■ Manipulating node rendering with transformations 121 ■ The LightShow class, version 2: color animations 124 ■ Running version 2 127 5.4 Lost in translation? Positioning nodes in the scene graph 128 5.5 Bonus: creating hypertext-style links 129 5.6 Summary 130 Moving pictures 132 6 6.1 Taking control: Video Player, version 1 134 The Util class: creating image nodes 134 ■ The Button class: scene graph images and user input 135 ■ The GridBox class: lay out your nodes 140 ■ The Player class, version 1 142 ■ Running version 1 144 6.2 Making the list: Video Player, version 2 145 The List class: a complex multipart custom node 146 ■ The ListPane class: scrolling and clipping a scene graph 149 ■ Using media in JavaFX 152 ■ The Player class, version 2: video and linear gradients 154 ■ Creating varying color fills with LinearGradient 159 ■ Running version 2 161 6.3 Bonus: taking control of fonts 161 6.4 Summary 163 Controls, charts, and storage 165 7 7.1 Comments welcome: Feedback, version 1 166 The Record class: a bound model for our UI 167 ■ The Feedback class: controls and panel containers 168 ■ Running version 1 175 7.2 Chart topping: Feedback, version 2 175 Cross-platform persistent storage 176 ■ How Storage manages its files 179 ■ Adding pie and bar charts 180 ■ Taking control of chart axes 187 ■ Other chart controls (area, bubble, line, and scatter) 188 ■ Running version 2 190 CONTENTS xi 7.3 Bonus: creating a styled UI control in JavaFX 190 What is a stylesheet? 191 ■ Creating a control: the Progress class 192 ■ Creating a skin: the ProgressSkin class 193 Using our styled control with a CSS document 196 ■ Further CSS details 199 7.4 Summary 200 Web services with style 202 8 8.1 Our project: a Flickr image viewer 203 The Flickr web service 204 ■ Getting registered with Flickr 204 8.2 Using a web service in JavaFX 205 Calling the web service with HttpRequest 205 ■ Parsing XML with PullParser 208 ■ A recap 212 ■ Testing our web service code 212 8.3 Picture this: the PhotoViewer application 213 Displaying thumbnails from the web service: the GalleryView class 214 ■ The easy way to animate: transitions 220 ■ The main photo desktop: the PhotoViewer class 221 ■ Running the application 228 8.4 Size matters: node bounds in different contexts 228 8.5 Summary 229 From app to applet 230 9 9.1 The Enigma project 231 The mechanics of the Enigma cipher 231 9.2 Programmer/designer workflow: Enigma machine, version 1 232 Getting ready to use the JavaFX Production Suite 233 Converting SVG files to FXZ 234 ■ The Rotor class: the heart of the encryption 236 ■ A quick utility class 238 ■ The Key class: input to the machine 239 ■ The Lamp class: output from the machine 241 ■ The Enigma class: binding the encryption engine to the interface 243 ■ Running version 1 246 ■ Shortcuts using NetBeans, Photoshop, or Illustrator 246 9.3 More cryptic: Enigma machine, version 2 247 The Rotor class, version 2: giving the cipher a visual presence 248 The Paper class: making a permanent output record 251 ■
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]
  • 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]
  • 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]
  • Signing Java ME Applications
    Signing Java ME Applications Contents 1. What is the purpose of this document? 3 2. What are the basics? 3 2.1 What is application signing? 3 2.2 What indicates that an application has been signed? 3 2.3 Where does the signature take the application? 4 2.3.1 Domains 4 2.3.2 Accessing different domains 4 2.3.3 Why do domains matter? 4 2.3.4 Which pop up options are given to which features? 5 3. How do I use Sun JavaTM Wireless Toolkit (WTK) for application signing? 6 3.1 Importing the keys to WTK 6 3.2 Signing with WTK 6 3.3 What about NetBeans? 6 4. What can go wrong? 7 4.1 MIDlet attributes 7 4.2 Permissions 7 4.3 The device and the certificate 8 4.4 The validity period 8 5. Glossary 9 2 1. WHAT IS THE PURPOSE OF THIS DOCUMENT? This document provides key information about application signing in Java ME. It starts from the basics so should be useful for anyone who is not familiar with Java ME application signing. 2. WHAT ARE THE BASICS? 2.1 What is application signing? Application signing means that an application is signed with a private key. For each private key, there is a corresponding public key, which is delivered jointly with the application in the form of a digital certificate.1 When a signed application file is installed on a device, the application installer verifies that the certificate in the application was created by a one of the certificate authorities embedded in the device.
    [Show full text]
  • IMP Specification Initial Draft
    ALL RIGHTS RESERVED UNDER JSPA (JAVA SPECIFICATION PARTICIPATION AGREEMENT) Information Module Profile (JSR-195) JCP Specification, version 1.0 Java 2 Platform, Microedition - Final Release – © 2003 Siemens Mobile and Nokia. Portions Copyright 2003 Sun Microsystems, Inc. and Motorola, Inc. ALL RIGHTS RESERVED UNDER JSPA (JAVA SPECIFICATION PARTICIPATION AGREEMENT) Content Preface ......................................................................................................................................................................................3 Revision History.......................................................................................................................................................................3 Who Should Use This Specification.........................................................................................................................................4 How This Specification Is Organized.......................................................................................................................................4 Related Literature .....................................................................................................................................................................5 Maintenance Note.....................................................................................................................................................................5 1 Introduction and Background..........................................................................................................................................6
    [Show full text]
  • Runtime Monitoring for Next Generation Java ME Platform Gabriele Costa, Fabio Martinelli, Paolo Mori, Christian Schaefer, Thomas Walter
    Runtime monitoring for next generation Java ME platform Gabriele Costa, Fabio Martinelli, Paolo Mori, Christian Schaefer, Thomas Walter To cite this version: Gabriele Costa, Fabio Martinelli, Paolo Mori, Christian Schaefer, Thomas Walter. Runtime monitoring for next generation Java ME platform. Computers and Security, Elsevier, 2010, 29 (1), pp.74-87. 10.1016/j.cose.2009.07.005. inria-00458909 HAL Id: inria-00458909 https://hal.inria.fr/inria-00458909 Submitted on 22 Feb 2010 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Runtime Monitoring for Next Generation Java ME Platform Gabriele Costaa, Fabio Martinellia, Paolo Moria, Christian Schaeferb, Thomas Walterb aIstituto di Informatica e Telematica, Consiglio Nazionale delle Ricerche, Pisa, Italy bDOCOMO Euro-Labs, Munich, Germany Abstract Many modern mobile devices, such as mobile phones or Personal Digital As- sistants (PDAs), are able to run Java applications, such as games, Internet browsers, chat tools and so on. These applications perform some operations on the mobile device, that are critical from the security point of view, such as connecting to the Internet, sending and receiving SMS messages, connecting to other devices through the Bluetooth interface, browsing the user's contact list, and so on.
    [Show full text]