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