0ef238fe60
X-SVN-Rev: 15885
1299 lines
66 KiB
HTML
1299 lines
66 KiB
HTML
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
|
||
<html>
|
||
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||
<meta http-equiv="Content-Style-Type" content="text/css2">
|
||
<title>ReadMe for ICU4J</title>
|
||
<!--
|
||
*******************************************************************************
|
||
* Copyright (C) 2000-2003, International Business Machines Corporation and *
|
||
* others. All Rights Reserved. *
|
||
*******************************************************************************
|
||
-->
|
||
|
||
<style>
|
||
h3.doc { background: #CCCCFF }
|
||
</style>
|
||
</head>
|
||
|
||
<body bgcolor="#FFFFFF" link="#0000FF" vlink="#800080" lang="EN-US">
|
||
|
||
<h2>International Components for Unicode for Java (ICU4J)</h2>
|
||
<h3>Read Me for ICU4J 3.0 - <font color="red">Draft</font></h3>
|
||
|
||
<hr size="2" width="100%">
|
||
<p><b>Release Date</b><br>
|
||
TBD</p>
|
||
|
||
<p>For the most recent
|
||
release, see the <a href="http://oss.software.ibm.com/icu4j/download/index.html">
|
||
ICU4J download site</a>.
|
||
</P>
|
||
|
||
<h3 class="doc">Contents</h3>
|
||
|
||
<ul type="disc">
|
||
<li><a href="#introduction">Introduction to ICU4J</a></li>
|
||
<li><a href="#news">What Is New In This Release?</a></li>
|
||
<li><a href="#license">License Information</a></li>
|
||
<li><a href="#PlatformDependencies">Platform Dependencies</a></li>
|
||
<li><a href="#download">How to Download ICU4J</a></li>
|
||
<li><a href="#WhatContain">The Structure and Contents of ICU4J</a></li>
|
||
<li><a href="#API">Where to Get Documentation</a></li>
|
||
<li><a href="#HowToInstallJavac">How to Install and Build</a></li>
|
||
<li><a href="#HowToModularize">How to modularize ICU4J</a></li>
|
||
<li><a href="#tryingout">Trying Out ICU4J</a></li>
|
||
<li><a href="#resources">ICU4J Resource Information</a></li>
|
||
<li><a href="#WhereToFindMore">Where to Find More Information</a></li>
|
||
<li><a href="#SubmittingComments">Submitting Comments, Requesting Features and Reporting
|
||
Bugs</a></li>
|
||
</ul>
|
||
|
||
<h3 class="doc"><a NAME="introduction"></a>Introduction to ICU4J</h3>
|
||
|
||
<p>The International Components for Unicode (ICU) library provides robust and
|
||
full-featured Unicode services on a wide variety of platforms. ICU supports the
|
||
most current version of the Unicode standard, including support for
|
||
supplementary characters (needed for GB 18030 repertoire support).</p>
|
||
|
||
<p>Java provides a strong foundation for global programs, and IBM and the
|
||
ICU team played a key role in providing globalization technology to
|
||
Java. But because of its long release schedule, Java cannot always keep
|
||
up with evolving standards. The ICU team continues to extend Java's
|
||
Unicode and internationalization support, focusing on improving performance,
|
||
keeping current with the Unicode standard, and providing richer APIs, while
|
||
remaining as compatible as possible with the original Java text and
|
||
internationalization API design.</p>
|
||
|
||
<p>ICU4J is an add-on to the regular JVM that provides:
|
||
|
||
<ul>
|
||
<li><a href=
|
||
"http://oss.software.ibm.com/icu/userguide/Collate_Intro.html"><b>Collation</b></a>
|
||
<EFBFBD> rule-based, up-to-date Unicode Collation Algorithm (UCA) sorting order<br>
|
||
For fast multilingual string comparison; faster and more complete than
|
||
the JDK</li>
|
||
|
||
<li><a href=
|
||
"http://oss.software.ibm.com/icu/userguide/strings.html"><b>Supplementary
|
||
Characters</b></a> <20> String manipulation and character properties<br>
|
||
Required for proper GB 18030 and JIS 213 repertoire support</li>
|
||
|
||
<li><a href=
|
||
"http://oss.software.ibm.com/icu/userguide/unicodeSet.html"><b>UnicodeSet</b></a>
|
||
<20> standard set operations optimized for sets of Unicode characters<br>
|
||
UnicodeSets can be built from string patterns using any Unicode properties.</li>
|
||
|
||
<li><a href=
|
||
"http://oss.software.ibm.com/icu/userguide/Transform.html"><b>Transforms</b></a>
|
||
<20> a flexible mechanism for Unicode text conversions<br>
|
||
Including Full/Halfwidth conversions, Normalization, Case conversions, Hex
|
||
conversions, and transliterations between scripts (50+ pairs)</li>
|
||
|
||
<li><a href=
|
||
"http://oss.software.ibm.com/icu/userguide/normalization.html"><b>Unicode
|
||
Normalization</b></a> <20> NFC, NFD, NFKD, NFKC<br>
|
||
For canonical text representations, needed for XML and the net</li>
|
||
|
||
<li><a href=
|
||
"http://oss.software.ibm.com/icu/userguide/dateCalendar.html"><b>International
|
||
Calendars</b></a> <20> Arabic, Buddhist, Hebrew, and Japanese calendars<br>
|
||
Required for correct presentation of dates in certain countries</li>
|
||
|
||
<li><a href=
|
||
"http://oss.software.ibm.com/icu/userguide/formatNumbers.html"><b>Number Format
|
||
Enhancements</b></a> <20> Scientific Notation, Spelled-out, etc.<br>
|
||
Enhancements to the normal Java number formatting. The spell-out format is
|
||
used for checks and similar documents</li>
|
||
|
||
<li><a href=
|
||
"http://oss.software.ibm.com/icu/userguide/boundaryAnalysis.html"><b>Enhanced
|
||
Word-Break Detection</b></a> <20> Rule-based, supports Thai<br>
|
||
Required for correct support of Thai</li>
|
||
|
||
<li><a href=
|
||
"http://oss.software.ibm.com/icu/userguide/compression.html"><b>Unicode Text
|
||
Compression</b></a> <20> Standard compression of Unicode text<br>
|
||
Suitable for large numbers of small fields, where LZW and similar schemes
|
||
do not apply</li>
|
||
</ul>
|
||
|
||
<blockquote>
|
||
<p><b>Note:</b> We continue to provide assistance to Sun, and in some
|
||
cases, ICU4J support has been rolled into a later release of Java. For
|
||
example, the Thai word-break is now in Java 1.4. However, the most
|
||
current and complete version is always found in ICU4J.</p>
|
||
</blockquote>
|
||
<!--
|
||
<p><b>ICU4J is an add-on library that extends Java's globalization
|
||
technology.</b> Java provides a strong foundation for global
|
||
programs, but Java does not yet provide all the globalization
|
||
features that some products require. IBM played a key role in
|
||
providing globalization technology to Sun for use in Java. Over
|
||
the past seven years, the ICU team has continued to enhance and
|
||
extend this technology. IBM makes this technology available
|
||
in Java through the ICU4J open-source project.</p>
|
||
|
||
<p>ICU4J provides the following tools:
|
||
<ul>
|
||
<li><b>Unicode Normalization</b> <20> NFC, NFD, NFKD, NFKC<br>
|
||
Produces canonical text representations, needed for XML and the net.
|
||
<li><b>International Calendars</b> <20> Arabic, Buddhist, Hebrew, and Japanese<br>
|
||
Required for correct presentation of dates in some countries.
|
||
<li><b>Number Format Enhancements</b> <20> Scientific Notation, Spelled-out Numbers<br>
|
||
Enhances standard Java number formatting. The spelled-out format is used
|
||
for checks and similar documents.
|
||
<li><b>Enhanced word-break detection</b> <20> Rule-based, supports Thai<br>
|
||
Required for correct support of Thai.
|
||
<li><b>Unicode Text Compression</b> <20> Standard compression of Unicode text<br>
|
||
Suitable for large numbers of small fields, where LZW and similar schemes
|
||
do not apply.
|
||
<li><b>Collation</b> <20> Rule-based, up-to-date Unicode Collation Algorithm (UCA) sorting order<br>
|
||
For fast multilingual string comparison
|
||
<li><b>Transforms</b> <20> Rule-based transformations of unicode data<br>
|
||
Useful for analysis and transliteration
|
||
</ul>
|
||
|
||
In some cases, the above support has been rolled into a later release of
|
||
Java. For example, the Thai word-break is now in Java 1.4. However, the most
|
||
current and complete version of this support is always found in ICU4J.
|
||
-->
|
||
|
||
<h3 class="doc"><a NAME="news"></a>What Is New In This
|
||
Release?</h3>
|
||
|
||
<ul>
|
||
<li><a href="#News_JDK1_3_Unsupported">JDK 1.3 no longer supported</a>
|
||
<li><a href="#News_ULocale">RFC 3066 initial implementation</a> (<tt>ULocale</tt> and <tt>UResourceBundle</tt> classes)
|
||
<li><a href="#News_JDK15_SupplementaryAPI">Added APIs for supplementary support to match JDK 1.5</a>
|
||
<li><a href="#News_TimeZone_IDs">TimeZone Identifiers</a>
|
||
<li><a href="#News_Resource_Binary">Resource bundle implementation now uses ICU4C binary files</a>
|
||
</ul>
|
||
|
||
<p>A complete report of the API changes between version 3.0 and
|
||
version 2.8 of ICU4J can be found <a
|
||
href="APIChangeReport.html">here</a>. This report is generated by a
|
||
tool and has some limitations, the most notable of which is that it
|
||
does not properly reflect the effect of class inheritance changes. For
|
||
example, ICU4J 3.0 moved the definition of some constants out of
|
||
some classes into interfaces that the classes now inherit, and
|
||
although this has no impact on the API available to the classes, the
|
||
tool reports this as a removal of API from them. Also of course,
|
||
being generated by a tool, the report does not provide explanation or
|
||
commentary on the changes. For background information and
|
||
clarification of changes it's always recommended that you check the
|
||
mailing list and archives.</p>
|
||
|
||
<h4><a name="News_JDK1_3_Unsupported" id="News_JDK1_3_Unsupported">JDK 1.3 No Longer Supported</a></h4>
|
||
|
||
<p>For a few years now, ICU4J has taken pains to not require any of
|
||
the new functionality introduced in JDK1.4. Finally, though, the
|
||
pains have become too great. ICU4J now requires a JDK 1.4 or later JVM both
|
||
to build and run. ICU4J is no longer tested on 1.3 or earlier JVMs. We apologize for
|
||
any inconvenience this may cause our users.</p>
|
||
|
||
<h4><a name="News_ULocale" id="News_ULocale">RFC 3066 Initial Implementation</a></h4>
|
||
|
||
<p>RFC 3066 defines a new format for Locale identifiers that
|
||
incorporates information about the script as well as the language and
|
||
region into the locale identifier. ICU4J has enhanced the
|
||
<tt>ULocale</tt> class to provide this information. ICU4J has also added
|
||
the <tt>UResourceBundle</tt> class to allow instantiation of resource
|
||
bundles using RFC 3066-style locale ids. This is an
|
||
initial implementation; not all ICU4J APIs that currently work with
|
||
<tt>Locale</tt> have been enhanced to work with <tt>ULocale</tt>. We
|
||
anticipate a complete implementation in the next ICU4J release.</p>
|
||
|
||
<h4><a name="News_JDK15_SupplementaryAPI" id="News_JDK15_SupplementaryAPI">
|
||
Added APIs for supplementary support to match JDK 1.5</a></h4>
|
||
|
||
<p>JDK 1.5 introduces new APIs for surrogate support. ICU4J has
|
||
offered surrogate support for several releases, and continues to offer
|
||
this functionality. However, to simplify porting between ICU4J and
|
||
JDK 1.5, where possible ICU4J has added APIs that provide the same
|
||
signature and semantics as those planned for 1.5. (There are some
|
||
unavoidable differences, for example, APIs added to java.lang.String
|
||
cannot be exactly matched by ICU4J). Members of the ICU team
|
||
participated in the JSR 204 expert group discussions and helped
|
||
develop the new Java APIs for supplementary character support.</p>
|
||
|
||
<h4><a name="News_TimeZone_IDs" id="News_TimeZone_IDs">TimeZone
|
||
Identifiers</a></h4>
|
||
|
||
<p>ICU supports over 500 TimeZone identifiers. Most of these are current
|
||
Olson identifiers (see TimeZone documentation). However, some of these
|
||
are obsolete names for current identifiers. There are two sources of
|
||
obsolete identifiers: the Olson database itself, and JDK legacy
|
||
identifiers. (For example, the Olson database defines "US/Pacific" as an
|
||
old identifier for "America/Los_Angeles". JDK 1.5 defines "PST" as a
|
||
legacy identifier equivalent to "America/Los_Angeles".) Currently, the
|
||
ICU TimeZone API does not distinguish between current identifiers and
|
||
obsolete identifiers. This section lists obsolete identifiers and their
|
||
modern equivalents.
|
||
</p>
|
||
|
||
<p>As of ICU 3.0 there are 136 obsolete Olson names (modern names given
|
||
in parentheses):
|
||
|
||
<font size="-1">
|
||
America/Atka (America/Adak), America/Ensenada (America/Tijuana),
|
||
America/Fort_Wayne (America/Indianapolis), America/Indiana/Indianapolis
|
||
(America/Indianapolis), America/Kentucky/Louisville (America/Louisville),
|
||
America/Knox_IN (America/Indiana/Knox), America/Porto_Acre
|
||
(America/Rio_Branco), America/Rosario (America/Cordoba), America/Shiprock
|
||
(America/Denver), America/Virgin (America/St_Thomas),
|
||
Antarctica/South_Pole (Antarctica/McMurdo), Arctic/Longyearbyen
|
||
(Europe/Oslo), Asia/Ashkhabad (Asia/Ashgabat), Asia/Chungking
|
||
(Asia/Chongqing), Asia/Dacca (Asia/Dhaka), Asia/Istanbul
|
||
(Europe/Istanbul), Asia/Macao (Asia/Macau), Asia/Tel_Aviv
|
||
(Asia/Jerusalem), Asia/Thimbu (Asia/Thimphu), Asia/Ujung_Pandang
|
||
(Asia/Makassar), Asia/Ulan_Bator (Asia/Ulaanbaatar), Atlantic/Jan_Mayen
|
||
(Europe/Oslo), Australia/ACT (Australia/Sydney), Australia/Canberra
|
||
(Australia/Sydney), Australia/LHI (Australia/Lord_Howe), Australia/NSW
|
||
(Australia/Sydney), Australia/North (Australia/Darwin),
|
||
Australia/Queensland (Australia/Brisbane), Australia/South
|
||
(Australia/Adelaide), Australia/Tasmania (Australia/Hobart),
|
||
Australia/Victoria (Australia/Melbourne), Australia/West
|
||
(Australia/Perth), Australia/Yancowinna (Australia/Broken_Hill),
|
||
Brazil/Acre (America/Porto_Acre), Brazil/DeNoronha (America/Noronha),
|
||
Brazil/East (America/Sao_Paulo), Brazil/West (America/Manaus), CST6CDT
|
||
(America/Chicago), Canada/Atlantic (America/Halifax), Canada/Central
|
||
(America/Winnipeg), Canada/East-Saskatchewan (America/Regina),
|
||
Canada/Eastern (America/Toronto), Canada/Mountain (America/Edmonton),
|
||
Canada/Newfoundland (America/St_Johns), Canada/Pacific
|
||
(America/Vancouver), Canada/Saskatchewan (America/Regina), Canada/Yukon
|
||
(America/Whitehorse), Chile/Continental (America/Santiago),
|
||
Chile/EasterIsland (Pacific/Easter), Cuba (America/Havana), EST
|
||
(America/Indianapolis), EST5EDT (America/New_York), Egypt (Africa/Cairo),
|
||
Eire (Europe/Dublin), Etc/GMT+0 (Etc/GMT), Etc/GMT-0 (Etc/GMT), Etc/GMT0
|
||
(Etc/GMT), Etc/Greenwich (Etc/GMT), Etc/Universal (Etc/UTC), Etc/Zulu
|
||
(Etc/UTC), Europe/Bratislava (Europe/Prague), Europe/Ljubljana
|
||
(Europe/Belgrade), Europe/Nicosia (Asia/Nicosia), Europe/San_Marino
|
||
(Europe/Rome), Europe/Sarajevo (Europe/Belgrade), Europe/Skopje
|
||
(Europe/Belgrade), Europe/Tiraspol (Europe/Chisinau), Europe/Vatican
|
||
(Europe/Rome), Europe/Zagreb (Europe/Belgrade), GB (Europe/London),
|
||
GB-Eire (Europe/London), GMT (Etc/GMT), GMT+0 (Etc/GMT+0), GMT-0
|
||
(Etc/GMT-0), GMT0 (Etc/GMT0), Greenwich (Etc/Greenwich), HST
|
||
(Pacific/Honolulu), Hongkong (Asia/Hong_Kong), Iceland
|
||
(Atlantic/Reykjavik), Iran (Asia/Tehran), Israel (Asia/Jerusalem),
|
||
Jamaica (America/Jamaica), Japan (Asia/Tokyo), Kwajalein
|
||
(Pacific/Kwajalein), Libya (Africa/Tripoli), MST (America/Phoenix),
|
||
MST7MDT (America/Denver), Mexico/BajaNorte (America/Tijuana),
|
||
Mexico/BajaSur (America/Mazatlan), Mexico/General (America/Mexico_City),
|
||
Mideast/Riyadh87 (Asia/Riyadh87), Mideast/Riyadh88 (Asia/Riyadh88),
|
||
Mideast/Riyadh89 (Asia/Riyadh89), NZ (Pacific/Auckland), NZ-CHAT
|
||
(Pacific/Chatham), Navajo (America/Denver), PRC (Asia/Shanghai), PST8PDT
|
||
(America/Los_Angeles), Pacific/Samoa (Pacific/Pago_Pago), Poland
|
||
(Europe/Warsaw), Portugal (Europe/Lisbon), ROC (Asia/Taipei), ROK
|
||
(Asia/Seoul), Singapore (Asia/Singapore), SystemV/AST4
|
||
(America/Puerto_Rico), SystemV/AST4ADT (America/Halifax), SystemV/CST6
|
||
(America/Regina), SystemV/CST6CDT (America/Chicago), SystemV/EST5
|
||
(America/Indianapolis), SystemV/EST5EDT (America/New_York), SystemV/HST10
|
||
(Pacific/Honolulu), SystemV/MST7 (America/Phoenix), SystemV/MST7MDT
|
||
(America/Denver), SystemV/PST8 (Pacific/Pitcairn), SystemV/PST8PDT
|
||
(America/Los_Angeles), SystemV/YST9 (Pacific/Gambier), SystemV/YST9YDT
|
||
(America/Anchorage), Turkey (Europe/Istanbul), UCT (Etc/UCT), US/Alaska
|
||
(America/Anchorage), US/Aleutian (America/Adak), US/Arizona
|
||
(America/Phoenix), US/Central (America/Chicago), US/East-Indiana
|
||
(America/Indianapolis), US/Eastern (America/New_York), US/Hawaii
|
||
(Pacific/Honolulu), US/Indiana-Starke (America/Indiana/Knox), US/Michigan
|
||
(America/Detroit), US/Mountain (America/Denver), US/Pacific
|
||
(America/Los_Angeles), US/Pacific-New (America/Los_Angeles), US/Samoa
|
||
(Pacific/Pago_Pago), UTC (Etc/UTC), Universal (Etc/Universal), W-SU
|
||
(Europe/Moscow), Zulu (Etc/Zulu).
|
||
</font></p>
|
||
|
||
<p>As of ICU 3.0 there are 25 legacy JDK identifiers (modern names given
|
||
in parentheses):
|
||
|
||
<font size="-1">
|
||
ACT (Australia/Darwin), AET (Australia/Sydney), AGT
|
||
(America/Buenos_Aires), ART (Africa/Cairo), AST (America/Anchorage), BET
|
||
(America/Sao_Paulo), BST (Asia/Dhaka), CAT (Africa/Harare), CNT
|
||
(America/St_Johns), CST (America/Chicago), CTT (Asia/Shanghai), EAT
|
||
(Africa/Addis_Ababa), ECT (Europe/Paris), IET (America/Indianapolis), IST
|
||
(Asia/Calcutta), JST (Asia/Tokyo), MIT (Pacific/Apia), NET
|
||
(Asia/Yerevan), NST (Pacific/Auckland), PLT (Asia/Karachi), PNT
|
||
(America/Phoenix), PRT (America/Puerto_Rico), PST (America/Los_Angeles),
|
||
SST (Pacific/Guadalcanal), VST (Asia/Saigon).
|
||
</font></p>
|
||
|
||
<h4><a name="News_Resource_Binary" id="News_Resource_Binary">Resource
|
||
files now use ICU4C binary files</a></h4>
|
||
|
||
<p>ICU4J has switched to a new resource bundle implementation in order to utilize
|
||
the same binary data files used by ICU. This will likely impact clients who
|
||
have extended or modified the resource data provided in ICU4J. Most clients will
|
||
see no change from this switchover. This change was made for several reasons,
|
||
the main ones being the desire to provide RFC 3066 support in a manner identical
|
||
to ICU, to avoid reworking the conversion tools (genrb) each time we evolve ICU's
|
||
resource bundle structure, and to avoid certain size constraints imposed by
|
||
java's class file format.</p>
|
||
|
||
<h3 class="doc"><a name=license></a>License Information</h3>
|
||
<p>
|
||
The ICU projects (ICU4C and ICU4J) use the X license. The X license is a <b>non-viral</b> and recommended free software license that is compatible with the GNU GPL license. This became effective with release 1.8.1 of ICU4C and release 1.3.1 of ICU4J in mid-2001. All new ICU releases will adopt the X license; previous ICU releases continue to utilize the IPL (IBM Public License). Users of previous releases of ICU who want to adopt new ICU releases will need to accept the terms and conditions of the X license.
|
||
</p>
|
||
<p>
|
||
The main effect of the change is to provide GPL compatibility. The X license is listed as GPL compatible, see the GNU page at <a href=http://www.gnu.org/philosophy/license-list.html#GPLCompatibleLicenses>
|
||
http://www.gnu.org/philosophy/license-list.html#GPLCompatibleLicenses</a>. This means that GPL projects can now use ICU code, it does <b>not</b> mean that projects using ICU become subject to GPL.
|
||
</p>
|
||
<p>
|
||
The text of the X license is available at <a href=http://www.x.org/terms.htm>http://www.x.org/terms.htm</a>. The IBM version contains the essential text of the license, omitting the X-specific trademarks and copyright notices. The full copy of <a href=license.html>ICU's license</a> is included in the download package.
|
||
</p>
|
||
<p>
|
||
For more details please see the <a href=http://oss.software.ibm.com/icu/press.html>press announcement</a> and the <a href=http://oss.software.ibm.com/icu/project_faq.html#license>Project FAQ</a>.
|
||
</p>
|
||
|
||
<h3 class="doc"><a NAME="PlatformDependencies"></a>Platform Dependencies</h3>
|
||
<P>
|
||
Parts of ICU4J depend on functionality that is only available in JDK 1.4
|
||
or later, although some components work under earlier JVMs. All
|
||
components should be compiled using a Java2 compiler, as even components
|
||
that run under earlier JVMs can require language features that are only
|
||
present in Java2. Currently 1.1.x, 1.2.x and 1.3.x JVMs are unsupported and untested, and you use
|
||
the components on these JVMs at your own risk.</P>
|
||
<p>
|
||
The reference platforms which we support and test ICU4J on are:<ul>
|
||
<li> WinXP, IBM JDK 1.4.1</li>
|
||
<li> Solaris 2.7, Sun JDK 1.4.2</li>
|
||
<li> AIX 5.2, IBM JDK 1.4.1</li>
|
||
</ul>
|
||
</p>
|
||
<p>Please use the most recent updates of the supported JDK versions.</p>
|
||
|
||
<p>Additionally, we have built and tested ICU4J on the following <b>unsupported</b> platforms:
|
||
<ul>
|
||
<li> Win98, WinNT, WinXP / IBM JDK 1.4.1, Sun JDK 1.4, 1.4.1</li>
|
||
<li> Win2000 / IBM JDK 1.4.1, Sun JDK 1.4, 1.4.1</li>
|
||
<li> Solaris 2.6 , Solaris 2.8 / Sun JDK 1.4, 1.4.1</li>
|
||
<li> Solaris 2.7 / Sun JDK 1.4, 1.4.1</li>
|
||
<li> AIX 5.1, IBM JDK 1.4.1</li>
|
||
</ul>
|
||
|
||
<h3 class="doc"><a NAME="obtaining"></a>How to Download ICU4J</h3>
|
||
|
||
<p>There are two ways to download the ICU4J releases.
|
||
|
||
<ul type="disc">
|
||
<li><b>Official Release Snapshot:</b><br>
|
||
|
||
If you want to use ICU4J (as opposed to developing it), your best
|
||
bet is to download an official, packaged version of the ICU4J
|
||
source code. These versions are tested more thoroughly than
|
||
day-to-day development builds, and they are packaged in zip files
|
||
for convenient download. These packaged files can be found
|
||
at <a href="http://oss.software.ibm.com/icu4j/download/index.html">http://oss.software.ibm.com/icu4j/download/index.html</a>. If a packaged snapshot is named <b>ICU4JXXXXXX.zip</b>, where XXXXXX is
|
||
the release version number. Please unzip this file. It
|
||
will reconstruct the source directory. </li>
|
||
</ul>
|
||
|
||
<ul type="disc">
|
||
<li><b>CVS Source Repository:</b><br>
|
||
If you are interested in developing features, patches, or bug fixes for ICU4J, you should
|
||
probably be working with the latest version of the ICU4J source code. You will need to
|
||
check the code out of our CVS repository to ensure that you have the most recent version
|
||
of all of the files. There are several ways to do this: <br>
|
||
<ul type="circle">
|
||
<li>WebCVS:<br>
|
||
If you want to browse the code and only make occasional downloads, you may want to use
|
||
WebCVS. It provides a convenient, web-based interface for browsing and downloading the
|
||
latest version of the ICU4J source code and documentation. You can also view each file's
|
||
revision history, display the differences between individual revisions, determine which
|
||
revisions were part of which official release, and so on. <br>
|
||
</li>
|
||
<li>WinCVS:<br>
|
||
If you will be doing serious work on ICU4J, you should probably install a CVS client on
|
||
your own machine so that you can do batch operations without going through the WebCVS
|
||
interface. On Windows, we suggest the WinCVS client. To download ICU4J via WinCVS: <ol>
|
||
<li>Install the WinCVS client, which you can download from the <a
|
||
href="http://www.wincvs.org">http://www.wincvs.org</a>.</li>
|
||
<li>Select <strong>Preferences</strong> from the <strong>Admin</strong> menu.<ol type="a">
|
||
<li>On the <strong>General</strong> tab panel: Set your <strong>CVSROOT</strong> to "<strong>:pserver:anoncvs@oss.software.ibm.com:/usr/cvs/icu4j</strong>".<br>
|
||
Leave other options on this page at their default.</li>
|
||
<li>On the <strong>Ports</strong> tab panel: Check the <strong>pserver</strong> checkbox and
|
||
enter port <strong>2401</strong>.</li>
|
||
</ol>
|
||
</li>
|
||
<li>Click on the Login menu button (<strong>Admin</strong> menu). Enter in "<strong>anoncvs</strong>" when requested.</li>
|
||
<li>To extract the most recent version of ICU4J, select <strong>Checkout module</strong>
|
||
from the <strong>Create</strong> menu. Specify "<strong>icu4j</strong>" for the
|
||
module name. This will create a new copy of the workspace on your local hard drive.</li>
|
||
<li>In the future, you can download updated files from the repository to your hard drive
|
||
using the <strong>Update selection</strong> item in the <strong>Modify</strong> menu.<br>
|
||
</li>
|
||
</ol>
|
||
</li>
|
||
<li>CVS command line:<br>
|
||
You can also check out the repository anonymously on UNIX using the following commands,
|
||
after first setting your CVSROOT to point to the ICU4J repository: <pre><code>export CVSROOT=:pserver:anoncvs@oss.software.ibm.com:/usr/cvs/icu4j
|
||
cvs login CVS password: anoncvs
|
||
cvs checkout icu4j
|
||
cvs logout</code></pre>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<p>For more details on how to download ICU4J directly from the web site, please also see <a
|
||
href="http://oss.software.ibm.com/icu4j/download/index.html">http://oss.software.ibm.com/icu4j/download/index.html</a>
|
||
</p>
|
||
|
||
<h3 class="doc"><a NAME="WhatContain"></a>The Structure and Contents of ICU4J</h3>
|
||
|
||
<p>Below, <b>$Root</b> is the placement of the icu directory in your file system, like
|
||
"drive:\...\icu4j" in your environment. "drive:\..." stands for any
|
||
drive and any directory on that drive that you chose to install icu4j into. </p>
|
||
|
||
<p><b>Information and build files:</b></p>
|
||
|
||
<table frame="void" CELLPADDING="3" bgcolor="#CCCCFF" WIDTH="623">
|
||
<tr>
|
||
<td valign="baseline" align="right" bgcolor="#FFFFFF"><b>readme.html</b><br>
|
||
(this file)</td>
|
||
<td valign="baseline" bgcolor="#FFFFFF">A description of ICU4J (International Components for Unicode for Java)</td>
|
||
</tr>
|
||
<tr>
|
||
<th valign="baseline" align="right" bgcolor="#FFFFFF">license.html</th>
|
||
<td valign="baseline" bgcolor="#FFFFFF">The X license, used by ICU4J</td>
|
||
</tr>
|
||
<tr>
|
||
<th valign="baseline" align="right" bgcolor="#FFFFFF">build.xml</th>
|
||
<td valign="baseline" bgcolor="#FFFFFF">Ant build file. See <a href="#HowToInstallJavac">How to Install and Build</a> for more information</td>
|
||
</tr>
|
||
</table>
|
||
|
||
<p><b>The source directories mirror the package structure of the code.</b><br><font color="red">Core</font> packages become part of the ICU4J jar file.<br><font color="red">API</font> packages contain classes with supported API. <br><font color="red">RichText</font> classes are Core and API, but can be removed from icu4j.jar, and can be built into their own jar.</p>
|
||
|
||
<table frame="void" BORDER="0" CELLPADDING="3" bgcolor="#CCCCFF" WIDTH="623">
|
||
<tr>
|
||
<th align="right" valign="baseline" bgcolor="#FFFFFF">$Root/src/com/ibm/icu/dev<br><font color="red">Non-Core, Non-API</font></th>
|
||
<td valign="baseline" bgcolor="#FFFFFF">Packages used for internal development:
|
||
<ul>
|
||
<li>Data: data used by tests and in building ICU</li>
|
||
<li>Demos: Calendar, Holiday, Break Iterator, Rule-based Number Format, Transformations<br>(See <a href="#tryingout">below</a> for more information about the demos.)</li>
|
||
<li>Tests: API and coverage tests of all functionality.<br>For information about running the tests, see $Root/src/com/ibm/icu/dev/test/TestAll.java.</li>
|
||
<li>Tools: tools used to build data tables, etc.</li></ul></td>
|
||
</tr>
|
||
<tr>
|
||
<th align="right" valign="baseline" bgcolor="#FFFFFF">$Root/src/com/ibm/icu/impl<br><font color="red">Core, Non-API</font></th>
|
||
<td valign="baseline" bgcolor="#FFFFFF">These are utility classes used from different ICU4J core packages.</td>
|
||
</tr>
|
||
<tr>
|
||
<th align="right" valign="baseline" bgcolor="#FFFFFF">$Root/src/com/ibm/icu/lang<br><font color="red">Core, API</font></th>
|
||
<td valign="baseline" bgcolor="#FFFFFF">Character properties package.</td>
|
||
</tr>
|
||
<tr>
|
||
<th align="right" valign="baseline" bgcolor="#FFFFFF">$Root/src/com/ibm/icu/math<br><font color="red">Core, API</font></th>
|
||
<td valign="baseline" bgcolor="#FFFFFF">Additional math classes.</td>
|
||
</tr>
|
||
<tr>
|
||
<th align="right" valign="baseline" bgcolor="#FFFFFF">$Root/src/com/ibm/icu/text<br><font color="red">Core, API</font></th>
|
||
<td valign="baseline" bgcolor="#FFFFFF">Additional text classes. These add to, and in some cases replace, related core Java classes:
|
||
<ul>
|
||
<li>Arabic shaping
|
||
<li>Break iteration
|
||
<li>Date formatting
|
||
<li>Number formatting
|
||
<li>Transliteration
|
||
<li>Normalization
|
||
<li>String manipulation
|
||
<li>Collation
|
||
<li>String search
|
||
<li>Unicode compression
|
||
<li>Unicode sets
|
||
</ul>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th align="right" valign="baseline" bgcolor="#FFFFFF">$Root/src/com/ibm/icu/util<br><font color="red">Core, API</font></th>
|
||
<td valign="baseline" bgcolor="#FFFFFF">Additional utility classes:
|
||
<ul>
|
||
<li>Calendars - Gregorian, Buddhist, Hebrew, Islamic, Japanese
|
||
<li>Holiday</li>
|
||
<li>TimeZone</li>
|
||
<li>VersionInfo</li>
|
||
<li>Iteration</li>
|
||
</ul>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th align="right" valign="baseline" bgcolor="#FFFFFF">$Root/src/com/ibm/richtext<br><font color="red">RichText</font></th>
|
||
<td valign="baseline" bgcolor="#FFFFFF">Styled text editing
|
||
package. This includes demos, tests, and GUIs for editing and
|
||
displaying styled text. The richtext package provides a
|
||
scrollable display, typing, arrow-key support, tabs, alignment and
|
||
justification, word- and sentence-selection (by double-clicking
|
||
and triple-clicking, respectively), text styles, clipboard
|
||
operations (cut, copy and paste) and a log of changes for
|
||
undo-redo. Richtext uses Java's TextLayout and complex
|
||
text support (provided to Sun by the ICU4J team).</td>
|
||
</tr>
|
||
</table>
|
||
|
||
<p><b>Building ICU4J creates and populates the following directories:</b></p>
|
||
|
||
<table frame="void" CELLPADDING="3" bgcolor="#CCCCFF">
|
||
<tr>
|
||
<th align="right" valign="baseline" bgcolor="#FFFFFF">$Root/classes</th>
|
||
<td valign="baseline" bgcolor="#FFFFFF">contains all class files</td>
|
||
</tr>
|
||
<tr>
|
||
<th align="right" valign="baseline" bgcolor="#FFFFFF">$Root/doc</th>
|
||
<td valign="baseline" bgcolor="#FFFFFF">contains JavaDoc for all packages</td>
|
||
</tr>
|
||
</table>
|
||
<br/>
|
||
<p><b>ICU4J data is stored in the following locations:</b></p>
|
||
|
||
<table frame="void" BORDER="0" CELLPADDING="3" bgcolor="#CCCCFF" WIDTH="623">
|
||
<tr>
|
||
<th align="right" valign="baseline" bgcolor="#FFFFFF"><code>com.ibm.icu.impl.data</code></th>
|
||
<td valign="baseline" bgcolor="#FFFFFF">Holds data used by the ICU4J core packages (<code>com.ibm.icu.lang</code>, <code>com.ibm.icu.text</code>, <code>com.ibm.icu.util</code>, <code>com.ibm.icu.math</code> and <code>com.ibm.icu.text</code>). In particular, all resource information is stored here.</td>
|
||
</tr>
|
||
<tr>
|
||
<th align="right" valign="baseline" bgcolor="#FFFFFF"><code>com.ibm.icu.dev.data</code></th>
|
||
<td valign="baseline" bgcolor="#FFFFFF">Holds data that is not part of ICU4J core, but rather part of a test, sample, or demo.</td>
|
||
</tr>
|
||
</table>
|
||
<br/>
|
||
<h3 class="doc"><a name="API"></a>Where to get Documentation</h3>
|
||
|
||
<p>The <a href="http://oss.software.ibm.com/icu/userguide/">ICU user's guide</a> contains lots of general information about ICU, in its C, C++, and Java incarnations.</p>
|
||
|
||
<p>The complete API documentation for ICU4J (javadoc) is available on the ICU4J web site, and can be built from the sources:
|
||
|
||
<ul>
|
||
<li><a href="http://oss.software.ibm.com/icu4j/doc/index.html">Index to all ICU4J API</a></li>
|
||
<li>International Calendars – <a href="http://oss.software.ibm.com/icu4j/doc/com/ibm/icu/util/IslamicCalendar.html">Islamic</a>,
|
||
<a href="http://oss.software.ibm.com/icu4j/doc/com/ibm/icu/util/BuddhistCalendar.html">Buddhist</a>, <a
|
||
href="http://oss.software.ibm.com/icu4j/doc/com/ibm/icu/util/HebrewCalendar.html">Hebrew</a>, <a
|
||
href="http://oss.software.ibm.com/icu4j/doc/com/ibm/icu/util/JapaneseCalendar.html">Japanese</a>.</li>
|
||
<li><a href="http://oss.software.ibm.com/icu4j/doc/com/ibm/icu/text/Normalizer.html">Unicode Normalization</a> –
|
||
Canonical text representation for W3C.</li>
|
||
<li><a href="http://oss.software.ibm.com/icu4j/doc/com/ibm/icu/text/NumberFormat.html">Number Format Enhancements</a> –
|
||
Scientific Notation, Spelled out.</li>
|
||
<li><a href="http://oss.software.ibm.com/icu4j/doc/com/ibm/icu/text/BreakIterator.html">Enhanced word-break detection</a>
|
||
– Rule-based, supports Thai</li>
|
||
<li><a href="http://oss.software.ibm.com/icu4j/doc/com/ibm/icu/text/Transliterator.html">Transliteration</a> – A general framework for onverting text from one format to another, e.g. Cyrillic to Latin, or Hex to Unicode.
|
||
<li>Unicode Text <a href="http://oss.software.ibm.com/icu4j/doc/com/ibm/icu/text/UnicodeCompressor.html">Compression</a> &
|
||
<a href="http://oss.software.ibm.com/icu4j/doc/com/ibm/icu/text/UnicodeDecompressor.html">Decompression</a> – 2:1
|
||
compression on English Unicode text.</li>
|
||
<li>Collation - <a href="http://oss.software.ibm.com/icu4j/doc/com/ibm/icu/text/RuleBasedCollator.html">Rule-based sorting</a>, <a href="http://oss.software.ibm.com/icu4j/doc/com/ibm/icu/text/StringSearch.html">Efficient multi-lingual searching</a> </li>
|
||
</ul>
|
||
|
||
<h3 class="doc"><a NAME="HowToInstallJavac"></a>How to Install and Build</h3>
|
||
|
||
<p>To install ICU4J, simply place the prebuilt jar file <strong>icu4j.jar</strong> on your
|
||
Java CLASSPATH. No other files are needed.</p>
|
||
|
||
<p><b>Eclipse users:</b> See the ICU4J site for information on<a href="http://oss.software.ibm.com/icu/docs/eclipse_howto/eclipse_howto.htm">
|
||
how to configure Eclipse</a> to build ICU4J.</p>
|
||
|
||
<p>To build ICU4J, you will need a Java2 JDK and the Ant build system.
|
||
We strongly recommend using the Ant build system to build ICU4J:</p>
|
||
|
||
<ul>
|
||
<li>It's recommended to install both the JDK and Ant somewhere <em>outside</em> the ICU4J
|
||
directory. For example, on Linux you might install these
|
||
in /usr/local.</li>
|
||
<li>Install a recent JDK, version 1.4.x will work.</li>
|
||
<li><p>Next install the <a href="http://ant.apache.org/"><strong>Ant</strong></a> build
|
||
system. Ant is a portable, Java-based build system similar to make. ICU4J uses Ant
|
||
because it introduces no other dependencies, it's portable, and it's easier to manage than
|
||
a collection of makefiles. We currently build ICU4J using a single makefile on both
|
||
Windows 9x and Linux using Ant. The build system requires Ant 1.5 or later.</p>
|
||
<p>Installing Ant is straightforward. Download it (see <a
|
||
href="http://ant.apache.org/bindownload.cgi">http://ant.apache.org/bindownload.cgi</a>),
|
||
extract it onto your system, set some environment variables, and add its bin directory to
|
||
your path. For example:
|
||
<pre> set JAVA_HOME=C:\jdk1.4.1
|
||
set ANT_HOME=C:\ant
|
||
set PATH=%PATH%;%ANT_HOME%\bin</pre></p>
|
||
<p>See the current Ant documentation for details.</p>
|
||
</li>
|
||
</ul>
|
||
|
||
<p>Once the JDK and Ant are installed, building is just a matter of
|
||
typing <strong>ant</strong> in the ICU4J root directory. This causes
|
||
the Ant build system to perform a build as specified by the file
|
||
<strong>build.xml</strong>, located in the ICU4J root directory. You
|
||
can give Ant options like -verbose, and you can specify targets. Ant
|
||
will only build what's been changed and will resolve dependencies
|
||
properly. For example:</p>
|
||
<blockquote>
|
||
<pre>F:\icu4j>ant tests
|
||
Buildfile: build.xml
|
||
Project base dir set to: F:\icu4j
|
||
Executing Target: core
|
||
Compiling 71 source files to F:\icu4j\classes
|
||
Executing Target: tests
|
||
Compiling 24 source files to F:\icu4j\classes
|
||
Completed in 19 seconds</pre>
|
||
</blockquote>
|
||
|
||
<p>The following are some targets that you can provide to <b>ant</b>. For more
|
||
targets, see the build.xml file:</p>
|
||
<table frame="void" BORDER="0" CELLPADDING="3" bgcolor="#CCCCFF" WIDTH="623">
|
||
<tr>
|
||
<th align="right" valign="baseline" bgcolor="#FFFFFF">all</th>
|
||
<td valign="baseline" bgcolor="#FFFFFF">Build all targets.</td>
|
||
</tr>
|
||
<tr>
|
||
<th align="right" valign="baseline" bgcolor="#FFFFFF">core</th>
|
||
<td valign="baseline" bgcolor="#FFFFFF">Build the main class files in the subdirectory <strong>classes</strong>. If no target
|
||
is specified, core is assumed.</td>
|
||
</tr>
|
||
<tr>
|
||
<th align="right" valign="baseline" bgcolor="#FFFFFF">tests</th>
|
||
<td valign="baseline" bgcolor="#FFFFFF">Build the test class files.</td>
|
||
</tr>
|
||
<tr>
|
||
<th align="right" valign="baseline" bgcolor="#FFFFFF">demos</th>
|
||
<td valign="baseline" bgcolor="#FFFFFF">Build the demos.</td>
|
||
</tr>
|
||
<tr>
|
||
<th align="right" valign="baseline" bgcolor="#FFFFFF">tools</th>
|
||
<td valign="baseline" bgcolor="#FFFFFF">Build the tools.</td>
|
||
</tr>
|
||
<tr>
|
||
<th align="right" valign="baseline" bgcolor="#FFFFFF">docs</th>
|
||
<td valign="baseline" bgcolor="#FFFFFF">Run javadoc over the main class files, generating an HTML documentation tree in the
|
||
subdirectory <strong>doc</strong>.</td>
|
||
</tr>
|
||
<tr>
|
||
<th align="right" valign="baseline" bgcolor="#FFFFFF">jar</th>
|
||
<td valign="baseline" bgcolor="#FFFFFF">Create a jar archive <strong>icu4j.jar</strong> in the root ICU4J directory containing
|
||
the main class files.</td>
|
||
</tr>
|
||
<tr>
|
||
<th align="right" valign="baseline" bgcolor="#FFFFFF">jarSrc</th>
|
||
<td valign="baseline" bgcolor="#FFFFFF">Like the <strong>jar</strong> target, but containing only the source files.
|
||
</tr>
|
||
<tr>
|
||
<th align="right" valign="baseline" bgcolor="#FFFFFF">jarDocs</th>
|
||
<td valign="baseline" bgcolor="#FFFFFF">Like the <strong>jar</strong> target, but containing only the docs.
|
||
</tr>
|
||
<tr>
|
||
<th align="right" valign="baseline" bgcolor="#FFFFFF">richedit</th>
|
||
<td valign="baseline" bgcolor="#FFFFFF">Build the richedit core class files and tests.
|
||
</tr>
|
||
<tr>
|
||
<th align="right" valign="baseline" bgcolor="#FFFFFF">richeditJar</th>
|
||
<td valign="baseline" bgcolor="#FFFFFF">Create the richedit jar file (which contains only the richedit core class files).
|
||
The file <strong>richedit.jar</strong>
|
||
will be created in the <strong>./richedit</strong> subdirectory. Any existing file of
|
||
that name will be overwritten.</td>
|
||
</tr>
|
||
<tr>
|
||
<th align="right" valign="baseline" bgcolor="#FFFFFF">richeditZip</th>
|
||
<td valign="baseline" bgcolor="#FFFFFF">Create a zip archive of the richedit docs and jar file for distribution. The zip file <strong>richedit.zip</strong>
|
||
will be created in the <strong>./richedit</strong> subdirectory. Any existing file of
|
||
that name will be overwritten.</td>
|
||
</tr>
|
||
<tr>
|
||
<th align="right" valign="baseline" bgcolor="#FFFFFF">clean</th>
|
||
<td valign="baseline" bgcolor="#FFFFFF">Remove all built targets, leaving the source.</td>
|
||
</tr>
|
||
</table>
|
||
|
||
<p>For more information, read the Ant documentation and the <strong>build.xml</strong>
|
||
file.</p>
|
||
|
||
<p>After doing a build it is a good idea to run all the icu4j tests by typing <br>"java
|
||
-classpath $Root/classes -DUnicodeData=$Root/src/com/ibm/icu/dev/data/unicode com.ibm.dev.test.TestAll".</p>
|
||
|
||
<p>(If you are allergic to build systems, as an alternative to using
|
||
Ant you can build by running javac and javadoc directly. This
|
||
is not recommended. You may have to manually create destination
|
||
directories.)</p>
|
||
|
||
<h3 class="doc"><a name="HowToModularize"></a>How to modularize ICU4J</h3>
|
||
<p>Some clients may not wish to ship all of ICU4J with their application, since the application might only use a small part of ICU4J.
|
||
ICU4J release 2.6 and later provide build options to build individual ICU4J 'modules' for a more compact distribution.
|
||
The modules are based on a service and the APIs that define it, e.g.,
|
||
the normalizer module supports all the APIs of the Normalizer class (and some others).
|
||
Tests can be run to verify that the APIs supported by the module function correctly.
|
||
Because of internal code dependencies, a module contains extra classes that are not part of the module's core service API.
|
||
Some or most of the APIs of these extra classes will not work. <b>Only the module's core service API is
|
||
guaranteed.</b> Other APIs may work partially or not at all, so client code should avoid them.</p>
|
||
<p>
|
||
Individual modules are not built directly into their own separate jar files. Since their dependencies
|
||
often overlap, using separate modules to 'add on' ICU4J functionality would result in
|
||
unwanted duplication of class files. Instead, building a module causes a subset of ICU4J's
|
||
classes to be built and put into ICU4J's standard
|
||
build directory. After one or more module targets are built, the 'moduleJar' target can then be
|
||
built, which packages the class files into a 'module jar.' Other than the fact that it
|
||
contains fewer class files, little distinguishes this jar file from a full ICU4J jar file,
|
||
and in fact they share the same name.</p>
|
||
<p>
|
||
Currently ICU4J can be divided into the following modules:
|
||
</p>
|
||
|
||
<p><b>Key:</b><br/>
|
||
<table frame="void" cellpadding="3" bgcolor="#CCCCFF" WIDTH="623">
|
||
<tr>
|
||
<th align="left" valign="baseline"><b>Module Name</b></th>
|
||
<th align="left" valign="baseline"><b>Ant Targets</b></th>
|
||
<th align="left" valign="baseline"><b>Test Package Supported</b></th>
|
||
<th align="right" valign="baseline"><b>Size‡</b></th>
|
||
</tr>
|
||
<tr bgcolor="#FFFFFF">
|
||
<td colspan="4">
|
||
<table>
|
||
<tr>
|
||
<td valign="baseline">Package*</td>
|
||
<td valign="baseline">Main Classes†
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<b>
|
||
<font size=2>
|
||
* com.ibm. should be prepended to the package names listed.
|
||
<br>† A bold class name core service APIs. Only APIs
|
||
in these classes are fully supported.
|
||
<br>‡ Sizes are of the compressed jar file containing only this module. Full size is 2,727 K.
|
||
</font>
|
||
</b>
|
||
</p>
|
||
<p><b>Modules:</b><br/>
|
||
<table frame="void" cellpadding="3" bgcolor="#CCCCFF" WIDTH="623">
|
||
<tr>
|
||
<th align="left" valign="baseline">Normalizer</th>
|
||
<td align="left" valign="baseline">normalizer, normalizerTests</td>
|
||
<td align="left" valign="baseline">com.ibm.icu.dev.test.normalizer</td>
|
||
<td align="right" valign="baseline">427 KB</td>
|
||
</tr>
|
||
<tr bgcolor="#FFFFFF">
|
||
<td valign="top" colspan="4">
|
||
<table border="0" cellpadding="5">
|
||
<tr>
|
||
<td valign="baseline">icu.lang:</td>
|
||
<td valign="baseline">UCharacter, UCharacterCategory, UCharacterDirection,
|
||
UCharacterNameIterator, UCharacterTypeIterator, UProperty, UScript</td>
|
||
</tr>
|
||
<tr>
|
||
<td valign="baseline">icu.text:</td>
|
||
<td valign="baseline"><b>Normalizer</b>, Replaceable, ReplaceableString, <b>UCharacterIterator</b>,
|
||
<b>UForwardCharacterIterator</b>, UnicodeFilter, UnicodeMatcher, UnicodeSet,
|
||
UnicodeSetIterator, UTF16</td>
|
||
</tr>
|
||
<tr>
|
||
<td valign="baseline">icu.util:</td>
|
||
<td valign="baseline">ValueIterator, VersionInfo</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<th align="left" valign="baseline">Collator</th>
|
||
<td align="left" valign="baseline">collator, collatorTests</td>
|
||
<td align="left" valign="baseline">com.ibm.icu.dev.test.collator</td>
|
||
<td align="right" valign="baseline">1,412 KB</td>
|
||
</tr>
|
||
<tr bgcolor="#FFFFFF">
|
||
<td valign="top" colspan="4">
|
||
<table border="0" cellpadding="5">
|
||
<tr>
|
||
<td valign="baseline">icu.lang:</td>
|
||
<td valign="baseline">UCharacter, UCharacterCategory, UCharacterDirection,
|
||
UCharacterNameIterator, UCharacterTypeIterator, lang.UProperty, UScript
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td valign="baseline">icu.text:</td>
|
||
<td valign="baseline">BreakDictionary, BreakIterator, BreakIteratorFactory,
|
||
CanonicalIterator, <b>CollationElementIterator</b>, <b>CollationKey</b>,
|
||
<b>CollationParsedRuleBuilder</b>, <b>CollationRuleParser</b>, <b>Collator</b>,
|
||
<b>CollatorReader</b>, DictionaryBasedBreakIterator, <b>Normalizer</b>,
|
||
Replaceable, ReplaceableString, RuleBasedBreakIterator, <b>RuleBasedCollator</b>,
|
||
<b>SearchIterator</b>, <b>StringSearch</b>, <b>UCharacterIterator</b>,
|
||
<b>UForwardCharacterIterator</b>, UnicodeFilter, UnicodeMatcher, UnicodeSet,
|
||
UnicodeSetIterator, UTF16
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td valign="baseline">icu.util:</td>
|
||
<td valign="baseline">ValueIterator, VersionInfo
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th align="left" valign="baseline">Calendar</th>
|
||
<td align="left" valign="baseline">calendar, calendarTests</td>
|
||
<td align="left" valign="baseline">com.ibm.icu.dev.test.calendar</td>
|
||
<td align="right" valign="baseline">1,338 KB</td>
|
||
</tr>
|
||
<tr bgcolor="#FFFFFF">
|
||
<td valign="top" colspan="4">
|
||
<table border="0" cellpadding="5">
|
||
<tr>
|
||
<td valign="baseline">icu.lang:</td>
|
||
<td valign="baseline">UCharacter, UCharacterCategory, UCharacterDirection, UCharacterNameIterator,
|
||
UCharacterTypeIterator, UProperty, UScript
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td valign="baseline">icu.math:</td>
|
||
<td valign="baseline"><b>BigDecimal</b>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td valign="baseline">icu.text:</td>
|
||
<td valign="baseline">BreakIterator, <b>ChineseDateFormat</b>, <b>ChineseDateFormatSymbols</b>,
|
||
<b>DateFormat</b>, <b>DateFormatSymbols</b>, <b>DecimalFormat</b>, <b>DecimalFormatSymbols</b>,
|
||
Normalizer, NumberFormat, Replaceable, ReplaceableString, <b>SimpleDateFormat</b>,
|
||
<b>UCharacterIterator</b>, <b>UForwardCharacterIterator</b>, UnicodeFilter, UnicodeMatcher,
|
||
UnicodeSet, UnicodeSetIterator, UTF16
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td valign="baseline">icu.util:</td>
|
||
<td valign="baseline"><b>BuddhistCalendar</b>, <b>Calendar</b>, <b>CalendarAstronomer</b>,
|
||
<b>CalendarCache</b>, <b>CalendarFactory</b>, <b>ChineseCalendar</b>, <b>Currency</b>,
|
||
<b>DateRule</b>, <b>EasterHoliday</b>, <b>EasterRule</b>, <b>GregorianCalendar</b>,
|
||
<b>HebrewCalendar</b>, <b>HebrewHoliday</b>, <b>Holiday</b>, <b>IslamicCalendar</b>,
|
||
<b>JapaneseCalendar</b>, <b>RangeDateRule</b>, <b>SimpleDateRule</b>, <b>SimpleHoliday</b>,
|
||
<b>SimpleTimeZone</b>, <b>SimpleTimeZoneAdapter</b>, <b>TimeZone</b>, <b>TimeZoneData</b>,
|
||
ValueIterator, VersionInfo
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th align="left" valign="baseline">BreakIterator</th>
|
||
<td align="left" valign="baseline">breakIterator, breakIteratorTests</td>
|
||
<td align="left" valign="baseline">com.ibm.icu.dev.test.breakiterator</td>
|
||
<td align="right" valign="baseline">1,290 KB</td>
|
||
</tr>
|
||
<tr bgcolor="#FFFFFF">
|
||
<td valign="top" colspan="4">
|
||
<table border="0" cellpadding="5">
|
||
<tr>
|
||
<td valign="baseline">icu.lang:</td>
|
||
<td valign="baseline">UCharacter, UCharacterCategory, UCharacterDirection,
|
||
UCharacterNameIterator, UCharacterTypeIterator, UProperty, UScript
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td valign="baseline">icu.text:</td>
|
||
<td valign="baseline"><b>BreakDictionary</b>, <b>BreakIterator</b>, <b>BreakIteratorFactory</b>,
|
||
<b>DictionaryBasedBreakIterator</b>, Normalizer, Replaceable, ReplaceableString,
|
||
<b>text.RuleBasedBreakIterator</b>, UCharacterIterator, UForwardCharacterIterator,
|
||
UnicodeFilter, UnicodeMatcher, UnicodeSet, UnicodeSetIterator, UTF16
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td valign="baseline">icu.util:</td>
|
||
<td valign="baseline">RangeValueIterator, ValueIterator, VersionInfo
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th align="left" valign="baseline">Basic Properties</th>
|
||
<td align="left" valign="baseline">propertiesBasic, propertiesTests</td>
|
||
<td align="left" valign="baseline">com.ibm.icu.dev.test.lang</td>
|
||
<td align="right" valign="baseline">500 KB</td>
|
||
</tr>
|
||
<tr bgcolor="#FFFFFF">
|
||
<td valign="top" colspan="4">
|
||
<table border="0" cellpadding="5">
|
||
<tr>
|
||
<td valign="baseline">icu.lang:</td>
|
||
<td valign="baseline"><b>UCharacter</b>, <b>UCharacterCategory</b>, <b>UCharacterDirection</b>,
|
||
<b>UCharacterNameIterator</b>, <b>UCharacterTypeIterator</b>, <b>UProperty</b>, <b>UScript</b>,
|
||
<b>UScriptRun</b>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td valign="baseline">icu.text:</td>
|
||
<td valign="baseline">BreakDictionary, BreakIterator, BreakIteratorFactory, DictionaryBasedBreakIterator,
|
||
Normalizer, Replaceable, ReplaceableString, RuleBasedBreakIterator, SymbolTable, UCharacterIterator,
|
||
UForwardCharacterIterator, UnicodeFilter, UnicodeMatcher, UnicodeSet, UnicodeSetIterator, <b>UTF16</b>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td valign="baseline">icu.util:</td>
|
||
<td valign="baseline">CompactByteArray, RangeValueIterator, ValueIterator, VersionInfo
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th align="left" valign="baseline">Full Properties</th>
|
||
<td align="left" valign="baseline">propertiesFull, propertiesTests</td>
|
||
<td align="left" valign="baseline">com.ibm.icu.dev.test.lang</td>
|
||
<td align="right" valign="baseline">1,240 KB</td>
|
||
</tr>
|
||
<tr bgcolor="#FFFFFF">
|
||
<td valign="top" colspan="4">
|
||
<table border="0" cellpadding="5">
|
||
<tr>
|
||
<td valign="baseline">icu.lang:</td>
|
||
<td valign="baseline"><b>UCharacter</b>, <b>UCharacterCategory</b>, <b>UCharacterDirection</b>,
|
||
<b>UCharacterNameIterator</b>, <b>UCharacterTypeIterator</b>, <b>UProperty</b>, <b>UScript</b>,
|
||
<b>UScriptRun</b>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td valign="baseline">icu.text:</td>
|
||
<td valign="baseline">BreakDictionary, BreakIterator, BreakIteratorFactory, DictionaryBasedBreakIterator,
|
||
<b>Normalizer</b>, <b>Replaceable</b>, <b>ReplaceableString</b>, RuleBasedBreakIterator,
|
||
<b>UCharacterIterator</b>, <b>UForwardCharacterIterator</b>, <b>UnicodeFilter</b>, <b>UnicodeMatcher</b>,
|
||
<b>UnicodeSet</b>, <b>UnicodeSetIterator</b>, <b>UTF16<b>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td valign="baseline">icu.util:</td>
|
||
<td valign="baseline"><b>RangeValueIterator</b>, <b>ValueIterator</b>, <b>VersionInfo</b>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th align="left" valign="baseline">Formatting</th>
|
||
<td align="left" valign="baseline">format, formatTests</td>
|
||
<td align="left" valign="baseline">com.ibm.icu.dev.test.format</td>
|
||
<td align="right" valign="baseline">2,208 KB</td>
|
||
</tr>
|
||
<tr bgcolor="#FFFFFF">
|
||
<td valign="top" colspan="4">
|
||
<table border="0" cellpadding="5">
|
||
<tr>
|
||
<td valign="baseline">icu.lang:</td>
|
||
<td valign="baseline">UCharacter, UCharacterCategory, UCharacterDirection, UCharacterNameIterator,
|
||
UCharacterTypeIterator, UProperty, UScript
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td valign="baseline">icu.math:</td>
|
||
<td valign="baseline"><b>math.BigDecimal</b>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td valign="baseline">icu.text:</td>
|
||
<td valign="baseline">BreakIterator, CanonicalIterator, ChineseDateFormat, ChineseDateFormatSymbols,
|
||
CollationElementIterator, CollationKey, CollationParsedRuleBuilder, CollationRuleParser, Collator,
|
||
CollatorReader, <b>DateFormat</b>, <b>DateFormatSymbols</b>, <b>DecimalFormat</b>, <b>DecimalFormatSymbols</b>,
|
||
Normalizer, <b>NumberFormat</b>, Replaceable, ReplaceableString, RuleBasedCollator,
|
||
<b>RuleBasedNumberFormat</b>, <b>SimpleDateFormat</b>, <b>UCharacterIterator</b>,
|
||
<b>UForwardCharacterIterator</b>, UnicodeFilter, UnicodeMatcher, UnicodeSet, UnicodeSetIterator, UTF16
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td valign="baseline">icu.util:</td>
|
||
<td valign="baseline"><b>Calendar</b>, <b>CalendarAstronomer</b>, <b>CalendarCache</b>, <b>CalendarFactory</b>,
|
||
<b>ChineseCalendar</b>, <b>Currency</b>, <b>GregorianCalendar</b>, <b>RangeValueIterator</b>,
|
||
<b>SimpleTimeZone</b>, <b>SimpleTimeZoneAdapter</b>, <b>TimeZone</b>, <b>TimeZoneData</b>,
|
||
ValueIterator,VersionInfo
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th align="left" valign="baseline">Transforms</th>
|
||
<td align="left" valign="baseline">transliterator, transliteratorTests</td>
|
||
<td align="left" valign="baseline">com.ibm.icu.dev.test.translit</td>
|
||
<td align="right" valign="baseline">1,482 KB</td>
|
||
</tr>
|
||
<tr bgcolor="#FFFFFF">
|
||
<td valign="top" colspan="4">
|
||
<table border="0" cellpadding="5">
|
||
<tr>
|
||
<td valign="baseline">icu.lang:</td>
|
||
<td valign="baseline"><b>UCharacter</b>, <b>UCharacterCategory</b>,
|
||
<b>UCharacterDirection</b>, <b>UCharacterNameIterator</b>,
|
||
<b>UCharacterTypeIterator</b>, <b>UProperty</b>, <b>UScript</b>,
|
||
<b>UScriptRun</b>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td valign="baseline">icu.text:</td>
|
||
<td valign="baseline"><b>AnyTransliterator</b>, <b>BreakDictionary</b>,
|
||
<b>BreakIterator</b>, <b>BreakIteratorFactory</b>, <b>BreakTransliterator</b>,
|
||
<b>DictionaryBasedBreakIterator</b>, <b>Normalizer</b>, <b>Replaceable</b>,
|
||
<b>ReplaceableString</b>, <b>RuleBasedBreakIterator</b>, <b>StringReplacer</b>,
|
||
<b>Transliterator</b>, <b>UCharacterIterator</b>, <b>UForwardCharacterIterator</b>,
|
||
<b>UnicodeSet</b>, <b>UnicodeSetIterator</b>, <b>UTF16</b>
|
||
<td>
|
||
</tr>
|
||
<tr>
|
||
<td valign="baseline">icu.util:</td>
|
||
<td valign="baseline"><b>RangeValueIterator</b>, <b>ValueIterator</b>,
|
||
<b>VersionInfo</b>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<!-- tr>
|
||
<th align="left" valign="baseline"><b>Module Name</b></th>
|
||
<th align="left" valign="baseline"><b>Ant Targets</b></th>
|
||
<th align="left" valign="baseline"><b>Test Package Supported</b></th>
|
||
<th align="right" valign="baseline"><b>Size</b></th>
|
||
</tr -->
|
||
</table>
|
||
</p>
|
||
|
||
<p>Building any of these modules is as easy as specifying a build target to the Ant build system, e.g:
|
||
<br>To build a module that contains only the Normalizer API:
|
||
<ol>
|
||
<li> Build the module. <br> <code> ant normalizer </code> </li>
|
||
<li> Build the jar containing the module. <br> <code>ant moduleJar </code>
|
||
<li> Build the tests for the module. <br> <code> ant normalizerTests </code> </li>
|
||
<li> Run the tests and verify that the self tests pass. <br> <code> java -classpath $icu4j_root/classes com.ibm.icu.dev.test.TestAll -nothrow -w </code>
|
||
</ol>
|
||
|
||
If more than one module is required, the module build targets can be concatenated, e.g:
|
||
<ol>
|
||
<li> Build the modules. <br> <code> ant normalizer collator </code> </li>
|
||
<li> Build the jar containing the modules. <br> <code>ant moduleJar </code>
|
||
<li> Build the tests for the module. <br> <code> ant normalizerTests collatorTests </code> </li>
|
||
<li> Run the tests and verify that they pass. <br> <code> java -classpath $icu4j_root/classes com.ibm.icu.dev.test.TestAll -nothrow -w </code>
|
||
</ol>
|
||
The jar should be built before the tests, since for some targets building the tests will cause additional classes to be compiled that are not strictly necessary for the module itself.
|
||
</p>
|
||
<h5> Notes: </h5>
|
||
<ul>
|
||
<li>Regardless of whether ICU4J is built as a whole or as modules, the jar file produced is named <em>icu4j.jar</em>.</li>
|
||
<li>To ascertain if an icu4j.jar contains all of ICU4J or not, please see the manifest file in the jar</li>
|
||
<li>The target moduleJar does not depend on any other target. It just creates a jar of all class files under
|
||
$icu4j_root/classes/com/ibm/icu/, excluding the classs files in $icu4j_root/classes/com/ibm/icu/dev folder</li>
|
||
<li>The list of module build targets can be obtained by running the command : <code> ant -projecthelp </code> </li>
|
||
</ul>
|
||
|
||
<h3 class="doc"><a name="tryingout"></a>Trying Out ICU4J</h3>
|
||
|
||
<p><strong>Note:</strong> the demos provided with ICU4J are for the
|
||
most part undocumented. This list can show you where to look, but you'll
|
||
have to experiment a bit. The demos (with the
|
||
exception of richedit) are <strong>unsupported</strong> and may change
|
||
or disappear without notice.</p>
|
||
<p>The icu4j.jar file contains only the core ICU4J classes, not the
|
||
demo classes, so unless you build ICU4J there is little to try out.
|
||
|
||
<h4>Rich Edit</h4>
|
||
To try out the <strong>richedit</strong> package, first build the richeditJar target.
|
||
This is a 'runnable' jar file. To run the richedit demo, type:
|
||
<tt><blockquote> java -jar $Root/richedit/richedit.jar</blockquote></tt>
|
||
|
||
This will present an empty edit pane with an awt interface.</p>
|
||
|
||
<p>With a fuller command line you can try out other options, for example:
|
||
<tt><blockquote> java -classpath $Root/richedit/richedit.jar com.ibm.richtext.demo.EditDemo [-swing][file]</blockquote></tt>
|
||
This will use an awt GUI, or a swing GUI if
|
||
<tt>-swing</tt> is passed on the command line. It will open a text
|
||
file if one is provided, otherwise it will open a blank page. Click
|
||
to type.</p>
|
||
<p>
|
||
You can add tabs to the tab ruler by clicking in the ruler while holding down the control key.
|
||
Clicking on an existing tab changes between left, right, center, and decimal tabs. Dragging
|
||
a tab moves it, dragging it off the ruler removes it.</p>
|
||
<p>
|
||
You can experiment with complex text by using the keymap functions.
|
||
Please note that these are mainly for demo purposes, for real work
|
||
with Arabic or Hebrew you will want to use an input method. You will
|
||
need to use a font that supports Arabic or Hebrew, 'Lucida Sans' (provided
|
||
with Java) supports these languages.</p>
|
||
|
||
<h4>Other demos</h4>
|
||
<p>The other demo programs are <strong>not supported</strong> and exist only to let you
|
||
experiment with the ICU4J classes. First, build ICU4J using <tt>ant all</tt>. Then try
|
||
one of the following:
|
||
<ul>
|
||
<li><tt>java -classpath classes com.ibm.icu.dev.demo.calendar.CalendarApp</tt>
|
||
<li><tt>java -classpath classes com.ibm.icu.dev.demo.holiday.HolidayCalendarDemo</tt>
|
||
<li><tt>java -classpath classes com.ibm.icu.dev.demo.rbbi.TextBoundDemo</tt><br>(Click in the text, then use <tt>ctrl-N</tt> and <tt>ctrl-P</tt> to select the next or previous block of text.)
|
||
<li><tt>java -classpath classes com.ibm.icu.dev.demo.rbnf.RbnfDemo</tt>
|
||
<li><tt>java -classpath classes com.ibm.icu.dev.demo.translit.Demo</tt>
|
||
</ul>
|
||
</p>
|
||
|
||
<h3 class="doc"><a name="resources">ICU4J Resource Information</a></h3>
|
||
Starting with release 2.1, ICU4J includes its own
|
||
resource information
|
||
which is completely independent of the JDK resource information. The
|
||
new ICU4J information is equivalent to the information in ICU4C and many
|
||
resources are, in fact, the same binary files that ICU4C uses.
|
||
</p>
|
||
<p>
|
||
By default the ICU4J distribution includes all of the standard resource
|
||
information. It is located under the directory com/ibm/icu/impl/data.
|
||
Depending on the service, the data is in different locations and in
|
||
different formats. <strong>Note:</strong> This will continue to change
|
||
from release to release, so clients should not depend on the exact organization
|
||
of the data in ICU4J.</p>
|
||
|
||
<ul>
|
||
<li>The primary <b>locale data</b> is under the directory
|
||
<tt>icudt30b</tt>, as a set of <tt>".res"</tt> files whose names are
|
||
the locale identifiers. Locale naming is documented the
|
||
<code>com.ibm.icu.util.ULocale</code> class, and the use of these
|
||
names in searching for resources is documented in
|
||
<code>java.util.ResourceBundle</code>.
|
||
<li>The <b>collation data</b> is under the directory
|
||
<tt>icudt30b/coll</tt>, also as a set of <tt>".res"</tt> files named
|
||
by locale identifiers.
|
||
<li>The <b>rule-based transliterator data</b> is directly under the
|
||
<tt>data</tt> directory, as a set of <tt>".txt"</tt> files whose names
|
||
start with the string <tt>"Transliterator_"</tt> followed by the
|
||
source and target transliterator IDs.
|
||
<li>The <b>break iterator data</b> is also directly under the data
|
||
directory, as a set of <tt>".brk"</tt> files, variously named. The
|
||
default break iterator class resource bundles are also here.
|
||
<li>The <b>holiday data</b> is under the <tt>data</tt> directory, as a
|
||
set of <tt>".class"</tt> files, named <tt>"HolidayBundle_"</tt>
|
||
followed by the locale ID.
|
||
<li>The <b>character property data</b> as well as assorted
|
||
<b>normalization data</b> and default <b>unicode collation algorithm
|
||
(UCA) data</b> is found under the <tt>data</tt> directory as a set of
|
||
<tt>".icu"</tt> files, variously named.
|
||
</ul>
|
||
</p>
|
||
|
||
<p>
|
||
Some of the data files alias or otherwise reference data from other
|
||
data files. One reason for this is because some locale names have
|
||
changed. For example, <tt>he_IL</tt> used to be <tt>iw_IL</tt>. In
|
||
order to support both names but not duplicate the data, one of the
|
||
resource files refers to the other file's data. In other cases, a
|
||
file may alias a portion of another file's data in order to save
|
||
space. Currently ICU4J provides no tool for revealing these
|
||
dependencies.</p> <blockquote><strong>Note:</strong> Java's
|
||
<code>Locale</code> class silently converts the language code
|
||
<tt>"he"</tt> to <tt>"iw"</tt> when you construct the Locale. Thus
|
||
Java cannot be used to locate resources that use the <tt>"he"</tt>
|
||
language code. ICU, on the other hand, does not perform this
|
||
conversion in ULocale, and instead uses aliasing in the locale data to
|
||
represent the same set of data under different locale
|
||
ids.</blockquote>
|
||
</p>
|
||
<p>
|
||
Resource files that use locale ids form a hierarchy, with up to four
|
||
levels: a root, language, region (country), and variant. Searches for
|
||
locale data attempt to match as far down the hierarchy as possible,
|
||
for example, <tt>"he_IL"</tt> will match <tt>he_IL</tt>, but
|
||
<tt>"he_US"</tt> will match <tt>he</tt> (since there is no <tt>US</tt>
|
||
variant for </tt>he</tt>, and <tt>"xx_YY</tt> will match root (the
|
||
default fallback locale) since there is no <tt>xx</tt> language code
|
||
in the locale hierarchy. Again, see
|
||
<code>java.util.ResourceBundle</code> for more information.
|
||
</p>
|
||
<p>
|
||
<strong>Currently ICU4J provides no tool for revealing these
|
||
dependencies</strong> between data files, so trimming the data
|
||
directly in the ICU4J project is a hit-or-miss affair. The key point
|
||
when you remove data is to make sure to remove all dependencies on
|
||
that data as well. For example, if you remove <tt>he.res</tt>, you
|
||
need to remove <tt>he_IL.res</tt>, since it is lower in the hierarchy,
|
||
and you must remove iw.res, since it references <tt>he.res</tt>, and
|
||
<tt>iw_IL.res</tt>, since it depends on it (and also references
|
||
<tt>he_IL.res</tt>).
|
||
</p>
|
||
|
||
<p>
|
||
Unfortunately, the jar tool in the JDK provides no way to remove items
|
||
from a jar file. Thus you have to extract the resources, remove the
|
||
ones you don't want, and then create a new jar file with the remining
|
||
resources. See the jar tool information for how to do this. Before
|
||
'rejaring' the files, be sure to thoroughly test your application with
|
||
the remaining resources, making sure each required resource is
|
||
present.
|
||
</p>
|
||
|
||
<h4>Using additional resource files with ICU4J</h4>
|
||
|
||
<blockquote><table frame="border" width="50%" rules="none" cellpadding="3"><tr><td><b><font size="+1" color="red">Warning:</font> Resource
|
||
file formats can change across releases of ICU4J!</b></td></tr>
|
||
<tr><td>The format of ICU4J resources is not part of the API. Clients who
|
||
develop their own resources for use with ICU4J should be prepared to
|
||
regenerate them when they move to new releases of ICU4J.</td></tr></table></blockquote>
|
||
|
||
<p>
|
||
ICU4J 3.0's resource mechanism is new for this release and we are still
|
||
developing it. Currently it is not possible to mix icu's new binary <tt>.res</tt> resources
|
||
with traditional java-style <tt>.class</tt> or <tt>.txt</tt> resources. We might
|
||
allow for this in a future release, but since the resource data and format is not formally
|
||
supported, you run the risk of incompatibilities with future releases of ICU4J.
|
||
</p>
|
||
<p>
|
||
Resource data in ICU4J is checked in to the repository as a jar file
|
||
containing the resource binaries, <tt>icudata.jar</tt>. This
|
||
means that inspecting the contents of these resources is difficult.
|
||
They currently are compiled from ICU4C <tt>.txt</tt> file data. You
|
||
can view the contents of the ICU4C text resource files to understand
|
||
the contents of the ICU4J resources.
|
||
</p>
|
||
<p>
|
||
The files in <tt>icudata.jar</tt> get extracted to <tt>com/ibm/icu/impl/data</tt> in
|
||
the build directory when the 'core' target is built. Thereafter, as
|
||
long as the file <tt>res_index.res</tt> file is untouched, they will
|
||
not be extracted again. Building the <tt>'resources'</tt> target will force the
|
||
resources to once again be extracted. Extraction will
|
||
overwrite any corresponding resource files already in that directory.
|
||
</p>
|
||
|
||
<h4>Building ICU4J Resources from ICU4C</h4>
|
||
<h5>Requirements</h5>
|
||
<ul>
|
||
<li>Compilers and tools required for building <a href="http://oss.software.ibm.com/cvs/icu/~checkout~/icu/readme.html#HowToBuild">ICU</a>.</li>
|
||
<li>Java SDK version 1.4.0 or above.</li>
|
||
<li>Perl version 5 or above.</li>
|
||
</ul>
|
||
<h5> Procedure</h5>
|
||
<ol>
|
||
<li> Download and build ICU on a Windows machine. For instructions on downloading and building ICU, please click <a href="http://oss.software.ibm.com/cvs/icu/~checkout~/icu/readme.html#HowToBuild">here</a>.</li>
|
||
<li> Change directory to <i>$icu_root</i>/source/tools/genrb </li>
|
||
<li> Launch gendtjar.pl from that directory itself with the command
|
||
<br>gendtjar.pl --icu-root=<i>$icu_root</i> --jar=<i>$jdk_home/bin</i> --icu4j-root=<i>$icu4j_root</i> --version=<i>$icu_version</i>
|
||
<br>e.g: gendtjar.pl --icu-root=\work\icu --jar=\jdk1.4.1\bin --icu4j-root=\work\icu4j --version=3.0
|
||
<br>Execution of gendtjar.pl script will create the required jar files in the $icu_root\source\tools\genrb\temp directory.</li>
|
||
<li> Move icudata.jar to <i>$icu4j_root</i>/src/com/ibm/icu/impl/data directory.</li>
|
||
<li> Move testdata.jar to <i>$icu4j_root</i>/src/com/ibm/dev/data directory.</li>
|
||
<li> Build resources target of ant to unpack the jar files with the following command.
|
||
<br><i>$ant_home</i>/bin/ant resources</li>
|
||
</ol>
|
||
|
||
<h3 class="doc"><a name="WhereToFindMore"></a>Where to Find More Information</h3>
|
||
|
||
<p><a href="http://oss.software.ibm.com/icu4j/">http://oss.software.ibm.com/icu4j/</a> is a
|
||
pointer to general information about the International Components for Unicode in Java </p>
|
||
|
||
<p><a href="http://www.ibm.com/developer/unicode">http://www.ibm.com/developer/unicode</a> is a pointer to
|
||
information on how to make applications global. </p>
|
||
|
||
<h3 class="doc"><a NAME="SubmittingComments"></a>Submitting Comments, Requesting Features and
|
||
Reporting Bugs</h3>
|
||
|
||
<p>Your comments are important to making ICU4J successful. We are committed
|
||
to fixing any bugs, and will use your feedback to help plan future releases.</p>
|
||
|
||
<p>To submit comments, request features and report bugs, contact us through the <a href=http://oss.software.ibm.com/icu4j/archives/index.html>ICU4J mailing list</a>.<br>
|
||
While we are not able to respond individually to each comment, we do review all comments.</p>
|
||
|
||
<br/><br/>
|
||
<h2>Thank you for your interest in ICU4J!</h2>
|
||
<br/>
|
||
<hr size="2" width="100%" align="center">
|
||
|
||
<p><i><font size="-1">Copyright <20> 2002-2004 International Business Machines Corporation and others. All Rights
|
||
Reserved.<br>
|
||
5600 Cottle Road, San Jos<6F>, CA 95193
|
||
</font></i></p>
|
||
|
||
</body>
|
||
</html>
|