Sony Ericsson P800, P900 manual PJava performance, PJava application considerations

Page 15

Developers Guideline UIQ C++ and PersonalJava

It is recommended to install Sun J2SDK. When using the J2SDK, it is important to compile using a pJava “classes.zip” file. Such a file can be found in the UIQ SDK. Also, the javac compiler directive “- target 1.1” must be used for the J2SDK to assure that JDK 1.1.* compatible bytecode is generated. A good example of this can be found on the Sun web page: http://java.sun.com/j2se/1.5.0/docs/ tooldocs/windows/javac.html#crosscomp-example.

JavaCheck(tm) is a useful tool provided by Sun that helps you to find out if your source code conforms to the pJava specification. See: http://java.sun.com/products/personaljava/javacheck.html

You should use JavaCheck 3.0 which corresponds to the 1.1.x PJAE specification.

pJava performance

pJava is located on the A: drive in the P800 series. However, in the P900 and P910 series, pJava resides in

ROM (Z: drive) and 'executes in place'. This means that in the P900 and P910 series, the virtual machine binaries and classes.zip are not copied to RAM before execution. This results in approximately 1 second shorter startup time for an application and lower RAM usage per launched application.

pJava application considerations

The available screen size is 276x208 pixels and applications are usually based on the java.awt.Frame class. A good rule to minimise the start-up of applications containing complex GUIs, is to instantiate all GUI elements just before they are first needed, rather than at start-up. To give the user a perception of a quick starting application, it may be a good idea to load and display a “splash screen” as the first action while additional initialisation continues. This is something to consider for commercial grade applications where this additional development work is well worth the effort.

pJava font limitations (java.awt.Font)

The fonts and font sizes available to pJava applications are limited by the native fonts available in Symbian OS.

It is possible to obtain a list of the available fonts by using the java.awt.Toolkit class. The toolkit is acquired by using:

java.awt.Tookit tk=java.awt.Toolkit.getDefaultToolkit();

You can now get a string array of available fonts by using:

String[]fonts = tk.getFontList();

Only a limited set of font sizes are available for each font. For pJava, not all font sizes that can be specified in the font constructor are available. Instead the nearest smaller size available will be constructed. It is possible to sense the actual size obtained by using the method:

FontMetrics fm = tk.getFontMetrics();

15

October 2004

Image 15
Contents UIQ C++ and PersonalJava Purpose of this document PrefaceDocument history Trademarks and acknowledgementsTerminology and abbreviations URL WTK Online Developer ResourcesSony Ericsson Developer Support URI WMAContents Technical specifications for the P800, P900 and P910 series Technical overview and architecture Developer’s perspective on the P800, P900 and P910 series Technical data P910 series P900 series P800 seriesApplication development Feature Support General information about the P900 seriesGeneral tips for the P900 and P910 series Folder view of internal storage Internal user storage C driveDevelopers Guideline UIQ C++ and PersonalJava SDK compatibility To be used with UIQ 2.0 SDKUIQ 2.1 SDK Additional tools useful to the pJava developer PersonalJavaFontMetrics fm = tk.getFontMetrics PJava performancePJava application considerations PJava font limitations java.awt.FontConvention Behaviour related to flip modesApplication development UIQ 2.0 vs UIQ 2.1 and application compatibilityLibrary linking for applications with device emulation UIQ SDK for Symbian OSDevice Emulator and Library Linking Technical requirements for the UIQ SDKChinese extensions to the emulator Emulator issues and guidelinesPorting applications Skin imagesCompatibility Sony Ericsson specific APIsCamera API Vibration API@StreamingAmr.sis, 0x101F94AE Other useful Symbian APIsStreaming AMR API Device identificationMedia server BluetoothColour display AudioAPI Limitations Deploying applications on the P800, P900 and P910 series ETelMessaging/MMS P800/P900 series specific .sis packages Installation and data storage On-target debuggingMore information Symbian Signed How to check if the Symbian certificate is installedHow to install the Symbian certificate Signing digital applicationsGo-to-Market opportunities Technical specifications and references Characteristic P910 P900 series P800 series Technical specifications for the P800, P900 and P910 seriesSpecification table Characteristic P910 series P900 series P800 seriesLinks Links and referencesTips, information and external documentation PJava on P800, P900 and P910 seriesIndex
Related manuals
Manual 4 pages 9.29 Kb Manual 41 pages 10.08 Kb Manual 8 pages 49.9 Kb