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/
•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
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 |