1 <!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta http-equiv="Content-Style-Type" content="text/css2">
6 <title>ReadMe for ICU4J</title>
7 <meta name="COPYRIGHT" content="Copyright 2000-2011, International Business Machines Corporation and others. All Rights Reserved.">
8 <style type="text/css">
9 h3.doc { background: #CCCCFF }
10 h4.doc { text-decoration: underline }
13 <body style="background-color: rgb(255, 255, 255);" lang="EN-US"
14 link="#0000ff" vlink="#800080">
15 <h2>International Components for Unicode for Java (ICU4J)</h2>
16 <h3>Read Me for ICU4J 4.8.1.1</h3>
17 (Last Update: Aug 18, 2011)
18 <hr size="2" width="100%">
20 <p><b>Note:</b>This is an update release of ICU4J 4.8. This release contains bug fixes and updated data,
21 but does not introduce any new APIs for functionalities.
23 <p>For the most recent release, see the <a
24 href="http://www.icu-project.org/download/"> ICU4J
25 download site</a>. </p>
26 <h3 class="doc">Contents</h3>
28 <li><a href="#introduction">Introduction to ICU4J</a></li>
29 <li><a href="#changes">Changes In This Release</a></li>
30 <li><a href="#license">License Information</a></li>
31 <li><a href="#PlatformDependencies">Platform Dependencies</a></li>
32 <li><a href="#download">How to Download ICU4J</a></li>
33 <li><a href="#WhatContain">The Structure and Contents of ICU4J</a></li>
34 <li><a href="#API">Where to Get Documentation</a></li>
35 <li><a href="#HowToInstallJavac">How to Install and Build</a></li>
36 <li><a href="#HowToModularize">How to modularize ICU4J</a></li>
37 <li><a href="#tryingout">Trying Out ICU4J</a></li>
38 <li><a href="#resources">ICU4J Resource Information</a></li>
39 <li><a href="#timezone">About ICU4J Time Zone</a></li>
40 <li><a href="#WhereToFindMore">Where to Find More Information</a></li>
41 <li><a href="#SubmittingComments">Submitting Comments, Requesting
42 Features and Reporting Bugs</a></li>
44 <h3 class="doc"><a name="introduction"></a>Introduction to ICU4J</h3>
45 <p>The International Components for Unicode (ICU) library provides
47 full-featured Unicode services on a wide variety of platforms. ICU
49 most current version of the Unicode standard, including support for
50 supplementary characters (needed for GB 18030 repertoire support).</p>
51 <p>Java provides a strong foundation for global programs, and IBM and
53 ICU team played a key role in providing globalization technology to
54 Java. But because of its long release schedule, Java cannot always keep
55 up with evolving standards. The ICU team continues to extend Java's
56 Unicode and internationalization support, focusing on improving
58 keeping current with the Unicode standard, and providing richer APIs,
60 remaining as compatible as possible with the original Java text and
61 internationalization API design.</p>
62 <p>ICU4J is an add-on to the regular JRE that provides:
66 href="http://www.icu-project.org/userguide/Collate_Intro.html"><b>Collation</b></a>
67 – rule-based, up-to-date Unicode Collation Algorithm (UCA) sorting order<br>
68 For fast multilingual string comparison; faster
69 and more complete than
70 the J2SE implementation</li>
71 <li><a href="http://www.icu-project.org/userguide/charsetDetection.html"><b>Charset
72 Detection</b></a> – Recognition of various single and multibyte charsets<br>
73 Useful for recognizing untagged text data</li>
75 href="http://www.icu-project.org/userguide/unicodeSet.html"><b>UnicodeSet</b></a>
76 – standard set operations optimized for sets of Unicode characters<br>
77 UnicodeSets can be built from string patterns
78 using any Unicode properties.</li>
79 <li><a href="http://www.icu-project.org/userguide/Transform.html"><b>Transforms</b></a>
80 – a flexible mechanism for Unicode text conversions<br>
81 Including Full/Halfwidth conversions,
82 Normalization, Case conversions, Hex
83 conversions, and transliterations between scripts (50+ pairs)</li>
85 href="http://www.icu-project.org/userguide/normalization.html"><b>Unicode
86 Normalization</b></a> – NFC, NFD, NFKD, NFKC<br>
87 For canonical text representations, needed for
90 href="http://www.icu-project.org/userguide/dateCalendar.html"><b>International
91 Calendars</b></a> – Arabic, Buddhist, Chinese, Hebrew, Japanese, Ethiopic, Islamic, Coptic and other calendars<br>
92 Required for correct presentation of dates in
93 certain countries</li>
95 href="http://www.icu-project.org/userguide/formatNumbers.html"><b>Number
97 Enhancements</b></a> – Scientific Notation, Spelled-out, etc.<br>
98 Enhancements to the normal Java number
99 formatting. The spell-out format is
100 used for checks and similar documents</li>
102 href="http://www.icu-project.org/userguide/boundaryAnalysis.html"><b>Enhanced
103 Word-Break Detection</b></a> – Rule-based, supports Thai<br>
104 Required for correct support of Thai</li>
106 href="http://www.icu-project.org/userguide/compression.html"><b>Unicode
108 Compression</b></a> – Standard compression of Unicode text<br>
109 Suitable for large numbers of small fields,
110 where LZW and similar schemes
113 href="http://www.icu-project.org/userguide/conversion.html"><b>Charset Conversion</b></a> – Conversion to and from different charsets.<br>
114 Plugs into Java CharsetProvider Service Provider Interface (SPI)</li>
118 <p><b>Note:</b> We continue to provide assistance to Java, and in some
119 cases, ICU4J support has been rolled into a later release of Java. For
120 example, BCP47 language tag support including Unicode locale extensions
121 is now in Java 7. However, the most current and complete version is always
125 <h3 class="doc"><a name="changes"></a>Changes In This Release</h3>
126 <h4>New features and changes</h4>
128 See the <a href="http://sites.google.com/site/icusite/download/48">ICU 4.8 download page</a> about
129 new features in this release. The list of API changes since the previous ICU4J release
131 <a href="http://source.icu-project.org/repos/icu/icu4j/tags/release-4-8/APIChangeReport.html">here</a>.
133 <h5>MessageFormat Changes</h5>
134 <p>MessageFormat and related classes (choice/plural/select) have been reimplemented,
135 with several improvements and some incompatible changes.
136 See the <a href="http://site.icu-project.org/download/48">ICU 4.8 download</a> page for details.</p>
137 <h5>Unknown system time zone - Etc/Unknown</h5>
138 The behavior of the time zone factory method TimeZone.getTimeZone(String) has changed in this release.
139 When an unknown time zone ID is specified in the method, previous versions return a TimeZone instance
140 with ID "GMT" (offset 0 and no daylight saving time). In ICU 4.8, the method uses "Etc/Unknown" as the
141 time zone ID (but still offset 0 and no daylight saving time) for the case. Existing software checking
142 the returned time zone ID to validate the input ID may need to be updated to support the new behavior.
144 <h4 class="doc">Summary of updates in 4.8.1.1 (August 24, 2011)</h4>
145 <p><b>Java 7 Locale support</b></p>
146 <p>Java 7 was shipped in July 2011 including some enhancements in java.util.Locale class.
147 For supporting the enhancements in Locale class, ICU4J com.ibm.icu.util.ULocale was also
148 updated in the latest code stream by following ticket.
150 <li><a href="http://bugs.icu-project.org/trac/ticket/8630">#8630</a> Java 7 Locale Category support</li>
152 These changes in ULocale class were back-ported to this release. (<b>Note</b>: The new APIs for locale category
153 are tagged as @stable ICU 49, indicating these APIs are back-ported from later code stream.)</p>
156 <p>See the <a href="http://bugs.icu-project.org/trac/milestone/4.8.1.1J">ICU Trac 4.8.1.1J page</a> about
157 fixes done in this update release.
159 <h4 class="doc">Summary of updates in 4.8.1 (July 19, 2011)</h4>
160 <h5>CLDR 2.0.1 updates</h5>
161 <p>ICU4J 4.8.1 imported locale data updates from <a href="http://cldr.unicode.org/index/downloads/cldr-2-0-1">CLDR
164 <h5>Time zone data update</h5>
165 <p>ICU4J 4.8.1 updates the time zone data to version <a href="http://source.icu-project.org/repos/icu/data/trunk/tzdata/icunew/2011h/44/">2011h</a>
166 from the Olson tz database.
169 <p>See the <a href="http://bugs.icu-project.org/trac/milestone/4.8.1">ICU Trac 4.8.1 page</a> about
170 fixes done in this update release.
172 <h3 class="doc"><a name="license"></a>License Information</h3>
174 The ICU projects (ICU4C and ICU4J) use the X license. The X
175 license is <b>suitable for commercial use</b> and is a recommended free software license
176 that is compatible with the GNU GPL license. This became
177 effective with release 1.8.1 of ICU4C and release 1.3.1 of ICU4J in
178 mid-2001. All new ICU releases will adopt the X license; previous ICU
179 releases continue to utilize the IPL (IBM Public License). Users
180 of previous releases of ICU who want to adopt new ICU releases will
181 need to accept the terms and conditions of the X license.
184 The main effect of the change is to provide GPL compatibility.
185 The X license is listed as GPL compatible, see the GNU page at
186 <a href="http://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses">
187 http://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses</a>.
188 This means that GPL projects can now use ICU code, it does <b>not</b>
189 mean that projects using ICU become subject to GPL.
192 The IBM version contains the essential text of the license, omitting the
193 X-specific trademarks and copyright notices. The full copy of <a
194 href="main/shared/licenses/license.html">ICU's license</a> is included in the download
197 <h3 class="doc"><a name="PlatformDependencies"></a>Platform Dependencies</h3>
199 ICU4J 4.8 depends on J2SE 5.0 functionality. Therefore, ICU4J only runs on
200 JRE version 5.0 or later.
201 The table below shows the operating systems and JRE/VM versions currently
202 used by the ICU development team to test ICU4J.
206 <th rowspan="2">Operating System</th>
207 <th colspan="2">JRE 6</th>
208 <th colspan="2">JRE 5</th>
218 <td align="center">-</td>
219 <td align="center" bgcolor="#DDDDFF">Regularly tested</td>
220 <td align="center">-</td>
221 <td align="center" bgcolor="#DDDDFF">Regularly tested</td>
225 <td align="center">-</td>
226 <td align="center" bgcolor="#CCCCFF"><em><b>Reference platform</b></em></td>
227 <td align="center">-</td>
228 <td align="center" bgcolor="#DDDDFF">Regularly tested</td>
231 <th>HP-UX 11 (IA64)</th>
232 <td align="center">-</td>
233 <td align="center" bgcolor="#DDDDFF">Regularly tested</td>
234 <td align="center">-</td>
235 <td align="center" bgcolor="#DDDDFF">Regularly tested</td>
238 <th>Mac OS X 10.6</th>
239 <td align="center" bgcolor="#DDDDFF">Regularly tested</td>
240 <td align="center" bgcolor="#DDDDFF">Regularly tested</td>
241 <td align="center">-</td>
242 <td align="center">-</td>
245 <th>Redhat Enterprise Linux 6 (x86)</th>
246 <td align="center" bgcolor="#DDDDFF">Regularly tested</td>
247 <td align="center">-</td>
248 <td align="center" bgcolor="#DDDDFF">Regularly tested</td>
249 <td align="center">-</td>
252 <th>Redhat Enterprise Linux 6 (x86_64)</th>
253 <td align="center">-</td>
254 <td align="center" bgcolor="#DDDDFF">Regularly tested</td>
255 <td align="center">-</td>
256 <td align="center" bgcolor="#DDDDFF">Regularly tested</td>
259 <th>Solaris 9 (SPARC)</th>
260 <td align="center" bgcolor="#DDDDFF">Regularly tested</td>
261 <td align="center">-</td>
262 <td align="center" bgcolor="#DDDDFF">Regularly tested</td>
263 <td align="center">-</td>
266 <th>Solaris 10 (SPARC)</th>
267 <td align="center" bgcolor="#CCCCFF"><em><b>Reference platform</b></em></td>
268 <td align="center" bgcolor="#DDDDFF">Regularly tested</td>
269 <td align="center" bgcolor="#DDDDFF">Regularly tested</td>
270 <td align="center" bgcolor="#DDDDFF">Regularly tested</td>
274 <td align="center" bgcolor="#DDDDFF">Regularly tested</td>
275 <td align="center">-</td>
276 <td align="center" bgcolor="#DDDDFF">Regularly tested</td>
277 <td align="center">-</td>
280 <th>Windows Vista</th>
281 <td align="center" bgcolor="#DDDDFF">Regularly tested</td>
282 <td align="center">-</td>
283 <td align="center" bgcolor="#DDDDFF">Regularly tested</td>
284 <td align="center">-</td>
288 <td align="center" bgcolor="#CCCCFF"><em><b>Reference platform</b></em></td>
289 <td align="center">-</td>
290 <td align="center" bgcolor="#DDDDFF">Regularly tested</td>
291 <td align="center">-</td>
294 <th>Windows 2008 Server</th>
295 <td align="center">-</td>
296 <td align="center" bgcolor="#DDDDFF">Regularly tested</td>
297 <td align="center">-</td>
298 <td align="center" bgcolor="#DDDDFF">Regularly tested</td>
302 <h3 class="doc"><a name="download"></a>How to Download ICU4J</h3>
303 <p>There are two ways to download the ICU4J releases.
306 <li><b>Official Release:</b><br>
307 If you want to use ICU4J (as opposed to developing it), your best bet
308 is to download an official, packaged version of the ICU4J library files.
309 These versions are tested more thoroughly than day-to-day development
310 builds, and they are packaged in jar files for convenient download.
311 These packaged files can be found at the
312 <a href="http://www.icu-project.org/download/">ICU Download page</a>.
315 <li><b>Subversion Source Repository:</b><br>
316 If you are interested in developing features, patches, or bug fixes for
317 ICU4J, you should probably be working with the latest version of the
318 ICU4J source code. You will need to check the code out of our Subversion
319 repository to ensure that you have the most recent version of all of
320 the files. There are several ways to do this. Please follow the
321 directions that are contained on the <a
322 href="http://www.icu-project.org/repository/">Source
323 Repository page</a> for details.
326 <p>For more details on how to download ICU4J directly from the web
327 site, please see the ICU download page at <a
328 href="http://www.icu-project.org/download/">http://www.icu-project.org/download/</a>
330 <h3 class="doc"><a name="WhatContain"></a>The Structure and Contents of
332 <p>Below, all directory pathes are relative to the directory where the
333 ICU4J source archive is extracted.
335 <p><b>Information and build files:</b></p>
343 <td>A description of ICU4J (International Components for Unicode for Java)</td>
347 <td>The main Ant build file for ICU4J. See <a href="#HowToInstallJavac">How to Install
348 and Build</a> for more information</td>
351 <td>main/shared/licenses/license.html</td>
352 <td>The X license, used by ICU4J</td>
356 <p><b>ICU4J runtime class files:</b></p>
360 <th>Sub-component Name</th>
361 <th>Build Dependencies</th>
362 <th>Public API Packages</th>
366 <td>main/classes/charset</td>
367 <td>icu4j-charset</td>
369 <td>com.ibm.icu.charset</td>
370 <td>Implementation of <code>java.nio.charset.spi.CharsetProvider</code>.
371 This sub-component is shipped as icu4j-charset.jar along with
372 ICU charset converter data files.</td>
375 <td>main/classes/collate</td>
376 <td>icu4j-collate</td>
378 <td>com.ibm.icu.text<br>
379 com.ibm.icu.util</td>
380 <td>Collator APIs and implementation. Also includes some public API classes
381 that depend on Collator.
382 This sub-component is packaged as a part of icu4j.jar.</td>
385 <td>main/classes/core</td>
388 <td>com.ibm.icu.lang<br>
391 com.ibm.icu.util</td>
392 <td>ICU core API classes and implementation.
393 This sub-component is packaged as a part of icu4j.jar.</td>
396 <td>main/classes/currdata</td>
397 <td>icu4j-currdata</td>
400 <td>No public API classes. Provides access to currency display data.
401 This sub-component is packaged as a part of icu4j.jar.</td>
404 <td>main/classes/langdata</td>
405 <td>icu4j-langdata</td>
408 <td>No public API classes. Provides access to language display data.
409 This sub-component is packaged as a part of icu4j.jar.</td>
412 <td>main/classes/localespi</td>
413 <td>icu4j-localespi</code>
418 <td>Implementation of various locale-sensitive service providers defined
419 in <code>java.text.spi</code> and <code>java.util.spi</code> in J2SE 6.0
420 or later Java releases.
421 This sub-component is shipped as icu4j-localespi.jar.</td>
424 <td>main/classes/regiondata</td>
425 <td>icu4j-regiondata</td>
428 <td>No public API classes. Provides access to region display data.
429 This sub-component is packaged as a part of icu4j.jar.</td>
432 <td>main/classes/translit</td>
433 <td>icu4j-translit</td>
435 <td>com.ibm.icu.text</td>
436 <td>Transliterator APIs and implementation.
437 This sub-component is packaged as a part of icu4j.jar.</td>
441 <p><b>ICU4J unit test files:</b></p>
445 <th>Sub-component Name</th>
446 <th>Runtime Dependencies</th>
450 <td>main/tests/charset</td>
451 <td>icu4j-charset-tests</td>
452 <td>icu4j-charset<br>
454 icu4j-test-framework</td>
455 <td>Test suite for charset sub-component.</td>
458 <td>main/tests/collate</td>
459 <td>icu4j-collate-tests</td>
460 <td>icu4j-collate<br>
462 icu4j-test-framework</td>
463 <td>Test suite for collate sub-component.</td>
466 <td>main/tests/core</td>
467 <td>icu4j-core-tests</td>
472 icu4j-test-framework</td>
473 <td>Test suite for core sub-component.</td>
476 <td>main/tests/framework</td>
477 <td>icu4j-test-framework</td>
479 <td>Common ICU4J unit test framework and utilities.</td>
482 <td>main/tests/localespi</td>
483 <td>icu4j-localespi-tests</td>
490 icu4j-test-framework</td>
491 <td>Test suite for localespi sub-component.</td>
494 <td>main/tests/packaging</td>
495 <td>icu4j-packaging-tests</td>
497 icu4j-test-framework</td>
498 <td>Test suite for sub-component packaging.</td>
501 <td>main/tests/translit</td>
502 <td>icu4j-translit-tests</td>
505 icu4j-test-framework</td>
506 <td>Test suite for translit sub-component.</td>
510 <p><b>Others:</b></p>
518 <td>Files shared by ICU4J sub-components under the <code>main</code> directory including:
520 <li>ICU4J runtime data archive (icudata.jar).</li>
521 <li>ICU4J unit test data archive (testdata.jar).</li>
522 <li>Shared Ant build script and configuration files.</li>
523 <li>License files.</li>
529 <td>ICU4J demo programs.</td>
533 <td>ICU4J performance test files.</td>
537 <td>ICU4J tools including:
539 <li>Custom JavaDoc taglets used for generating ICU4J API references.</li>
540 <li>API report tool and data.</li>
541 <li>Other independent utilities used for ICU4J development.</li>
547 <h3 class="doc"><a name="API"></a>Where to get Documentation</h3>
548 <p>The <a href="http://www.icu-project.org/userguide/">ICU user's
549 guide</a> contains lots of general information about ICU, in its C,
550 C++, and Java incarnations.</p>
551 <p>The complete API documentation for ICU4J (javadoc) is available on
552 the ICU4J web site, and can be built from the sources:
555 <li><a href="http://www.icu-project.org/apiref/icu4j/">Index
556 to all ICU4J API</a></li>
557 <li><a href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/text/CharsetDetector.html">Charset Detector</a> – Detection of charset from a byte stream</li>
558 <li>International Calendars –
560 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/util/BuddhistCalendar.html">Buddhist</a>,
562 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/util/ChineseCalendar.html">Chinese</a>,
564 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/util/CopticCalendar.html">Coptic</a>,
566 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/util/EthiopicCalendar.html">Ethiopic</a>,
568 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/util/GregorianCalendar.html">Gregorian</a>,
570 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/util/HebrewCalendar.html">Hebrew</a>,
572 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/util/IndianCalendar.html">Indian</a>,
574 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/util/IslamicCalendar.html">Islamic</a>,
576 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/util/JapaneseCalendar.html">Japanese</a>.</li>
578 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/text/Normalizer.html">Unicode
579 Normalization</a> – Canonical text representation for W3C.</li>
581 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/text/NumberFormat.html">Number
582 Format Enhancements</a> – Scientific Notation, Spelled out.</li>
584 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/text/BreakIterator.html">Enhanced
585 word-break detection</a> – Rule-based, supports Thai</li>
587 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/text/Transliterator.html">Transliteration</a>
588 – A general framework for converting text from one format to another,
589 e.g. Cyrillic to Latin, or Hex to Unicode. </li>
591 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/text/UnicodeCompressor.html">Compression</a>
593 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/text/UnicodeDecompressor.html">Decompression</a>
594 – 2:1 compression on English Unicode text.</li>
596 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/text/RuleBasedCollator.html">Rule-based
598 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/text/StringSearch.html">Efficient
599 multi-lingual searching</a> </li>
601 <h3 class="doc"><a name="HowToInstallJavac"></a>How to Install and Build</h3>
603 To install ICU4J, simply place the prebuilt jar file <strong>icu4j.jar</strong>
604 on your Java CLASSPATH. If you need Charset API support please also place
605 <strong>icu4j-charset.jar</strong> on your class path along with <strong>icu4j.jar</strong>.
608 To build ICU4J, you will need J2SE SDK 5.0 or later (ICU4J locale SPI
609 provider sub-components require J2SE SDK 6.0 or later) and the Ant build system
610 version 1.7 or later. It's recommended to install both the J2SE SDK and Ant
611 somewhere <em>outside</em>the ICU4J directory. For example, on Linux you might install
612 these in <code>/usr/local</code>.</p>
614 <li>Install J2SE SDK 6.0.</li>
615 <li>Install the <a href="http://ant.apache.org/"><strong>Ant</strong></a>
616 build system. Ant is a portable, Java-based build system similar to
617 make. ICU4J uses Ant because it introduces no other dependencies, it's
618 portable, and it's easier to manage than a collection of makefiles. We
619 currently build ICU4J using a single makefile on all platforms Ant.
620 The build system requires Ant 1.7 or later.
621 <p>Installing Ant is straightforward. Download it (see <a
622 href="http://ant.apache.org/bindownload.cgi">http://ant.apache.org/bindownload.cgi</a>),
623 extract it onto your system, set some environment variables, and add
624 its bin directory to your path. For example: </p>
626 set JAVA_HOME=C:\jdk1.6.0
628 set PATH=%PATH%;%ANT_HOME%\bin</pre>
629 <p>See the current Ant documentation for details.</p>
632 <p>Once the J2SE SDK and Ant are installed, building is just a matter of
633 typing <strong>ant</strong> in the ICU4J root directory. This causes the
634 Ant build system to perform the build target <strong>jar</strong>
635 as specified by the file <strong>build.xml</strong>, located in the ICU4J
636 root directory. You can give Ant options like -verbose, and you can specify
637 other targets. For example:</p>
642 Buildfile: C:\icu4j\build.xml
645 [echo] ----- Build Environment Information -------------------
646 [echo] Java Home: C:\jdk1.6.0
647 [echo] Java Version: 1.6.0
648 [echo] Ant Home: C:\ant
649 [echo] Ant Version: Apache Ant(TM) version 1.8.2 compiled on December 20 2
652 [echo] OS Version: 6.1 build 7601 Service Pack 1
655 [echo] -------------------------------------------------------
660 [echo] --- java compiler arguments ------------------------
661 [echo] source dir: C:\icu4j\main\classes\core/src
662 [echo] output dir: C:\icu4j\main\classes\core/out/bin
667 [echo] encoding: UTF-8
668 [echo] compiler arg: -Xlint:all,-deprecation,-dep-ann
669 [echo] ----------------------------------------------------
670 [mkdir] Created dir: C:\icu4j\main\classes\core\out\bin
671 [javac] Compiling 331 source files to C:\icu4j\main\classes\core\out\bin
672 [javac] Note: Some input files use or override a deprecated API.
673 [javac] Note: Recompile with -Xlint:deprecation for details.
678 [copy] Copying 23 files to C:\icu4j\main\classes\core\out\bin
681 [unjar] Expanding: C:\icu4j\main\shared\data\icudata.jar into C:\icu4j\main\
693 [echo] --- java compiler arguments ------------------------
694 [echo] source dir: C:\icu4j\main\classes\localespi/src
695 [echo] output dir: C:\icu4j\main\classes\localespi/out/bin
696 [echo] classpath: C:\icu4j\main\classes\core\out\lib\icu4j-core.jar;C:
697 \icu4j\main\classes\collate\out\lib\icu4j-collate.jar
701 [echo] encoding: UTF-8
702 [echo] compiler arg: -Xlint:all,-deprecation,-dep-ann
703 [echo] ----------------------------------------------------
704 [mkdir] Created dir: C:\icu4j\main\classes\localespi\out\bin
705 [javac] Compiling 22 source files to C:\icu4j\main\classes\localespi\out\bin
711 [copy] Copying 10 files to C:\icu4j\main\classes\localespi\out\bin
716 [mkdir] Created dir: C:\icu4j\main\classes\localespi\out\lib
717 [copy] Copying 1 file to C:\icu4j\main\classes\localespi\out
718 [jar] Building jar: C:\icu4j\main\classes\localespi\out\lib\icu4j-localesp
724 [jar] Building jar: C:\icu4j\main\classes\localespi\out\lib\icu4j-localesp
732 [copy] Copying 1 file to C:\icu4j
733 [copy] Copying 1 file to C:\icu4j
736 Total time: 53 seconds</pre>
738 <I>Note: The above output is an example. The numbers are likely to be different with the current version ICU4J.</I>
739 <p>The following are some targets that you can provide to <b>ant</b>.
740 For more targets run <code>ant -projecthelp</code> or see the build.xml file.</p>
743 <th>jar (default)</th>
744 <td>Create ICU4J runtime library jar archives (<code>icu4j.jar</code>,
745 <code>icu4j-charset.jar</code> and <code>icu4j-localespi.jar</code>)
746 in the root ICU4J directory.</td>
750 <td>Build all ICU4J runtime library classes and corresponding unit test cases,
751 then run the tests.</td>
755 <td>Remove all build output files.</td>
759 <td>Build all ICU4J runtime library sub-components (under the directory
760 <code>main/classes</code>).</td>
764 <td>Build all ICU4J unit test sub-components (under the directory <code>main/tests</code>)
765 and their dependencies.</td>
769 <td>Build the tools.</td>
773 <td>Run javadoc over the ICU4J runtime library files, generating an HTML documentation
774 tree in the subdirectory <code>doc</code>.</td>
778 <td>Create ICU4J doc jar archive (<code>icu4jdocs.jar</code>) containing API reference
779 docs in the root ICU4J directory. </td>
783 <td>Create ICU4J demo jar archive (<code>icu4jdemos.jar</code>) in the root ICU4J
788 <p>For more information, read the Ant documentation and the <strong>build.xml</strong>
790 <b>Note:</b> If you get an OutOfMemoryError when you are running <tt>"ant check"</tt>,
791 you can set the heap size of the jvm by setting the environment variable JVM_OPTIONS
792 to the appropriate java options.</p>
794 <p><b>Eclipse users:</b> See the ICU4J site for information on<a
795 href="http://www.icu-project.org/docs/eclipse_howto/eclipse_howto.html">
796 how to configure Eclipse</a> to build and develop ICU4J on Eclipse IDE.</p>
798 <p><b>Note: </b>To install and configure ICU4J Locale Service Provider, please refer the user guide
799 page <a href="http://userguide.icu-project.org/icu4j-locale-service-provider">ICU4J Locale
800 Service Provider</a>.</p>
802 <h3 class="doc"><a name="HowToModularize"></a>How to modularize ICU4J</h3>
803 <p>Some clients may not wish to ship all of ICU4J with their
804 application, since the application might only use a small part of ICU4J.
805 ICU4J release 2.6 and later provide build options to build individual
806 ICU4J 'modules' for a more compact distribution. For more details, please
807 refer to the section <em>Modularization of ICU4J</em> in the ICU user's
808 guide article <a href="http://userguide.icu-project.org/packaging-icu4j">Packaging ICU4J</a>.
810 <h3 class="doc"><a name="tryingout"></a>Trying Out ICU4J</h3>
811 <p><strong>Note:</strong> the demos provided with ICU4J are for the
812 most part undocumented. This list can show you where to look, but
813 you'll have to experiment a bit. The demos are <strong>unsupported</strong>
814 and may change or disappear without notice.</p>
815 <p>The icu4j.jar file contains only the ICU4J runtime library classes, not the
816 demo classes, so unless you build ICU4J there is little to try out.
819 To try out the <strong>Charset</strong> package, build <strong>icu4j.jar</strong> and
820 <strong>icu4j-charset.jar</strong> using the 'jar' target.
821 You can use the charsets by placing these files on your classpath.
822 <blockquote><tt>java -cp $icu4j_root/icu4j.jar:$icu4j_root/icu4j-charset.jar <your program></tt></blockquote>
824 <p>The other demo programs are <strong>not supported</strong> and
825 exist only to let you experiment with the ICU4J classes. First, build ICU4J using <tt>ant jarDemos</tt>.
826 Then launch the demos as below:
827 <blockquote><tt>java -jar $icu4j_root/icu4jdemos.jar</tt></blockquote>
830 <h3 class="doc"><a name="resources">ICU4J Resource Information</a></h3>
831 Starting with release 2.1, ICU4J includes its own
833 which is completely independent of the JRE resource information. (Note,
834 ICU4J 2.8 to 3.4, time zone information depends on the underlying JRE).
835 The ICU4J resource information is equivalent to the information in ICU4C and
836 many resources are, in fact, the same binary files that ICU4C uses.
838 By default the ICU4J distribution includes all of the standard resource
839 information. It is located under the directory com/ibm/icu/impl/data.
840 Depending on the service, the data is in different locations and in
841 different formats. <strong>Note:</strong> This will continue to change
842 from release to release, so clients should not depend on the exact
844 of the data in ICU4J.</p>
846 <li>The primary <b>locale data</b> is under the directory <tt>icudt48b</tt>,
847 as a set of <tt>".res"</tt> files whose names are the locale identifiers.
848 Locale naming is documented the <code>com.ibm.icu.util.ULocale</code>
849 class, and the use of these names in searching for resources is documented
850 in <code>com.ibm.icu.util.UResourceBundle</code>.</li>
852 <li>The <b>collation data</b> is under the directory <tt>icudt48b/coll</tt>,
853 as a set of <tt>".res"</tt> files.</li>
855 <li>The <b>currency display name data</b> is under the directory <tt>icudt48b/curr</tt>,
856 as a set of <tt>".res"</tt> files.</li>
858 <li>The <b>language display name data</b> is under the directory <tt>icudt48b/lang</tt>,
859 as a set of <tt>".res"</tt> files.</li>
861 <li>The <b>region display name data</b> is under the directory <tt>icudt48b/region</tt>,
862 as a set of <tt>".res"</tt> files.</li>
864 <li>The <b>rule-based transliterator data</b> is under the directory
865 <tt>icudt48b/translit</tt>, as a set of <tt>".res"</tt> files.</li>
867 <li>The <b>rule-based number format data</b> is under the directory
868 <tt>icudt48b/rbnf</tt>, as a set of <tt>".res"</tt> files.
870 <li>The <b>break iterator data</b> is directly under the
871 directory <tt>icudt48b</tt>, as a set of <tt>".brk"</tt> files, named according to the
872 type of break and the locale where there are locale-specific versions.</li>
874 <li>The <b>holiday data</b> is under the directory <tt>icudt48b</tt>,
875 as a set of <tt>".class"</tt> files, named <tt>"HolidayBundle_"</tt>
876 followed by the locale ID.</li>
878 <li>The <b>character property data</b> and default <b>unicode collation algorithm
879 (UCA) data</b> is found under the directory <tt>icudt48b</tt>, as a set of
880 <tt>".icu"</tt> files. </li>
882 <li>The <b>normalization data</b> is found under the directory <tt>icudt48b</tt>,
883 as a set of <tt>".nrm"</tt> files. </li>
885 <li>The <b>character set converter data</b> is under the directory
886 <tt>icudt48b</tt>, as a set of <tt>".cnv"</tt> files. These files are
887 currently included only in icu-charset.jar.</li>
889 <li>The <b>time zone rule data</b> is under the directory
890 <tt>icudt48b</tt>, as <tt>zoneinfo64.res</tt>.</li>
892 <li>The <b>time zone display name data</b> is under the directory
893 <tt>icudt48b/zone</tt>, as a set of <tt>".res"</tt> files.</li>
896 Some of the data files alias or otherwise reference data from other
897 data files. One reason for this is because some locale names have
898 changed. For example, <tt>he_IL</tt> used to be <tt>iw_IL</tt>. In
899 order to support both names but not duplicate the data, one of the
900 resource files refers to the other file's data. In other cases, a
901 file may alias a portion of another file's data in order to save
902 space. Currently ICU4J provides no tool for revealing these
904 <blockquote><strong>Note:</strong> Java's <code>Locale</code> class
905 silently converts the language code <tt>"he"</tt> to <tt>"iw"</tt>
906 when you construct the Locale (for versions of Java through Java 5). Thus
907 Java cannot be used to locate resources that use the <tt>"he"</tt>
908 language code. ICU, on the other hand, does not perform this
909 conversion in ULocale, and instead uses aliasing in the locale data to
910 represent the same set of data under different locale
913 Resource files that use locale ids form a hierarchy, with up to four
914 levels: a root, language, region (country), and variant. Searches for
915 locale data attempt to match as far down the hierarchy as possible,
916 for example, <tt>"he_IL"</tt> will match <tt>he_IL</tt>, but
917 <tt>"he_US"</tt> will match <tt>he</tt> (since there is no <tt>US</tt>
918 variant for he, and <tt>"xx_YY</tt> will match root (the
919 default fallback locale) since there is no <tt>xx</tt> language code
920 in the locale hierarchy. Again, see
921 <code>java.util.ResourceBundle</code> for more information.
924 <strong>Currently ICU4J provides no tool for revealing these
925 dependencies</strong> between data files, so trimming the data
926 directly in the ICU4J project is a hit-or-miss affair. The key point
927 when you remove data is to make sure to remove all dependencies on
928 that data as well. For example, if you remove <tt>he.res</tt>, you
929 need to remove <tt>he_IL.res</tt>, since it is lower in the hierarchy,
930 and you must remove iw.res, since it references <tt>he.res</tt>, and
931 <tt>iw_IL.res</tt>, since it depends on it (and also references
935 Unfortunately, the jar tool in the JDK provides no way to remove items
936 from a jar file. Thus you have to extract the resources, remove the
937 ones you don't want, and then create a new jar file with the remining
938 resources. See the jar tool information for how to do this. Before
939 'rejaring' the files, be sure to thoroughly test your application with
940 the remaining resources, making sure each required resource is
943 <h4>Using additional resource files with ICU4J</h4>
945 <table cellpadding="3" frame="border" rules="none" width="50%">
948 <td><b><font color="red" size="+1">Warning:</font> Resource
949 file formats can change across releases of ICU4J!</b></td>
952 <td>The format of ICU4J resources is not part of the API.
953 Clients who develop their own resources for use with ICU4J should be
955 regenerate them when they move to new releases of ICU4J.</td>
961 We are still developing ICU4J's resource mechanism. Currently it
962 is not possible to mix icu's new binary <tt>.res</tt>
964 with traditional java-style <tt>.class</tt> or <tt>.txt</tt>
966 allow for this in a future release, but since the resource data and
967 format is not formally
968 supported, you run the risk of incompatibilities with future releases
972 Resource data in ICU4J is checked in to the repository as a jar file
973 containing the resource binaries, <tt>$icu4j_root/main/shared/data/icudata.jar</tt>.
974 This means that inspecting the contents of these resources is difficult.
975 They currently are compiled from ICU4C <tt>.txt</tt> file data. You
976 can view the contents of the ICU4C text resource files to understand
977 the contents of the ICU4J resources.
980 The files in <tt>icudata.jar</tt> get extracted to <tt>com/ibm/icu/impl/data</tt>
981 in the build output directory by some build targets.
983 <h4><a name="resourcesICU4C">Building ICU4J Resources from ICU4C</a></h4>
984 ICU4J data is built by ICU4C tools. Please see "icu4j-readme.txt" in <I>$icu4c_root</I>/source/data for the procedures.
985 <h5> Generating Data from CLDR </h5>
986 <I> Note: This procedure assumes that all 3 sources are present</I>
988 <li>Checkout or download CLDR version 'release-2-0-1'</li>
989 <li>Checkout ICU4C with tag 'release-4-8-1'</li>
990 <li>Checkout ICU4J with tag 'release-4-8-1-1'</li>
991 <li>cd to <I>$icu4c_root</I>/source/data directory</li>
992 <li>Follow the instructions in <I>$icu4c_root</I>/source/data/cldr-icu-readme.txt</li>
993 <li>Rebuild ICU4C with the newly generated data.</li>
994 <li>Run ICU4C tests to verify that the new data is good.</li>
995 <li>Build ICU4J data from ICU4C data by following the procedures in <I>$icu4c_root</I>/source/data/icu4j-readme.txt</li>
996 <li>cd to <I>$icu4j_root</I> dir</li>
998 <li>Build and test icu4j</li>
1001 <h3 class="doc"><a name="timezone"></a>About ICU4J Time Zone</h3>
1002 <p>ICU4J 4.8.1.1 includes time zone data version 2011h, which is the latest one as of
1003 the release date. However, time zone data is frequently updated in response
1004 to changes made by local governments around the world. If you need to update
1005 the time zone data, please refer the ICU user guide topic
1006 <a href="http://userguide.icu-project.org/datetime/timezone#TOC-Updating-the-Time-Zone-Data">Updating the Time Zone Data</a>.</p>
1007 <p>Starting with ICU4J 4.0, you can optionally configure ICU4J date and time
1008 service classes to use underlying JDK TimeZone implementation (see the ICU4J API reference
1009 <a href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/util/TimeZone.html">TimeZone</a>
1010 for the details). When this configuration is enabled, ICU's own time zone data
1011 won't be used and you have to get time zone data patches from the JRE vendor.</p>
1013 <h3 class="doc"><a name="WhereToFindMore"></a>Where to Find More
1015 <p><a href="http://www.icu-project.org/">http://www.icu-project.org/</a>
1016 is the home page of International Components for Unicode development project</p>
1017 <p><a href="http://www.ibm.com/software/globalization/icu/">http://www.ibm.com/software/globalization/icu/</a>
1018 is a pointer to general information about the International Components for
1019 Unicode hosted by IBM</p>
1020 <p><a href="http://www.ibm.com/software/globalization/">http://www.ibm.com/software/globalization/</a>
1022 information on how to make applications global. </p>
1023 <h3 class="doc"><a name="SubmittingComments"></a>Submitting Comments,
1024 Requesting Features and
1026 <p>Your comments are important to making ICU4J successful. We are
1027 committed to investigate any bug reports or suggestions,
1028 and will use your feedback to help plan future releases.</p>
1029 <p>To submit comments, request features and report bugs,
1030 please see <a href="http://www.icu-project.org/bugs.html">ICU bug database
1031 information</a> or contact us through the <a
1032 href="http://www.icu-project.org/contacts.html">ICU Support
1033 mailing list</a>. While we are not able to respond individually to each comment, we do
1034 review all comments.</p>
1037 <h2>Thank you for your interest in ICU4J!</h2>
1039 <hr align="center" size="2" width="100%">
1040 <p><I><font size="-1">Copyright © 2002-2011 International Business
1041 Machines Corporation and others. All Rights
1043 4400 North First Street, San José, CA 95193, USA