Instructions October 2008 Setting up Java environment for Project Capuchin development with Sony Ericsson phones
Preface About this document This document contains a step by step description of how to set up a Java environment for developing Project Capuchin applications. Sony Ericsson Developer World At www.sonyericsson.com/developer, developers find the latest technical documentation and development tools such as phone White papers, Developers guidelines for different technologies, Getting started tutorials, SDKs (Software Development Kits) and tool plugins. The Web site also features news articles, go-to-market advice, moderated discussion forums offering free technical support and a Wiki community sharing expertise and code examples. For more information about these professional services, go to the Sony Ericsson Developer World Web site. These instructions are published by: Sony Ericsson Mobile Communications AB, SE-221 88 Lund, Sweden Phone: +46 46 19 40 00 Fax: +46 46 19 41 00 www.sonyericsson.com/ Sony Ericsson Mobile Communications AB, 2008. All rights reserved. You are hereby granted a license to download and/or print a copy of this document. Any rights not expressly granted herein are reserved. First revised edition (October 2008) Publication number: 1218-5284.1 (rev. B) This document is published by Sony Ericsson Mobile Communications AB, without any warranty*. Improvements and changes to this text necessitated by typographical errors, inaccuracies of current information or improvements to programs and/or equipment, may be made by Sony Ericsson Mobile Communications AB at any time and without notice. Such changes will, however, be incorporated into new editions of this document. Printed versions are to be regarded as temporary reference copies only. *All implied warranties, including without limitation the implied warranties of merchantability or fitness for a particular purpose, are excluded. In no event shall Sony Ericsson or its licensors be liable for incidental or consequential damages of any nature, including but not limited to lost profits or commercial loss, arising out of the use of the information in this document. 2 October 2008
Trademarks and acknowledgements Adobe, Adobe Flash Lite and Adobe Flash are either trademarks or registered trademarks of Adobe Systems Incorporated in United States and/or other countries. Java and all Java based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc, in the U.S. and other countries. Other product and company names mentioned herein may be the trademarks of their respective owners. Document history Change history 2008-08-31 Doc. no. 1218-5284.1 First version published 2008-10-14 Doc. no. 1218-5284.1 (rev. B) First revised version. Minor text changes. New layout 3 October 2008
Contents Instructions...5 Installing the EclipseME plugin...6 Setting up the Sony Ericsson SDK with Eclipse Environment....9 Installing the Project Capuchin basic APIs...13 4 October 2008
Instructions The Java environment consists of: Java Runtime Environment (JRE) 1.6 or later. JRE is available at http://www.java.com/en/download/ manual.jsp. Download and install it according to the provided instructions. Sony Ericsson SDK for Java Platform, Micro Edition (Java ME ). This SDK is found on Sony Ericsson Developer World, http://developer.sonyericsson.com/site/global/docstools/java/p_java.jsp. Follow the provided installation instructions. Eclipse. Download Eclipse SDE, available for download at http://www.eclipse.org/downloads/. EclipseME plugin. Can be installed by using the EclipseME update site, http://eclipseme.org/docs/installation.html. Project Capuchin Classes. The Project Capuchin API is available for download at http://developer.sonyericsson.com. 5 October 2008
Installing the EclipseME plugin 1. Start Eclipse and select Help Software Updates Find and Install... from the menu. 6 October 2008
2. Select the Search for new features to install option and click Next. 3. All available update sites are listed. The EclipseME plugin is not in the list, so to be able to install it, click the New Remote Site button. 7 October 2008
4. Enter the following values in the text boxes: Name: EclipseME Update Site URL: http://www.eclipseme.org/updates/ 5. Select EclipseME Update Site in the list and click the Finish button. 8 October 2008
6. Eclipse verifies if any updates are available. 7. If an update is available, Eclipse prompts for installing it. Select Yes and wait until the installation is completed. Then restart Eclipse. Setting up the Sony Ericsson SDK with Eclipse Environment. 1. After installing the Sony Ericsson SDK for the Java ME Platform, select Window Preferences from the Eclipse menu. 9 October 2008
2. Go to J2ME then select Device Management in the tree structure to the left. Click the Import button. 3. Click the Browse button. 10 October 2008
4. Select the folder where the Sony Ericsson SDK is installed. 5. After selecting the devices directory click the Refresh button. 11 October 2008
6. A list of all available phone emulators is shown. Select a phone model, for example, "SonyEricsson_JP8_240x320_Emu".] Now the environment will run on the SonyEricsson Java Platform JP-8.0 emulator with a screen size of 240x320 pixels. 12 October 2008
Installing the Project Capuchin basic APIs Project Capuchin basic APIs are needed when developing applications using Adobe Flash Lite and Java, and can be found at http://developer.sonyericsson.com. These API classes will be included in future releases of the Sony Ericsson Java ME SDK. Currently the classes must be manually included in the project build path. 1. Create an Eclipse project. Select File New Other from the Eclipse menu. 2. Select J2ME Midlet Suite in the New dialog and click Next. 3. Type the project name, and click Finish. 13 October 2008
4. The Eclipse project is now ready to import the Project Capuchin APIs. Select File Import... from the menu. 5. Select File System in the General folder and click Next. 14 October 2008
6. Unpack the zip file containing the Project Capuchin classes. In the Eclipse Import dialog, click the Browse button and navigate to the folder where the Project Capuchin classes were unpacked. Click Finish to import the classes. The Project Capuchin API classes have now been added to the project and should be included in the project build path: 15 October 2008
7. In Eclipse, right click your project and select Properties in the pop up. In the Properties window select Java Build Path in the left panel, and select the Libraries tab.click the Add Class Folder button. 8. Select the "com" folder under "Capuchin" and click the OK button. 16 October 2008
9. The Project Capuchin library should now be found in the "Referenced Libraries/com" folder. Make sure that the name of the subfolder is com.sonyericsson.capuchin. 10. If the name of the library is other than com.sonyericsson.capuchin, rename it by right clicking on the library and select Refactor Rename... in the popup menu. 17 October 2008
11. Enter the correct name, com.sonyericsson.capuchin and click OK. 12. The subfolder now has the correct name. The Eclipse setup is complete and application development can start. Note: The current version of the Sony Ericsson SDK does not support running Capuchin applications in the emulator, but developers may debug and test applications on device. For instructions on how to run on device debugging using USB, see https://developer.sonyericsson.com/docs/doc-1734. 18 October 2008