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