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