JavaME (779880)
Текст из файла
Using Symbian OSJAVA ME ON SYMBIAN OSSecure your route to marketSymbian Signed is an industry-backed schemethat allows Symbian OS software developers toobtain a digital signature for their applications.To be ‘Symbian Signed’ applications must passvarious standardised tests. Some networkoperators and phone manufacturers (e.g.
Orange,Nokia and Sony Ericsson) now require that C++and AppForge MobileVB/Crossfire applicationsmust be signed if they are to be distributedthrough their channels.Applications that pass Symbian Signed canrun without the 'application source untrusted'warning and are published in a business tobusiness applications catalog. ISVs with signedapplications are also able to use the 'for SymbianOS' logo:For more information visit www.symbiansigned.comUsing Symbian OSJAVA ME ON SYMBIAN OSfromJava ME on Symbian OSpart of the Using Symbian OS series1st edition, 12/06Published by:Symbian Software Limited2-6 Boundary RowSouthwarkLondon SE1 8HPUKwww.symbian.comTrademarks, copyright, disclaimerSymbian’, ‘Symbian OS’ and other associated Symbian marks are alltrademarks of Symbian Software Ltd. Symbian acknowledges the trademarkrights of all third parties referred to in this material.
© Copyright SymbianSoftware Ltd 2006. All rights reserved. No part of this material may bereproduced without the express written permission of Symbian Software Ltd.Symbian Software Ltd makes no warranty or guarantee about the suitability oraccuracy of the information contained in this document. The informationcontained in this document is for general information purposes only andshould not be used or relied upon for any other purpose whatsoever.Compiled by:Roy Ben HayunMerchant Adventurer:James MentzManaging Editors:Freddie GjertsenSatu McNabbReviewed by:Neil BroadbentAlon Or-BachDesign Consultant:Annabel CookeThis booklet explains the implementation of Java ME onSymbian OS and how to develop your first Java applicationfor a Symbian smartphone.ContentsJava Technology and Language ..........................................1Java Platforms ....................................................................2Java™ Platform Micro Edition (Java ME) platform..............3Symbian Java ME platform..................................................4What do I need?..................................................................5Where do I find it? ..............................................................7HelloWorld example application ........................................8Build and run MIDP HelloWorld application......................18Who should I talk to next? ................................................21Talk about Symbian OS ....................................................221IntroductionMobile Java is one of the most widely installed runtimeson mobile phones.
By enabling rich, advanced dataservices (for instance, location-based services andwireless commerce) it has gained recognition as a solidrevenue stream for operators and content providers.Java Technology and LanguageJava technology is a collection of software products andspecifications from Sun Microsystems that provides asystem for development and deployment of crossplatform applications.The Java programming language was introduced by SunMicrosystems in 1995 and is designed for use in thedistributed environment of the Internet. It was designedto have familiar C++-like notation, but with greatersimplicity and an enforced object-oriented singleparadigm.The Java programming language can be characterized bythe following:• Portability – Java applications are capable ofexecuting on a variety of hardware architectures andoperating systems.• Robust - unlike programs written in C++, Javainstructions cannot cause the system to ‘crash’.2• Secure – security features were designed into thelanguage and run-time system.• Object oriented - with the exception of primitivetypes, everything in Java is an object in order tosupport encapsulation and message-passingparadigms of object-based software.• Multithreaded - Java supports multithreading and hassynchronization primitives built into the language.• Simple and familiar – this is of course relative tolearning C++.
Don't imagine though that Java can belearned in a day.In Java, source code is written in .java files which arethen compiled into .class files by the Java compiler. A.class file contains platform architecture neutralinstructions (bytecode) which are machine languageinstructions of the Java Virtual Machine (JVM).Java platformsA Java platform is a software-only platform that runs ontop of a native platform, this being the combination ofthe operating system and the underlying hardware.A Java platform is divided into two components:• The JVM that executes the Java language bytecode –this can be ported to various native platforms.• The collection of Java APIs - ready-made softwarelibraries that provide programming capabilities.Together, the JVM and APIs insulate an application fromthe native platform.3There are three main Java platforms which target differentapplication environments:• Java Platform Micro Edition (Java ME) — mobileenvironments with limited resources• Java Platform Standard Edition (Java SE) —workstation environments• Java Platform Enterprise Edition (Java EE) —largedistributed enterprise environments.The purpose of this booklet is to take a closer look atJava ME and explain how to develop your first application.Java Platform Micro Edition (Java ME) platformJava ME has established itself as the number one wirelessgaming platform by volume of sales.Java ME is the Java platform that allows programmers touse the Java language and tools to develop applicationsfor mobile wireless information devices such as mobilephones and PDAs.Java ME is subdivided by Configurations, Profiles andoptional packages.A Configuration is the specification of a JVM and a baseset of necessary class libraries; commonly based on asubset of the J2SE APIs.
Currently, there are two Java MEConfigurations:4• Connected Limited Device Configuration (CLDC)• Connected Device Configuration (CDC).A Profile sits on top of a configuration to complete theruntime environment by adding more high-level APIs,thereby preparing a device for a specific device category.Currently, there are two common Java ME Profiles:• Mobile Information Device Profile 1.0 (MIDP1)• Mobile Information Device Profile 2.0 (MIDP2).A widely adopted standard is the combination ofMIDP/CLDC to provide a complete Java platform formobile phones and other similar devices.Optional packages add functionality to the Java MEplatform by offering standard APIs for the use of varioustechnologies, such as databases, connectivity, webservices, 3D graphics and much more.The Symbian Java ME platformJava ME on Symbian OS exposes the strengths and powerof Symbian OS to Java developers through standard JavaAPIs.A Java implementation is only as good as the underlyingplatform.
The Symbian OS MIDP runtime environment isan integrated component of the operating system. Theplatform delivered is a Java ME stack incorporating a5high-performance CLDC1.1 virtual machine and a bespokeMIDP2.0 implementation designed to allow Javaapplications to exploit the advanced multitasking,graphics, and comms capabilities of the underlying OS.The stack includes similarly highly integratedimplementations of many optional Java ME API packages,including Bluetooth, 3D graphics, Multimedia and ContentHandling.Symbian OS v9 supports very high Java ME standards:• CLDC 1.1 - backward-compatible revision of CLDC 1.0with many additions and enhancements that includesupport for floating-point math.• MIDP 2.0 - backward-compatible version of MIDP 1.0with new features such as multimedia and gamefunctionality, rich user interface, extensiveconnectivity, over-the-air provisioning (OTA), androbust security model.• Large collection of optional APIs – such as WMA, Fileand PIM access, Bluetooth, 3D graphics andadvanced multimedia.• No limits on computing resources – heap, threads,etc.• On-device debugging.What do I need?First of all, you will need development software to helpyou to write the code and compile it.
This is best done6with an Integrated Development Environment (IDE), whichcontains an editor, compiler and other development tools.NetBeans is an open source Java IDE that providesdevelopers with everything they need to create crossplatform Java applications. When you download theNetBeans IDE, you get a modular, standards-based IDEwith all the key functionality.For Java ME development you need to integrate theNetBeans Mobility Pack into the IDE, which can be usedto write, test, and debug applications on MIDP 2.0/CLDC 1.1-enabled mobile devices.
It also allows you tointegrate third-party SDKs for a robust testingenvironment for various device vendors - and this is whatwe will do.You can download and run the NetBeans IDE 5.0 Installerfrom www.netbeans.org/community/releases/50. When theinstallation completes, you can download and run theNetBeans Mobility Pack 5.0 In staller from the same URL.You now have an IDE for Java ME applicationdevelopment.The other software you will need is a MIDP SoftwareDevelopment Kit (SDK), which allows you to write andbuild programs for your phone.
There are a number ofdifferent MIDP SDKs available, depending on thephone(s) you want to target – see the following pages for7further details of which MIDP SDK(s) are required.If you do not have a particular phone or platform in mindand are unsure of which MIDP SDK to select, we wouldrecommend you start with both an S60 and a UIQ SDK.Either opt for both of them for Symbian OS v9 (i.e., UIQ 3and S60 3rd Edition) if you want to write applications forthe latest phones (such as the Nokia E and Nseries, orSony Ericsson P990i) or go for the previous version of theSDKs (i.e, UIQ 2.1 and S60 2nd Edition FP2).Where do I find it?This section specifies where to find the resourcesdiscussed in the previous section.IDEs:• NetBeanswww.netbeans.org/community/releases/50• Eclipsewww.eclipse.org/downloadsSDKs:• S60 Platform SDKs for Symbian OS, for Javawww.forum.nokia.com/main/resources/tools_and_sdks/listings/java_tools.html• Carbide.jwww.forum.nokia.com/main/resources/tools_and_sdks/carbide/index.html8• UIQ3.0www.developer.uiq.com/devtools_uiqsdk.html• SEMC SDK for the Java ME platformwww.developer.sonyericsson.com/site/global/docstools/java/p_java.jsp• WTKwww.java.sun.com/products/sjwtoolkitA HelloWorld application explainedThe execution unit in MIDP is the MIDlet.
Характеристики
Тип файла PDF
PDF-формат наиболее широко используется для просмотра любого типа файлов на любом устройстве. В него можно сохранить документ, таблицы, презентацию, текст, чертежи, вычисления, графики и всё остальное, что можно показать на экране любого устройства. Именно его лучше всего использовать для печати.
Например, если Вам нужно распечатать чертёж из автокада, Вы сохраните чертёж на флешку, но будет ли автокад в пункте печати? А если будет, то нужная версия с нужными библиотеками? Именно для этого и нужен формат PDF - в нём точно будет показано верно вне зависимости от того, в какой программе создали PDF-файл и есть ли нужная программа для его просмотра.