• Home
Name Date Size #Lines LOC

..--

demos/03-May-2024-44,73740,978

eclipse-build/03-May-2024-37,68014,397

lib/03-May-2024-1211

main/03-May-2024-1,671,2721,486,353

perf-tests/03-May-2024-303,170299,598

samples/03-May-2024-2,3101,723

tools/03-May-2024-25,45119,237

APIChangeReport.htmlD03-May-202416.2 KiB360339

Android.mkD03-May-20245.3 KiB14689

adjust_icudt_path.mkD03-May-20241.3 KiB3720

build.propertiesD03-May-2024546 1210

build.xmlD03-May-202475.9 KiB1,6621,335

coverage-exclusion.txtD03-May-202478.4 KiB1,0041,003

ivy.xmlD03-May-2024315 87

liblayout-jarjar-rules.txtD03-May-202435 21

manifest.stubD03-May-2024749 1818

pom.xmlD03-May-20244.8 KiB147132

readme.htmlD03-May-202436.9 KiB917840

stylesheet6.cssD03-May-20243.1 KiB131104

stylesheet7.cssD03-May-202412.7 KiB582564

stylesheet8.cssD03-May-202414 KiB670643

readme.html

1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2   "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4<head>
5  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
6  <meta http-equiv="Content-Style-Type" content="text/css2">
7  <title>ReadMe for ICU4J</title>
8  <meta name="COPYRIGHT" content="© 2016 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html#License">
9  <style type="text/css">
10h2.doc { background: #CCCCFF }
11h3.doc { text-decoration: underline }
12  </style>
13</head>
14<body style="background-color: rgb(255, 255, 255);" lang="EN-US"
15 link="#0000ff" vlink="#800080">
16<h1>International Components for Unicode for Java (ICU4J)</h1>
17<h2>Read Me for ICU4J 58.2</h2>
18(Last Update: 2016-Dec-8)
19<hr size="2" width="100%">
20
21<p>
22<!-- <b>Note:</b> This is major release of ICU4J. It contains bug fixes and adds implementations
23of inherited API and introduces new API or functionality. -->
24<b>Note:</b> This is an update release of ICU4J 58. This release contains bug fixes and
25updated data, but does not introduce any new APIs for functionalities.
26<!-- <b>Note:</b> This is a development release of ICU4J 58.
27The contents of this document may not reflect the recent changes done
28for ICU 58 development. This milestone is intended for those wishing
29to get an early look at ICU4J 58 new features and API changes. It is not
30recommended for production use. -->
31<!-- <b>Note:</b> This is a release candidate of ICU4J 58.
32The contents of this document may not reflect the recent changes done
33for ICU 58 development. This release candidate is intended for those
34wishing to verify ICU 58 integration before final release. It is not
35recommended for production use. -->
36</p>
37<p>For the most recent release, see the <a
38 href="http://www.icu-project.org/download/"> ICU4J
39download site</a>. </p>
40<h2 class="doc">Contents</h2>
41<ul type="disc">
42  <li><a href="#introduction">Introduction to ICU4J</a></li>
43  <li><a href="#changes">Changes In This Release</a></li>
44  <li><a href="#license">License Information</a></li>
45  <li><a href="#PlatformDependencies">Platform Dependencies</a></li>
46  <li><a href="#download">How to Download ICU4J</a></li>
47  <li><a href="#WhatContain">The Structure and Contents of ICU4J</a></li>
48  <li><a href="#API">Where to Get Documentation</a></li>
49  <li><a href="#HowToInstallJavac">How to Install and Build</a></li>
50  <li><a href="#HowToModularize">How to modularize ICU4J</a></li>
51  <li><a href="#tryingout">Trying Out ICU4J</a></li>
52  <li><a href="#resources">ICU4J Resource Information</a></li>
53  <li><a href="#timezone">About ICU4J Time Zone</a></li>
54  <li><a href="#WhereToFindMore">Where to Find More Information</a></li>
55  <li><a href="#SubmittingComments">Submitting Comments, Requesting
56Features and Reporting Bugs</a></li>
57</ul>
58<h2 class="doc"><a name="introduction"></a>Introduction to ICU4J</h2>
59<p>The International Components for Unicode (ICU) library provides
60robust and
61full-featured Unicode services on a wide variety of platforms. ICU
62supports the
63most current version of the Unicode standard, including support for
64supplementary characters (needed for GB 18030 repertoire support).</p>
65<p>Java provides a strong foundation for global programs, and IBM and
66the
67ICU team played a key role in providing globalization technology to
68Java. But because of its long release schedule, Java cannot always keep
69up with evolving standards. The ICU team continues to extend Java's
70Unicode and internationalization support, focusing on improving
71performance,
72keeping current with the Unicode standard, and providing richer APIs,
73while
74remaining as compatible as possible with the original Java text and
75internationalization API design.</p>
76<p>ICU4J is an add-on to the regular JRE that provides:
77</p>
78<ul>
79  <li><a
80 href="http://www.icu-project.org/userguide/Collate_Intro.html"><b>Collation</b></a>
81&#8211; rule-based, up-to-date Unicode Collation Algorithm (UCA) sorting order<br>
82&nbsp;&nbsp;&nbsp;&nbsp;For fast multilingual string comparison; faster
83and more complete than
84the J2SE implementation</li>
85  <li><a href="http://www.icu-project.org/userguide/charsetDetection.html"><b>Charset
86Detection</b></a> &#8211; Recognition of various single and multibyte charsets<br>
87&nbsp;&nbsp;&nbsp;&nbsp;Useful for recognizing untagged text data</li>
88  <li><a
89 href="http://www.icu-project.org/userguide/unicodeSet.html"><b>UnicodeSet</b></a>
90&#8211; standard set operations optimized for sets of Unicode characters<br>
91&nbsp;&nbsp;&nbsp;&nbsp;UnicodeSets can be built from string patterns
92using any Unicode properties.</li>
93  <li><a href="http://www.icu-project.org/userguide/Transform.html"><b>Transforms</b></a>
94&#8211; a flexible mechanism for Unicode text conversions<br>
95&nbsp;&nbsp;&nbsp;&nbsp;Including Full/Halfwidth conversions,
96Normalization, Case conversions, Hex
97conversions, and transliterations between scripts (50+ pairs)</li>
98  <li><a
99 href="http://www.icu-project.org/userguide/normalization.html"><b>Unicode
100Normalization</b></a> &#8211; NFC, NFD, NFKD, NFKC<br>
101&nbsp;&nbsp;&nbsp;&nbsp;For canonical text representations, needed for
102XML and the net</li>
103  <li><a
104 href="http://www.icu-project.org/userguide/dateCalendar.html"><b>International
105Calendars</b></a> &#8211; Arabic, Buddhist, Chinese, Hebrew, Japanese, Ethiopic, Islamic, Coptic and other calendars<br>
106&nbsp;&nbsp;&nbsp;&nbsp;Required for correct presentation of dates in
107certain countries</li>
108  <li><a
109 href="http://www.icu-project.org/userguide/formatNumbers.html"><b>Number
110Format
111Enhancements</b></a> &#8211; Scientific Notation, Spelled-out, Compact decimal format, etc.<br>
112&nbsp;&nbsp;&nbsp;&nbsp;Enhancements to the normal Java number
113formatting. The spell-out format is
114used for checks and similar documents</li>
115  <li><a
116 href="http://www.icu-project.org/userguide/boundaryAnalysis.html"><b>Enhanced
117Word-Break Detection</b></a> &#8211; Rule-based, supports Thai, Khmer, Chinese, etc.<br>
118&nbsp;&nbsp;&nbsp;&nbsp;Required for correct support of Thai</li>
119  <li><a
120 href="http://www.icu-project.org/userguide/compression.html"><b>Unicode
121Text
122Compression</b></a> &#8211; Standard compression of Unicode text<br>
123&nbsp;&nbsp;&nbsp;&nbsp;Suitable for large numbers of small fields,
124where LZW and similar schemes
125do not apply</li>
126  <li><a
127 href="http://www.icu-project.org/userguide/conversion.html"><b>Charset Conversion</b></a> &#8211; Conversion to and from different charsets.<br>
128&nbsp;&nbsp;&nbsp;&nbsp;Plugs into Java CharsetProvider Service Provider Interface (SPI)</li>
129
130</ul>
131<blockquote>
132  <p><b>Note:</b> We continue to provide assistance to Java, and in some
133cases, ICU4J support has been rolled into a later release of Java. For
134example, BCP47 language tag support including Unicode locale extensions
135is now in Java 7. However, the most current and complete version is always
136found in ICU4J.</p>
137</blockquote>
138
139<h2 class="doc"><a name="changes"></a>Changes In This Release</h2>
140
141<p>See the <a href="https://sites.google.com/site/icusite/download/58">ICU 58 download page</a>
142about new features in this release.
143The list of API changes since the previous ICU4J release is available
144<a href="http://source.icu-project.org/repos/icu/icu4j/tags/release-58-2/APIChangeReport.html">here</a>.</p>
145
146    <!-- ICU 58 items -->
147<h3 class="doc">ICU development and license change</h3>
148The Unicode® Consortium hosts development of the ICU libraries starting from this relase.
149The ICU Project Management Committee is now a Unicode Technical Committee, the ICU-TC.
150ICU will continue to be released under a <a href="http://www.unicode.org/copyright.html#License">similar open source license</a>.
151For more details, see the <a href="http://blog.unicode.org/2016/05/icu-joins-unicode-consortium.html">Unicode announcement</a>.
152
153
154    <!-- <h3>[Subject]</h3> -->
155
156    <!-- end ICU 58 items -->
157
158<h2 class="doc"><a name="license"></a>License Information</h2>
159<p>
160The ICU projects (ICU4C and ICU4J) are hosted by the
161<a href="http://www.unicode.org/">Unicode Consortium</a>. The ICU binary
162and source files are distributed under the
163<a href="http://www.unicode.org/copyright.html#License">UNICODE DATA FILES
164AND SOFTWARE LICENSE</a>. The full copy of the license and third party
165software licences are available in <a href="./main/shared/licenses/LICENSE">LICENSE</a>
166file included in this package.
167</p>
168<h2 class="doc"><a name="PlatformDependencies"></a>Platform Dependencies</h2>
169<p>
170ICU4J 58 depends on J2SE 6 functionality.  Therefore, ICU4J only runs on
171JRE version 6 or later.
172
173<h2 class="doc"><a name="download"></a>How to Download ICU4J</h2>
174<p>There are a few different ways to download the ICU4J releases.
175</p>
176<ul type="disc">
177  <li><b>Official Release:</b><br>
178If you want to use ICU4J (as opposed to developing it), your best bet
179is to download an official, packaged version of the ICU4J library files.
180These versions are tested more thoroughly than day-to-day development
181builds, and they are packaged in jar files for convenient download.
182  <ul>
183    <li><a href="http://www.icu-project.org/download/">ICU Download page</a>.</li>
184    <li>Maven repository:
185<pre>
186&lt;dependency&gt;
187    &lt;groupId&gt;com.ibm.icu&lt;/groupId&gt;
188    &lt;artifactId&gt;icu4j&lt;/artifactId&gt;
189    &lt;version&gt;58.2&lt;/version&gt;
190&lt;/dependency&gt;
191</pre>
192  </ul>
193</ul>
194<ul type="disc">
195  <li><b>Subversion Source Repository:</b><br>
196If you are interested in developing features, patches, or bug fixes for
197ICU4J, you should probably be working with the latest version of the
198ICU4J source code. You will need to check the code out of our Subversion
199repository to ensure that you have the most recent version of all of
200the files. There are several ways to do this. Please follow the
201directions that are contained on the <a
202 href="http://www.icu-project.org/repository/">Source
203 Repository page</a> for details.
204  </li>
205</ul>
206<p>For more details on how to download ICU4J directly from the web
207site, please see the ICU download page at <a
208 href="http://www.icu-project.org/download/">http://www.icu-project.org/download/</a>
209</p>
210<h2 class="doc"><a name="WhatContain"></a>The Structure and Contents of
211ICU4J</h2>
212<p>Below, all directory pathes are relative to the directory where the
213ICU4J source archive is extracted.
214</p>
215<p><b>Information and build files:</b></p>
216<table border="1">
217<tr>
218  <th>Path</th>
219  <th>Description</th>
220</tr>
221<tr>
222  <td>readme.html</td>
223  <td>A description of ICU4J (International Components for Unicode for Java)</td>
224</tr>
225<tr>
226  <td>build.html</td>
227  <td>The main Ant build file for ICU4J.  See <a href="#HowToInstallJavac">How to Install
228  and Build</a> for more information</td>
229</tr>
230<tr>
231  <td>main/shared/licenses/license.html</td>
232  <td>The X license, used by ICU4J</td>
233</tr>
234</table>
235
236<p><b>ICU4J runtime class files:</b></p>
237<table border="1">
238<tr>
239  <th>Path</th>
240  <th>Sub-component Name</th>
241  <th>Build Dependencies</th>
242  <th>Public API Packages</th>
243  <th>Description</th>
244</tr>
245<tr>
246  <td>main/classes/charset</td>
247  <td>icu4j-charset</td>
248  <td>icu4j-core</td>
249  <td>com.ibm.icu.charset</td>
250  <td>Implementation of <code>java.nio.charset.spi.CharsetProvider</code>.
251  This sub-component is shipped as icu4j-charset.jar along with
252  ICU charset converter data files.</td>
253</tr>
254<tr>
255  <td>main/classes/collate</td>
256  <td>icu4j-collate</td>
257  <td>icu4j-core</td>
258  <td>com.ibm.icu.text<br>
259  com.ibm.icu.util</td>
260  <td>Collator APIs and implementation.  Also includes some public API classes
261  that depend on Collator.
262  This sub-component is packaged as a part of icu4j.jar.</td>
263</tr>
264<tr>
265  <td>main/classes/core</td>
266  <td>icu4j-core</td>
267  <td>n/a</td>
268  <td>com.ibm.icu.lang<br>
269  com.ibm.icu.math<br>
270  com.ibm.icu.text<br>
271  com.ibm.icu.util</td>
272  <td>ICU core API classes and implementation.
273  This sub-component is packaged as a part of icu4j.jar.</td>
274</tr>
275<tr>
276  <td>main/classes/currdata</td>
277  <td>icu4j-currdata</td>
278  <td>icu4j-core</td>
279  <td>n/a</td>
280  <td>No public API classes.  Provides access to currency display data.
281  This sub-component is packaged as a part of icu4j.jar.</td>
282</tr>
283<tr>
284  <td>main/classes/langdata</td>
285  <td>icu4j-langdata</td>
286  <td>icu4j-core</td>
287  <td>n/a</td>
288  <td>No public API classes.  Provides access to language display data.
289  This sub-component is packaged as a part of icu4j.jar.</td>
290</tr>
291<tr>
292  <td>main/classes/localespi</td>
293  <td>icu4j-localespi</td>
294  <td>icu4j-core<br>
295  icu4j-collate<br>
296  </td>
297  <td>n/a</td>
298  <td>Implementation of various locale-sensitive service providers defined
299  in <code>java.text.spi</code> and <code>java.util.spi</code> in J2SE 6.0
300  or later Java releases.
301  This sub-component is shipped as icu4j-localespi.jar.</td>
302</tr>
303<tr>
304  <td>main/classes/regiondata</td>
305  <td>icu4j-regiondata</td>
306  <td>icu4j-core</td>
307  <td>n/a</td>
308  <td>No public API classes.  Provides access to region display data.
309  This sub-component is packaged as a part of icu4j.jar.</td>
310</tr>
311<tr>
312  <td>main/classes/translit</td>
313  <td>icu4j-translit</td>
314  <td>icu4j-core</td>
315  <td>com.ibm.icu.text</td>
316  <td>Transliterator APIs and implementation.
317  This sub-component is packaged as a part of icu4j.jar.</td>
318</tr>
319</table>
320
321<p><b>ICU4J unit test files:</b></p>
322<table border="1">
323<tr>
324  <th>Path</th>
325  <th>Sub-component Name</th>
326  <th>Runtime Dependencies</th>
327  <th>Description</th>
328</tr>
329<tr>
330  <td>main/tests/charset</td>
331  <td>icu4j-charset-tests</td>
332  <td>icu4j-charset<br>
333  icu4j-core<br>
334  icu4j-test-framework</td>
335  <td>Test suite for charset sub-component.</td>
336</tr>
337<tr>
338  <td>main/tests/collate</td>
339  <td>icu4j-collate-tests</td>
340  <td>icu4j-collate<br>
341  icu4j-core<br>
342  icu4j-test-framework</td>
343  <td>Test suite for collate sub-component.</td>
344</tr>
345<tr>
346  <td>main/tests/core</td>
347  <td>icu4j-core-tests</td>
348  <td>icu4j-core<br>
349  icu4j-currdata<br>
350  icu4j-langdata<br>
351  icu4j-regiondata<br>
352  icu4j-test-framework</td>
353  <td>Test suite for core sub-component.</td>
354</tr>
355<tr>
356  <td>main/tests/framework</td>
357  <td>icu4j-test-framework</td>
358  <td>icu4j-core</td>
359  <td>Common ICU4J unit test framework and utilities.</td>
360</tr>
361<tr>
362  <td>main/tests/localespi</td>
363  <td>icu4j-localespi-tests</td>
364  <td>icu4j-core<br>
365  icu4j-collate<br>
366  icu4j-currdata<br>
367  icu4j-langdata<br>
368  icu4j-localespi<br>
369  icu4j-regiondata<br>
370  icu4j-test-framework</td>
371  <td>Test suite for localespi sub-component.</td>
372</tr>
373<tr>
374  <td>main/tests/packaging</td>
375  <td>icu4j-packaging-tests</td>
376  <td>icu4j-core<br>
377  icu4j-test-framework</td>
378  <td>Test suite for sub-component packaging.</td>
379</tr>
380<tr>
381  <td>main/tests/translit</td>
382  <td>icu4j-translit-tests</td>
383  <td>icu4j-core<br>
384  icu4j-translit
385  icu4j-test-framework</td>
386  <td>Test suite for translit sub-component.</td>
387</tr>
388</table>
389
390<p><b>Others:</b></p>
391<table border="1">
392<tr>
393  <th>Path</th>
394  <th>Description</th>
395</tr>
396<tr>
397  <td>main/shared</td>
398  <td>Files shared by ICU4J sub-components under the <code>main</code> directory including:
399  <ul>
400    <li>ICU4J runtime data archive (icudata.jar).</li>
401    <li>ICU4J unit test data archive (testdata.jar).</li>
402    <li>Shared Ant build script and configuration files.</li>
403    <li>License files.</li>
404  </ul>
405  </td>
406</tr>
407<tr>
408  <td>demos</td>
409  <td>ICU4J demo programs.</td>
410</tr>
411<tr>
412  <td>perf-tests</td>
413  <td>ICU4J performance test files.</td>
414</tr>
415<tr>
416  <td>tools</td>
417  <td>ICU4J tools including:
418  <ul>
419    <li>Custom JavaDoc taglets used for generating ICU4J API references.</li>
420    <li>API report tool and data.</li>
421    <li>Other independent utilities used for ICU4J development.</li>
422  </ul>
423  </td>
424</tr>
425</table>
426
427<h2 class="doc"><a name="API"></a>Where to get Documentation</h2>
428<p>The <a href="http://www.icu-project.org/userguide/">ICU user's
429guide</a> contains lots of general information about ICU, in its C,
430C++, and Java incarnations.</p>
431<p>The complete API documentation for ICU4J (javadoc) is available on
432the ICU4J web site, and can be built from the sources:
433</p>
434<ul>
435  <li><a href="http://www.icu-project.org/apiref/icu4j/">Index
436to all ICU4J API</a></li>
437  <li><a href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/text/CharsetDetector.html">Charset Detector</a> &#8211; Detection of charset from a byte stream</li>
438  <li>International Calendars &#8211;
439    <a
440 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/util/BuddhistCalendar.html">Buddhist</a>,
441    <a
442 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/util/ChineseCalendar.html">Chinese</a>,
443    <a
444 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/util/CopticCalendar.html">Coptic</a>,
445    <a
446 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/util/EthiopicCalendar.html">Ethiopic</a>,
447    <a
448 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/util/GregorianCalendar.html">Gregorian</a>,
449    <a
450 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/util/HebrewCalendar.html">Hebrew</a>,
451    <a
452 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/util/IndianCalendar.html">Indian</a>,
453    <a
454 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/util/IslamicCalendar.html">Islamic</a>,
455    <a
456 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/util/JapaneseCalendar.html">Japanese</a>,
457    Persian, Dangi.</li>
458  <li>Time Zone Enhancements &#8211;
459<a href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/util/BasicTimeZone.html">Time zone transition and rule detection</a>,
460<a href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/util/VTimeZone.html">iCalendar VTIMEZONE formatting and parsing</a>,
461<a href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/util/RuleBasedTimeZone.html">Custom time zones constructed by user defined rules</a>.
462  <li>Date Format Enhancements &#8211; <a href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/text/DateTimePatternGenerator.html">Date/Time Pattern Generator</a>,
463<a href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/text/DateIntervalFormat.html">Date Interval Format</a>,
464<a href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/text/DurationFormat.html">Duration Format</a>.
465  <li><a
466 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/text/Normalizer.html">Unicode
467Normalization</a> &#8211; Canonical text representation for W3C.</li>
468  <li><a
469 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/text/NumberFormat.html">Number
470Format Enhancements</a> &#8211; Scientific Notation, Spelled out.</li>
471  <li><a
472 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/text/BreakIterator.html">Enhanced
473word-break detection</a> &#8211; Rule-based, supports Thai</li>
474  <li><a
475 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/text/Transliterator.html">Transliteration</a>
476&#8211; A general framework for converting text from one format to another,
477e.g. Cyrillic to Latin, or Hex to Unicode. </li>
478  <li>Unicode Text <a
479 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/text/UnicodeCompressor.html">Compression</a>
480&amp; <a
481 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/text/UnicodeDecompressor.html">Decompression</a>
482&#8211; 2:1 compression on English Unicode text.</li>
483  <li>Collation &#8211; <a
484 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/text/RuleBasedCollator.html">Rule-based
485sorting</a>, <a
486 href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/text/StringSearch.html">Efficient
487multi-lingual searching</a>,
488<a href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/text/AlphabeticIndex.html">Alphabetic indexing</a></li>
489</ul>
490<h2 class="doc"><a name="HowToInstallJavac"></a>How to Install and Build</h2>
491<p>
492To install ICU4J, simply place the prebuilt jar file <strong>icu4j.jar</strong>
493on your Java CLASSPATH. If you need Charset API support please also place
494<strong>icu4j-charset.jar</strong> on your class path along with <strong>icu4j.jar</strong>.
495</p>
496<p>
497To build ICU4J, you will need JDK 7 or later (JDK 8 is the reference envionment for this release)
498and the Apache Ant version 1.9 or later. It's recommended to install both the JDK and Ant
499somewhere <em>outside</em>the ICU4J directory. For example, on Linux you might install
500these in <code>/usr/local</code>.</p>
501<ul>
502  <li>Install JDK 8.</li>
503  <li>Install the <a href="http://ant.apache.org/"><strong>Apache Ant</strong></a>
504      1.9 or later.
505  <li>Set environment variables JAVA_HOME, ANT_HOME and PATH, for example:
506    <pre>
507        set JAVA_HOME=C:\jdk1.8.0
508        set ANT_HOME=C:\apache-ant
509        set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;%PATH%</pre>
510    </pre>
511  </li>
512</ul>
513<p>Once the JDK and Ant are configured, run the desired target defined in
514<strong>build.xml</strong>. The default target is "jar" which compiles ICU4J library
515class files and create ICU4J jar files. For example:</p>
516<blockquote>
517<pre>C:\icu4j>ant
518Buildfile: C:\icu4j\build.xml
519
520info:
521     [echo] ----- Build Environment Information -------------------
522     [echo] Java Home:    C:\jdk1.8.0\jre
523     [echo] Java Version: 1.8.0_102
524     [echo] Ant Home:     C:\apache-ant
525     [echo] Ant Version:  Apache Ant(TM) version 1.9.4 compiled on April 29 2014
526
527     [echo] OS:           Windows 10
528     [echo] OS Version:   10.0
529     [echo] OS Arch:      amd64
530     [echo] Host:         ICUDEV
531     [echo] -------------------------------------------------------
532
533core:
534
535@compile:
536     [echo] build-local:     ../../shared/../../build-local.properties
537     [echo] --- java compiler arguments ------------------------
538     [echo] source dir:     C:\icu4j\main\classes\core/src
539     [echo] output dir:     C:\icu4j\main\classes\core/out/bin
540     [echo] bootclasspath:
541     [echo] classpath:
542     [echo] source:         1.6
543     [echo] target:         1.6
544     [echo] debug:          on
545     [echo] encoding:       UTF-8
546     [echo] compiler arg:   -Xlint:all,-deprecation,-dep-ann,-options,-overrides
547
548     [echo] ----------------------------------------------------
549    [mkdir] Created dir: C:\icu4j\main\classes\core\out\bin
550    [javac] Compiling 364 source files to C:\icu4j\main\classes\core\out\bin
551    [javac] Note: Some input files use or override a deprecated API.
552    [javac] Note: Recompile with -Xlint:deprecation for details.
553
554compile:
555
556@copy:
557     [copy] Copying 23 files to C:\icu4j\main\classes\core\out\bin
558
559set-icuconfig-datapath:
560
561copy-data:
562    [unjar] Expanding: C:\icu4j\main\shared\data\icudata.jar into C:\icu4j\main\
563classes\core\out\bin
564    [unjar] Expanding: C:\icu4j\main\shared\data\icutzdata.jar into C:\icu4j\mai
565n\classes\core\out\bin
566
567...
568...
569...
570
571_build-localespi:
572
573@compile:
574     [echo] build-local:     ../../shared/../../build-local.properties
575     [echo] --- java compiler arguments ------------------------
576     [echo] source dir:     C:\icu4j\main\classes\localespi/src
577     [echo] output dir:     C:\icu4j\main\classes\localespi/out/bin
578     [echo] bootclasspath:
579     [echo] classpath:      C:\icu4j\main\classes\core\out\lib\icu4j-core.jar;C:
580\icu4j\main\classes\collate\out\lib\icu4j-collate.jar
581     [echo] source:         1.6
582     [echo] target:         1.6
583     [echo] debug:          on
584     [echo] encoding:       UTF-8
585     [echo] compiler arg:   -Xlint:all,-deprecation,-dep-ann,-options
586     [echo] ----------------------------------------------------
587    [mkdir] Created dir: C:\icu4j\main\classes\localespi\out\bin
588    [javac] Compiling 22 source files to C:\icu4j\main\classes\localespi\out\bin
589
590
591compile:
592
593@copy:
594     [copy] Copying 10 files to C:\icu4j\main\classes\localespi\out\bin
595
596copy:
597
598@jar:
599    [mkdir] Created dir: C:\icu4j\main\classes\localespi\out\lib
600     [copy] Copying 1 file to C:\icu4j\main\classes\localespi\out
601      [jar] Building jar: C:\icu4j\main\classes\localespi\out\lib\icu4j-localesp
602i.jar
603
604jar:
605
606@src-jar:
607      [jar] Building jar: C:\icu4j\main\classes\localespi\out\lib\icu4j-localesp
608i-src.jar
609
610src-jar:
611
612build:
613
614jar:
615     [copy] Copying 1 file to C:\icu4j
616     [copy] Copying 1 file to C:\icu4j
617
618BUILD SUCCESSFUL
619Total time: 30 seconds</pre>
620</blockquote>
621<I>Note: The above output is an example. The numbers are likely to be different with the current version ICU4J.</I>
622<p>The following are some targets that you can provide to <b>ant</b>.
623For more targets run <code>ant -projecthelp</code> or see the build.xml file.</p>
624<table border="1">
625<tr>
626  <th>jar (default)</th>
627  <td>Create ICU4J runtime library jar archives (<code>icu4j.jar</code>,
628  <code>icu4j-charset.jar</code> and <code>icu4j-localespi.jar</code>)
629  in the root ICU4J directory.</td>
630</tr>
631<tr>
632  <th>check</th>
633  <td>Build all ICU4J runtime library classes and corresponding unit test cases,
634  then run the tests.</td>
635</tr>
636<tr>
637  <th>clean</th>
638  <td>Remove all build output files.</td>
639</tr>
640<tr>
641  <th>main</th>
642  <td>Build all ICU4J runtime library sub-components (under the directory
643  <code>main/classes</code>).</td>
644</tr>
645<tr>
646  <th>tests</th>
647  <td>Build all ICU4J unit test sub-components (under the directory <code>main/tests</code>)
648  and their dependencies.</td>
649</tr>
650<tr>
651  <th>tools</th>
652  <td>Build the tools.</td>
653</tr>
654<tr>
655  <th>docs</th>
656  <td>Run javadoc over the ICU4J runtime library files, generating an HTML documentation
657  tree in the subdirectory <code>doc</code>.</td>
658</tr>
659<tr>
660  <th>jarDocs</th>
661  <td>Create ICU4J doc jar archive (<code>icu4jdocs.jar</code>) containing API reference
662  docs in the root ICU4J directory. </td>
663</tr>
664<tr>
665  <th>jarDemos</th>
666  <td>Create ICU4J demo jar archive (<code>icu4jdemos.jar</code>) in the root ICU4J
667  directory.</td>
668</tr>
669</table>
670
671<p>For more information, read the Ant documentation and the <strong>build.xml</strong>
672file.</p>
673<p><b>Note:</b> If you get an OutOfMemoryError when you are running <tt>"ant check"</tt>,
674you can set the heap size of the jvm by setting the environment variable JVM_OPTIONS
675to the appropriate java options.</p>
676
677<p><b>Eclipse users:</b> See the ICU4J site for information on<a
678 href="http://www.icu-project.org/docs/eclipse_howto/eclipse_howto.html">
679how to configure Eclipse</a> to build and develop ICU4J on Eclipse IDE.</p>
680
681<p><b>Note:</b> To install and configure ICU4J Locale Service Provider, please refer the user guide
682page <a href="http://userguide.icu-project.org/icu4j-locale-service-provider">ICU4J Locale
683Service Provider</a>.</p>
684
685<h2 class="doc"><a name="tryingout"></a>Trying Out ICU4J</h2>
686<p><strong>Note:</strong> the demos provided with ICU4J are for the
687most part undocumented. This list can show you where to look, but
688you'll have to experiment a bit. The demos are <strong>unsupported</strong>
689and may change or disappear without notice.</p>
690<p>The icu4j.jar file contains only the ICU4J runtime library classes, not the
691demo classes, so unless you build ICU4J there is little to try out.
692</p>
693<h3 class="doc">Charset</h3>
694To try out the <strong>Charset</strong> package, build <strong>icu4j.jar</strong> and
695<strong>icu4j-charset.jar</strong> using the 'jar' target.
696You can use the charsets by placing these files on your classpath.
697<blockquote><tt>java -cp $icu4j_root/icu4j.jar:$icu4j_root/icu4j-charset.jar &lt;your program&gt;</tt></blockquote>
698<h3 class="doc">Other demos</h3>
699<p>The other demo programs are <strong>not supported</strong> and
700exist only to let you experiment with the ICU4J classes. First, build ICU4J using <tt>ant&nbsp;jarDemos</tt>.
701Then launch the demos as below:</p>
702<blockquote><tt>java -jar $icu4j_root/icu4jdemos.jar</tt></blockquote>
703
704<h2 class="doc"><a name="resources">ICU4J Resource Information</a></h2>
705Starting with release 2.1, ICU4J includes its own
706resource information
707which is completely independent of the JRE resource information. (Note,
708ICU4J 2.8 to 3.4, time zone information depends on the underlying JRE).
709The ICU4J resource information is equivalent to the information in ICU4C and
710many resources are, in fact, the same binary files that ICU4C uses.
711<p>
712By default the ICU4J distribution includes all of the standard resource
713information. It is located under the directory com/ibm/icu/impl/data.
714Depending on the service, the data is in different locations and in
715different formats. <strong>Note:</strong> This will continue to change
716from release to release, so clients should not depend on the exact
717organization
718of the data in ICU4J.</p>
719<ul>
720  <li>The primary <b>locale data</b> is under the directory <tt>icudt58b</tt>,
721  as a set of <tt>".res"</tt> files whose names are the locale identifiers.
722  Locale naming is documented the <code>com.ibm.icu.util.ULocale</code>
723  class, and the use of these names in searching for resources is documented
724  in <code>com.ibm.icu.util.UResourceBundle</code>.</li>
725
726  <li>The <b>break iterator data</b> is under the directory <tt>icudt58b/brkitr</tt>,
727  as a set of <tt>".res"</tt>, <tt>".brk"</tt> and <tt>".dict"</tt> files.</li>
728
729  <li>The <b>collation data</b> is under the directory <tt>icudt58b/coll</tt>,
730  as a set of <tt>".res"</tt> files.</li>
731
732  <li>The <b>currency display name data</b> is under the directory <tt>icudt58b/curr</tt>,
733  as a set of <tt>".res"</tt> files.</li>
734
735  <li>The <b>language display name data</b> is under the directory <tt>icudt58b/lang</tt>,
736  as a set of <tt>".res"</tt> files.</li>
737
738  <li>The <b>rule-based number format data</b> is under the directory
739  <tt>icudt58b/rbnf</tt>, as a set of <tt>".res"</tt> files.
740
741  <li>The <b>region display name data</b> is under the directory <tt>icudt58b/region</tt>,
742  as a set of <tt>".res"</tt> files.</li>
743
744  <li>The <b>rule-based transliterator data</b> is under the directory
745  <tt>icudt58b/translit</tt>, as a set of <tt>".res"</tt> files.</li>
746
747  <li>The <b>measurement unit data</b> is under the directory <tt>icudt58b/unit</tt>,
748  as a set of <tt>".res"</tt> files.</li>
749
750  <li>The <b>time zone display name data</b> is under the directory
751  <tt>icudt58b/zone</tt>, as a set of <tt>".res"</tt> files.</li>
752
753  <li>The <b>character property data</b> and default <b>unicode collation algorithm
754  (UCA) data</b> is found under the directory <tt>icudt58b</tt>, as a set of
755  <tt>".icu"</tt> files. </li>
756
757  <li>The <b>normalization data</b> is found under the directory <tt>icudt58b</tt>,
758  as a set of <tt>".nrm"</tt> files. </li>
759
760  <li>The <b>character set converter data</b> is under the directory
761  <tt>icudt58b</tt>, as a set of <tt>".cnv"</tt> files.  These files are
762  currently included only in icu-charset.jar.</li>
763
764  <li>The <b>time zone rule data</b> is under the directory
765  <tt>icudt58b</tt>, as <tt>zoneinfo64.res</tt>.</li>
766
767  <li>The <b>holiday data</b> is under the directory <tt>icudt58b</tt>,
768  as a set of <tt>".class"</tt> files, named <tt>"HolidayBundle_"</tt>
769  followed by the locale ID.</li>
770
771</ul>
772<p>
773Some of the data files alias or otherwise reference data from other
774data files. One reason for this is because some locale names have
775changed. For example, <tt>he_IL</tt> used to be <tt>iw_IL</tt>. In
776order to support both names but not duplicate the data, one of the
777resource files refers to the other file's data. In other cases, a
778file may alias a portion of another file's data in order to save
779space. Currently ICU4J provides no tool for revealing these
780dependencies.</p>
781<blockquote><strong>Note:</strong>  Java's <code>Locale</code> class
782silently converts the language code <tt>"he"</tt> to <tt>"iw"</tt>
783when you construct the Locale (for versions of Java through Java 5). Thus
784Java cannot be used to locate resources that use the <tt>"he"</tt>
785language code. ICU, on the other hand, does not perform this
786conversion in ULocale, and instead uses aliasing in the locale data to
787represent the same set of data under different locale
788ids.</blockquote>
789<p>
790Resource files that use locale ids form a hierarchy, with up to four
791levels: a root, language, region (country), and variant. Searches for
792locale data attempt to match as far down the hierarchy as possible,
793for example, <tt>"he_IL"</tt> will match <tt>he_IL</tt>, but
794<tt>"he_US"</tt> will match <tt>he</tt> (since there is no <tt>US</tt>
795variant for he, and <tt>"xx_YY</tt> will match root (the
796default fallback locale) since there is no <tt>xx</tt> language code
797in the locale hierarchy. Again, see
798<code>java.util.ResourceBundle</code> for more information.
799</p>
800<p>
801<strong>Currently ICU4J provides no tool for revealing these
802dependencies</strong> between data files, so trimming the data
803directly in the ICU4J project is a hit-or-miss affair. The key point
804when you remove data is to make sure to remove all dependencies on
805that data as well. For example, if you remove <tt>he.res</tt>, you
806need to remove <tt>he_IL.res</tt>, since it is lower in the hierarchy,
807and you must remove iw.res, since it references <tt>he.res</tt>, and
808<tt>iw_IL.res</tt>, since it depends on it (and also references
809<tt>he_IL.res</tt>).
810</p>
811<p>
812Unfortunately, the jar tool in the JDK provides no way to remove items
813from a jar file. Thus you have to extract the resources, remove the
814ones you don't want, and then create a new jar file with the remining
815resources. See the jar tool information for how to do this. Before
816'rejaring' the files, be sure to thoroughly test your application with
817the remaining resources, making sure each required resource is
818present.
819</p>
820<h3 class="doc">Using additional resource files with ICU4J</h3>
821<blockquote>
822  <table cellpadding="3" frame="border" rules="none" width="50%">
823    <tbody>
824      <tr>
825        <td><b><font color="red" size="+1">Warning:</font> Resource
826file formats can change across releases of ICU4J!</b></td>
827      </tr>
828      <tr>
829        <td>The format of ICU4J resources is not part of the API.
830Clients who develop their own resources for use with ICU4J should be
831prepared to
832regenerate them when they move to new releases of ICU4J.</td>
833      </tr>
834    </tbody>
835  </table>
836</blockquote>
837<p>
838We are still developing ICU4J's resource mechanism. Currently it
839is not possible to mix icu's new binary <tt>.res</tt>
840resources
841with traditional java-style <tt>.class</tt> or <tt>.txt</tt>
842resources. We might
843allow for this in a future release, but since the resource data and
844format is not formally
845supported, you run the risk of incompatibilities with future releases
846of ICU4J.
847</p>
848<p>
849Resource data in ICU4J is checked in to the repository as a jar file
850containing the resource binaries, <tt>$icu4j_root/main/shared/data/icudata.jar</tt>.
851This means that inspecting the contents of these resources is difficult.
852They currently are compiled from ICU4C <tt>.txt</tt> file data. You
853can view the contents of the ICU4C text resource files to understand
854the contents of the ICU4J resources.
855</p>
856<p>
857The files in <tt>icudata.jar</tt> get extracted to <tt>com/ibm/icu/impl/data</tt>
858in the build output directory by some build targets.
859</p>
860<h3 class="doc"><a name="resourcesICU4C">Building ICU4J Resources from ICU4C</a></h3>
861ICU4J data is built by ICU4C tools. Please see "icu4j-readme.txt" in <I>$icu4c_root</I>/source/data for the procedures.
862<h5> Generating Data from CLDR </h5>
863<I> Note: This procedure assumes that all 3 sources are present</I>
864<ol>
865    <li>Checkout or download CLDR version 'release-30-0-3'</li>
866    <li>Checkout ICU4C with tag 'release-58-2'</li>
867    <li>Checkout ICU4J with tag 'release-58-2'</li>
868    <li>cd to <I>$icu4c_root</I>/source/data directory</li>
869    <li>Follow the instructions in <I>$icu4c_root</I>/source/data/cldr-icu-readme.txt</li>
870    <li>Rebuild ICU4C with the newly generated data.</li>
871    <li>Run ICU4C tests to verify that the new data is good.</li>
872    <li>Build ICU4J data from ICU4C data by following the procedures in <I>$icu4c_root</I>/source/data/icu4j-readme.txt</li>
873    <li>cd to <I>$icu4j_root</I> dir</li>
874
875    <li>Build and test icu4j</li>
876</ol>
877
878<h2 class="doc"><a name="timezone"></a>About ICU4J Time Zone</h2>
879<p>ICU4J library includes the latest time zone data, as of the release date.
880However, time zone data is frequently updated in response
881to changes made by local governments around the world.  If you need to update
882the time zone data, please refer the ICU user guide topic
883<a href="http://userguide.icu-project.org/datetime/timezone#TOC-Updating-the-Time-Zone-Data">Updating the Time Zone Data</a>.</p>
884<p>You can optionally configure ICU4J date and time
885service classes to use underlying JDK TimeZone implementation (see the ICU4J API reference
886<a href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/util/TimeZone.html">TimeZone</a>
887for the details).  When this configuration is enabled, ICU's own time zone data
888won't be used and you have to get time zone data patches from the JRE vendor.</p>
889
890<h2 class="doc"><a name="WhereToFindMore"></a>Where to Find More
891Information</h2>
892<p><a href="http://www.icu-project.org/">http://www.icu-project.org/</a>
893is the home page of International Components for Unicode development project</p>
894
895<h2 class="doc"><a name="SubmittingComments"></a>Submitting Comments,
896Requesting Features and
897Reporting Bugs</h2>
898<p>Your comments are important to making ICU4J successful. We are
899committed to investigate any bug reports or suggestions,
900and will use your feedback to help plan future releases.</p>
901<p>To submit comments, request features and report bugs,
902please see <a href="http://www.icu-project.org/bugs.html">ICU bug database
903information</a> or contact us through the <a
904 href="http://www.icu-project.org/contacts.html">ICU Support
905mailing list</a>.  While we are not able to respond individually to each comment, we do
906review all comments.</p>
907<br>
908<br>
909<h2>Thank you for your interest in ICU4J!</h2>
910<br>
911<hr align="center" size="2" width="100%">
912<p><I><font size="-1">© 2016 and later: Unicode, Inc. and others.<br>
913License & terms of use: <a href="http://www.unicode.org/copyright.html#License">http://www.unicode.org/copyright.html#License</a>
914</font></I></p>
915</body>
916</html>
917