| A P P E N D I X A |
|
Upgrading Configuration Files |
To easily migrate to Sun Java Wireless Client software, version 2.0 from earlier versions (Sun Java Wireless Client software, versions 1.1.2 and before), some upgrading of configuration files is needed. Two utilities provided by Sun Java Wireless Client, version 2.0 make it easy to do these upgrades.
The UpgradeL10N tool upgrades a LocalizedStrings<locale>.java file from Java Wireless Client software, version 1.1.2 to the XML file format supported by Java Wireless Client software, version 2.0. The following is an example file:
InstallDir/src/configuration/configuration_xml/share/l10n/en-US.xml
It is included in the Java Wireless Client software, version 2.0 source bundle and generated by the UpgradeL10N tool for the following file, found in the Java Wireless Client software, version 1.1.2, source bundle.
InstallDir/src/i18n/common/classes/com/sun/midp/l10n/LocalizedStrings.java
The tool is available in the folder tool/upgradel10n. It works on the desktop and should be manually compiled with the Java technology-based compiler from JDK software, version 1.4.1_01 or later.
javac UpgradeL10N.java
java -cp . UpgradeL10N [inencoding] [infile] \
[outencoding] [outfile] [outclass]
You must specify an [inencoding] that is the same as the character encoding used by [infile].
java -cp . UpgradeL10N ISO-8859-1 LocalizedStrings.java \
ISO-8859-1 en-US.xml LocalizedStringsBase
The Adaptive User Interface (AUI) Technology software (formerly known as Project Chameleon) enables extensive visual customization and visual skinning. Many skinning and customization properties are used inside the Java Wireless Client software, version 2.0. In the Java Wireless Client software, version 1.1.2 these properties were hard coded in Java programming language sources, while the Java Wireless Client software, version 2.0 uses a flexible and easy maintainable XML representation of the AUI internal properties.
The UpgradeRomizedProperties tool converts the Chameleon properties stored in RomizedProperties.java included in the Java Wireless Client software, version 1.1.2 source bundle to the XML representation introduced in the Java Wireless Client software, version 1.1.3, and used in the Java Wireless Client software, version 2.0.
In the Java Wireless Client software 1.1.2, the property values are indexed using property names (strings) and therefore stored in a hash table internally by Chameleon. In the Java Wireless Client software, version 2.0, the Chameleon properties are presented in the XML format for further processing by the Configurator tool. The Configurator tool generates source code to store the Chameleon properties values in arrays indexed by integer constants.
Follow this syntax to run the conversion:
javac UpgradeRomizedProperties.java
java -cp . UpgradeRomizedProperties infile outfile
infile is the path to RomizedProperties.java to convert.
outfile is the name of the XML data file with Chameleon properties.
Copyright © 2007, Sun Microsystems, Inc. All rights reserved. SUN PROPRIETARY/CONFIDENTIAL.