• Home
Name Date Size #Lines LOC

..--

demos/03-May-2024-44,77041,007

lib/03-May-2024-1211

main/03-May-2024-1,795,5941,592,942

maven/03-May-2024-453408

perf-tests/03-May-2024-303,192299,611

samples/03-May-2024-2,6021,976

tools/03-May-2024-26,70120,257

.gitignoreD03-May-2024310 1917

APIChangeReport.htmlD03-May-202412.2 KiB220203

Android.bpD03-May-20247.3 KiB225201

build.propertiesD03-May-2024568 1311

build.xmlD03-May-202492.3 KiB1,9851,616

coverage-exclusion.txtD03-May-202491.4 KiB1,1131,112

ivy.xmlD03-May-2024436 137

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

manifest.stubD03-May-2024802 2019

readme.htmlD03-May-202437.1 KiB928860

stylesheet7.cssD03-May-202412.7 KiB582564

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