Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 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> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 8 | <meta name="COPYRIGHT" content="© 2016 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html#License"> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 9 | <style type="text/css"> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 10 | h2.doc { background: #CCCCFF } |
| 11 | h3.doc { text-decoration: underline } |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 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> |
Nikita Iashchenko | 0b25a79 | 2020-03-04 15:29:02 +0000 | [diff] [blame] | 17 | <h2>Read Me for ICU4J 66.1</h2> |
Nikita Iashchenko | d627d51 | 2020-03-12 16:50:04 +0000 | [diff] [blame] | 18 | (Last Update: 2020-Mar-02) |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 19 | <hr size="2" width="100%"> |
| 20 | |
| 21 | <p> |
Nikita Iashchenko | d627d51 | 2020-03-12 16:50:04 +0000 | [diff] [blame] | 22 | <b>Note:</b> This is major release of ICU4J. It contains bug fixes and adds implementations |
| 23 | of inherited API and introduces new API or functionality. |
Nikita Iashchenko | 0b25a79 | 2020-03-04 15:29:02 +0000 | [diff] [blame] | 24 | <!-- <b>Note:</b> This is a preview release of ICU4J 66. |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 25 | The contents of this document may not reflect the recent changes done |
Nikita Iashchenko | 0b25a79 | 2020-03-04 15:29:02 +0000 | [diff] [blame] | 26 | for ICU 66 development. It is not recommended for production use. --> |
Nikita Iashchenko | ebc670d | 2020-01-02 14:35:08 +0000 | [diff] [blame] | 27 | <!-- <b>Note:</b> This is a development milestone of ICU4J 66. |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 28 | The contents of this document may not reflect the recent changes done |
Nikita Iashchenko | ebc670d | 2020-01-02 14:35:08 +0000 | [diff] [blame] | 29 | for ICU 66 development. It is not recommended for production use. --> |
Nikita Iashchenko | d627d51 | 2020-03-12 16:50:04 +0000 | [diff] [blame] | 30 | <!-- <b>Note:</b> This is a release candidate of ICU4J 66. |
Nikita Iashchenko | ebc670d | 2020-01-02 14:35:08 +0000 | [diff] [blame] | 31 | The contents of this document may not reflect the recent changes done |
| 32 | for ICU 66 development. This release candidate is intended for those |
| 33 | wishing to verify ICU 66 integration before final release. It is not |
Nikita Iashchenko | d627d51 | 2020-03-12 16:50:04 +0000 | [diff] [blame] | 34 | recommended for production use. --> |
Victor Chang | 4578a1c | 2018-10-22 04:26:58 +0100 | [diff] [blame] | 35 | </p> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 36 | <p>For the most recent release, see the <a |
| 37 | href="http://www.icu-project.org/download/"> ICU4J |
| 38 | download site</a>. </p> |
| 39 | <h2 class="doc">Contents</h2> |
| 40 | <ul type="disc"> |
| 41 | <li><a href="#introduction">Introduction to ICU4J</a></li> |
| 42 | <li><a href="#changes">Changes In This Release</a></li> |
| 43 | <li><a href="#license">License Information</a></li> |
| 44 | <li><a href="#PlatformDependencies">Platform Dependencies</a></li> |
| 45 | <li><a href="#download">How to Download ICU4J</a></li> |
| 46 | <li><a href="#WhatContain">The Structure and Contents of ICU4J</a></li> |
| 47 | <li><a href="#API">Where to Get Documentation</a></li> |
| 48 | <li><a href="#HowToInstallJavac">How to Install and Build</a></li> |
| 49 | <li><a href="#HowToModularize">How to modularize ICU4J</a></li> |
| 50 | <li><a href="#tryingout">Trying Out ICU4J</a></li> |
| 51 | <li><a href="#resources">ICU4J Resource Information</a></li> |
| 52 | <li><a href="#timezone">About ICU4J Time Zone</a></li> |
| 53 | <li><a href="#WhereToFindMore">Where to Find More Information</a></li> |
| 54 | <li><a href="#SubmittingComments">Submitting Comments, Requesting |
| 55 | Features and Reporting Bugs</a></li> |
| 56 | </ul> |
| 57 | <h2 class="doc"><a name="introduction"></a>Introduction to ICU4J</h2> |
| 58 | <p>The International Components for Unicode (ICU) library provides |
| 59 | robust and |
| 60 | full-featured Unicode services on a wide variety of platforms. ICU |
| 61 | supports the |
| 62 | most current version of the Unicode standard, including support for |
| 63 | supplementary characters (needed for GB 18030 repertoire support).</p> |
| 64 | <p>Java provides a strong foundation for global programs, and IBM and |
| 65 | the |
| 66 | ICU team played a key role in providing globalization technology to |
| 67 | Java. But because of its long release schedule, Java cannot always keep |
| 68 | up with evolving standards. The ICU team continues to extend Java's |
| 69 | Unicode and internationalization support, focusing on improving |
| 70 | performance, |
| 71 | keeping current with the Unicode standard, and providing richer APIs, |
| 72 | while |
| 73 | remaining as compatible as possible with the original Java text and |
| 74 | internationalization API design.</p> |
| 75 | <p>ICU4J is an add-on to the regular JRE that provides: |
| 76 | </p> |
| 77 | <ul> |
| 78 | <li><a |
| 79 | href="http://www.icu-project.org/userguide/Collate_Intro.html"><b>Collation</b></a> |
| 80 | – rule-based, up-to-date Unicode Collation Algorithm (UCA) sorting order<br> |
| 81 | For fast multilingual string comparison; faster |
| 82 | and more complete than |
| 83 | the J2SE implementation</li> |
| 84 | <li><a href="http://www.icu-project.org/userguide/charsetDetection.html"><b>Charset |
| 85 | Detection</b></a> – Recognition of various single and multibyte charsets<br> |
| 86 | Useful for recognizing untagged text data</li> |
| 87 | <li><a |
| 88 | href="http://www.icu-project.org/userguide/unicodeSet.html"><b>UnicodeSet</b></a> |
| 89 | – standard set operations optimized for sets of Unicode characters<br> |
| 90 | UnicodeSets can be built from string patterns |
| 91 | using any Unicode properties.</li> |
| 92 | <li><a href="http://www.icu-project.org/userguide/Transform.html"><b>Transforms</b></a> |
| 93 | – a flexible mechanism for Unicode text conversions<br> |
| 94 | Including Full/Halfwidth conversions, |
| 95 | Normalization, Case conversions, Hex |
| 96 | conversions, and transliterations between scripts (50+ pairs)</li> |
| 97 | <li><a |
| 98 | href="http://www.icu-project.org/userguide/normalization.html"><b>Unicode |
| 99 | Normalization</b></a> – NFC, NFD, NFKD, NFKC<br> |
| 100 | For canonical text representations, needed for |
| 101 | XML and the net</li> |
| 102 | <li><a |
| 103 | href="http://www.icu-project.org/userguide/dateCalendar.html"><b>International |
| 104 | Calendars</b></a> – Arabic, Buddhist, Chinese, Hebrew, Japanese, Ethiopic, Islamic, Coptic and other calendars<br> |
| 105 | Required for correct presentation of dates in |
| 106 | certain countries</li> |
| 107 | <li><a |
Fredrik Roubert | d1ab31b | 2017-04-18 21:38:54 +0200 | [diff] [blame] | 108 | href="http://www.icu-project.org/userguide/formatNumbers.html"><b>Date |
| 109 | Format |
| 110 | Enhancements</b></a> – Date/time pattern generator, Relative date formatting, etc.<br> |
| 111 | Enhancements to the normal Java date |
| 112 | formatting.</li> |
| 113 | <li><a |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 114 | href="http://www.icu-project.org/userguide/formatNumbers.html"><b>Number |
| 115 | Format |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 116 | Enhancements</b></a> – Scientific Notation, Spelled-out, Compact decimal format, etc.<br> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 117 | Enhancements to the normal Java number |
| 118 | formatting. The spell-out format is |
| 119 | used for checks and similar documents</li> |
| 120 | <li><a |
| 121 | href="http://www.icu-project.org/userguide/boundaryAnalysis.html"><b>Enhanced |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 122 | Word-Break Detection</b></a> – Rule-based, supports Thai, Khmer, Chinese, etc.<br> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 123 | Required for correct support of Thai</li> |
| 124 | <li><a |
| 125 | href="http://www.icu-project.org/userguide/compression.html"><b>Unicode |
| 126 | Text |
| 127 | Compression</b></a> – Standard compression of Unicode text<br> |
| 128 | Suitable for large numbers of small fields, |
| 129 | where LZW and similar schemes |
| 130 | do not apply</li> |
| 131 | <li><a |
| 132 | href="http://www.icu-project.org/userguide/conversion.html"><b>Charset Conversion</b></a> – Conversion to and from different charsets.<br> |
| 133 | Plugs into Java CharsetProvider Service Provider Interface (SPI)</li> |
| 134 | |
| 135 | </ul> |
| 136 | <blockquote> |
| 137 | <p><b>Note:</b> We continue to provide assistance to Java, and in some |
| 138 | cases, ICU4J support has been rolled into a later release of Java. For |
| 139 | example, BCP47 language tag support including Unicode locale extensions |
| 140 | is now in Java 7. However, the most current and complete version is always |
| 141 | found in ICU4J.</p> |
| 142 | </blockquote> |
| 143 | |
| 144 | <h2 class="doc"><a name="changes"></a>Changes In This Release</h2> |
Fredrik Roubert | dcdfae8 | 2017-12-19 22:28:32 +0100 | [diff] [blame] | 145 | |
Nikita Iashchenko | ebc670d | 2020-01-02 14:35:08 +0000 | [diff] [blame] | 146 | <p>This release updates to Unicode 13 beta, CLDR 36.1, and includes some bug fixes. |
| 147 | This is a low-impact release with no other significant feature additions or implementation changes.</p> |
| 148 | |
| 149 | <p>See the <a href="http://site.icu-project.org/download/66">ICU 66 download page</a> |
| 150 | for more informantion about changes in this release.</p> |
Fredrik Roubert | d1ab31b | 2017-04-18 21:38:54 +0200 | [diff] [blame] | 151 | <p>The list of API changes since the previous ICU4J release is available |
Victor Chang | 4578a1c | 2018-10-22 04:26:58 +0100 | [diff] [blame] | 152 | <a href="APIChangeReport.html">here</a>.</p> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 153 | |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 154 | <h2 class="doc"><a name="license"></a>License Information</h2> |
| 155 | <p> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 156 | The ICU projects (ICU4C and ICU4J) are hosted by the |
| 157 | <a href="http://www.unicode.org/">Unicode Consortium</a>. The ICU binary |
| 158 | and source files are distributed under the |
| 159 | <a href="http://www.unicode.org/copyright.html#License">UNICODE DATA FILES |
| 160 | AND SOFTWARE LICENSE</a>. The full copy of the license and third party |
Victor Chang | 4578a1c | 2018-10-22 04:26:58 +0100 | [diff] [blame] | 161 | software licenses are available in <a href="./main/shared/licenses/LICENSE">LICENSE</a> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 162 | file included in this package. |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 163 | </p> |
| 164 | <h2 class="doc"><a name="PlatformDependencies"></a>Platform Dependencies</h2> |
| 165 | <p> |
Nikita Iashchenko | ebc670d | 2020-01-02 14:35:08 +0000 | [diff] [blame] | 166 | The minimum Java runtime version supported by ICU4J 66 is version 7. Java runtime version 6 is not supported. |
Nikita Iashchenko | da0990f | 2019-06-13 19:36:45 +0100 | [diff] [blame] | 167 | </p> |
| 168 | <p> |
| 169 | ICU4J since version 63 depend on J2SE 7 functionality. Therefore, ICU4J only runs on |
Nikita Iashchenko | ebc670d | 2020-01-02 14:35:08 +0000 | [diff] [blame] | 170 | JRE version 7 or later. ICU4J 66 is tested on JRE 7, 8, 9, 10 and 11. |
Nikita Iashchenko | da0990f | 2019-06-13 19:36:45 +0100 | [diff] [blame] | 171 | </p> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 172 | |
| 173 | <h2 class="doc"><a name="download"></a>How to Download ICU4J</h2> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 174 | <p>There are a few different ways to download the ICU4J releases. |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 175 | </p> |
| 176 | <ul type="disc"> |
| 177 | <li><b>Official Release:</b><br> |
| 178 | If you want to use ICU4J (as opposed to developing it), your best bet |
| 179 | is to download an official, packaged version of the ICU4J library files. |
| 180 | These versions are tested more thoroughly than day-to-day development |
| 181 | builds, and they are packaged in jar files for convenient download. |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 182 | <ul> |
| 183 | <li><a href="http://www.icu-project.org/download/">ICU Download page</a>.</li> |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 184 | <li>Maven repository: |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 185 | <pre> |
| 186 | <dependency> |
| 187 | <groupId>com.ibm.icu</groupId> |
| 188 | <artifactId>icu4j</artifactId> |
Nikita Iashchenko | 0b25a79 | 2020-03-04 15:29:02 +0000 | [diff] [blame] | 189 | <version>66.1</version> |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 190 | </dependency> |
| 191 | |
| 192 | <dependency> |
| 193 | <groupId>com.ibm.icu</groupId> |
| 194 | <artifactId>icu4j-charset</artifactId> |
Nikita Iashchenko | 0b25a79 | 2020-03-04 15:29:02 +0000 | [diff] [blame] | 195 | <version>66.1</version> |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 196 | </dependency> |
| 197 | |
| 198 | <dependency> |
| 199 | <groupId>com.ibm.icu</groupId> |
| 200 | <artifactId>icu4j-localespi</artifactId> |
Nikita Iashchenko | 0b25a79 | 2020-03-04 15:29:02 +0000 | [diff] [blame] | 201 | <version>66.1</version> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 202 | </dependency> |
| 203 | </pre> |
| 204 | </ul> |
| 205 | </ul> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 206 | <ul type="disc"> |
Victor Chang | 4578a1c | 2018-10-22 04:26:58 +0100 | [diff] [blame] | 207 | <li><b>GitHub Source Repository:</b><br> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 208 | If you are interested in developing features, patches, or bug fixes for |
| 209 | ICU4J, you should probably be working with the latest version of the |
Victor Chang | 4578a1c | 2018-10-22 04:26:58 +0100 | [diff] [blame] | 210 | ICU4J source code. You will need to clone and checkout the code from our GitHub |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 211 | repository to ensure that you have the most recent version of all of |
| 212 | the files. There are several ways to do this. Please follow the |
| 213 | directions 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 |
| 219 | site, 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 |
| 223 | ICU4J</h2> |
| 224 | <p>Below, all directory pathes are relative to the directory where the |
| 225 | ICU4J 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> |
Fredrik Roubert | d1ab31b | 2017-04-18 21:38:54 +0200 | [diff] [blame] | 243 | <td>main/shared/licenses/LICENSE</td> |
| 244 | <td>ICU license</td> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 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> |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 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> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 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 |
| 447 | guide</a> contains lots of general information about ICU, in its C, |
| 448 | C++, and Java incarnations.</p> |
| 449 | <p>The complete API documentation for ICU4J (javadoc) is available on |
| 450 | the 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 |
| 454 | to 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 |
| 485 | Normalization</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 |
| 488 | Format 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 |
| 491 | word-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, |
| 495 | e.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 |
| 503 | sorting</a>, <a |
| 504 | href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/text/StringSearch.html">Efficient |
| 505 | multi-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> |
Victor Chang | 4578a1c | 2018-10-22 04:26:58 +0100 | [diff] [blame] | 510 | To install ICU4J, simply place the pre-built jar file <strong>icu4j.jar</strong> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 511 | on 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> |
Victor Chang | 4578a1c | 2018-10-22 04:26:58 +0100 | [diff] [blame] | 515 | To build ICU4J, you will need JDK 7 or later (JDK 8 is the reference environment for this release) |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 516 | and the Apache Ant version 1.9 or later. It's recommended to install both the JDK and Ant |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 517 | somewhere <em>outside</em>the ICU4J directory. For example, on Linux you might install |
| 518 | these in <code>/usr/local</code>.</p> |
| 519 | <ul> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 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: |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 524 | <pre> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 525 | set JAVA_HOME=C:\jdk1.8.0 |
| 526 | set ANT_HOME=C:\apache-ant |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 527 | set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;%PATH%</pre> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 528 | </pre> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 529 | </li> |
| 530 | </ul> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 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 |
| 533 | class files and create ICU4J jar files. For example:</p> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 534 | <blockquote> |
| 535 | <pre>C:\icu4j>ant |
| 536 | Buildfile: C:\icu4j\build.xml |
| 537 | |
| 538 | info: |
| 539 | [echo] ----- Build Environment Information ------------------- |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 540 | [echo] Java Home: C:\jdk1.8.0\jre |
Victor Chang | 4578a1c | 2018-10-22 04:26:58 +0100 | [diff] [blame] | 541 | [echo] Java Version: 1.8.0_181 |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 542 | [echo] Ant Home: C:\apache-ant |
Victor Chang | 4578a1c | 2018-10-22 04:26:58 +0100 | [diff] [blame] | 543 | [echo] Ant Version: Apache Ant(TM) version 1.10.1 compiled on February 2 2017 |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 544 | [echo] OS: Windows 10 |
| 545 | [echo] OS Version: 10.0 |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 546 | [echo] OS Arch: amd64 |
| 547 | [echo] Host: ICUDEV |
| 548 | [echo] ------------------------------------------------------- |
| 549 | |
| 550 | core: |
| 551 | |
| 552 | @compile: |
Fredrik Roubert | f716bda | 2015-03-18 22:28:34 +0100 | [diff] [blame] | 553 | [echo] build-local: ../../shared/../../build-local.properties |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 554 | [echo] --- java compiler arguments ------------------------ |
| 555 | [echo] source dir: C:\icu4j\main\classes\core/src |
| 556 | [echo] output dir: C:\icu4j\main\classes\core/out/bin |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 557 | [echo] bootclasspath: |
| 558 | [echo] classpath: |
Victor Chang | 4578a1c | 2018-10-22 04:26:58 +0100 | [diff] [blame] | 559 | [echo] source: 1.7 |
| 560 | [echo] target: 1.7 |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 561 | [echo] debug: on |
| 562 | [echo] encoding: UTF-8 |
Fredrik Roubert | 441ab1c | 2016-03-24 01:16:42 +0100 | [diff] [blame] | 563 | [echo] compiler arg: -Xlint:all,-deprecation,-dep-ann,-options,-overrides |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 564 | [echo] ---------------------------------------------------- |
| 565 | [mkdir] Created dir: C:\icu4j\main\classes\core\out\bin |
Victor Chang | 4578a1c | 2018-10-22 04:26:58 +0100 | [diff] [blame] | 566 | [javac] Compiling 470 source files to C:\icu4j\main\classes\core\out\bin |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 567 | [javac] Note: Some input files use or override a deprecated API. |
| 568 | [javac] Note: Recompile with -Xlint:deprecation for details. |
| 569 | |
| 570 | compile: |
| 571 | |
| 572 | @copy: |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 573 | [copy] Copying 24 files to C:\icu4j\main\classes\core\out\bin |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 574 | |
Fredrik Roubert | f716bda | 2015-03-18 22:28:34 +0100 | [diff] [blame] | 575 | set-icuconfig-datapath: |
| 576 | |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 577 | copy-data: |
| 578 | [unjar] Expanding: C:\icu4j\main\shared\data\icudata.jar into C:\icu4j\main\ |
| 579 | classes\core\out\bin |
| 580 | [unjar] Expanding: C:\icu4j\main\shared\data\icutzdata.jar into C:\icu4j\mai |
| 581 | n\classes\core\out\bin |
| 582 | |
| 583 | ... |
| 584 | ... |
| 585 | ... |
| 586 | |
Victor Chang | 4578a1c | 2018-10-22 04:26:58 +0100 | [diff] [blame] | 587 | localespi: |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 588 | |
| 589 | @compile: |
Fredrik Roubert | f716bda | 2015-03-18 22:28:34 +0100 | [diff] [blame] | 590 | [echo] build-local: ../../shared/../../build-local.properties |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 591 | [echo] --- java compiler arguments ------------------------ |
| 592 | [echo] source dir: C:\icu4j\main\classes\localespi/src |
| 593 | [echo] output dir: C:\icu4j\main\classes\localespi/out/bin |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 594 | [echo] bootclasspath: |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 595 | [echo] classpath: C:\icu4j\main\classes\core\out\lib\icu4j-core.jar;C: |
| 596 | \icu4j\main\classes\collate\out\lib\icu4j-collate.jar |
Victor Chang | 4578a1c | 2018-10-22 04:26:58 +0100 | [diff] [blame] | 597 | [echo] source: 1.7 |
| 598 | [echo] target: 1.7 |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 599 | [echo] debug: on |
| 600 | [echo] encoding: UTF-8 |
| 601 | [echo] compiler arg: -Xlint:all,-deprecation,-dep-ann,-options |
| 602 | [echo] ---------------------------------------------------- |
| 603 | [mkdir] Created dir: C:\icu4j\main\classes\localespi\out\bin |
| 604 | [javac] Compiling 22 source files to C:\icu4j\main\classes\localespi\out\bin |
| 605 | |
| 606 | |
| 607 | compile: |
| 608 | |
| 609 | @copy: |
Fredrik Roubert | fe77e72 | 2017-11-27 19:43:43 +0100 | [diff] [blame] | 610 | [copy] Copying 11 files to C:\icu4j\main\classes\localespi\out\bin |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 611 | |
| 612 | copy: |
| 613 | |
| 614 | @jar: |
| 615 | [mkdir] Created dir: C:\icu4j\main\classes\localespi\out\lib |
| 616 | [copy] Copying 1 file to C:\icu4j\main\classes\localespi\out |
| 617 | [jar] Building jar: C:\icu4j\main\classes\localespi\out\lib\icu4j-localesp |
| 618 | i.jar |
| 619 | |
| 620 | jar: |
| 621 | |
| 622 | @src-jar: |
| 623 | [jar] Building jar: C:\icu4j\main\classes\localespi\out\lib\icu4j-localesp |
| 624 | i-src.jar |
| 625 | |
| 626 | src-jar: |
| 627 | |
| 628 | build: |
| 629 | |
| 630 | jar: |
| 631 | [copy] Copying 1 file to C:\icu4j |
| 632 | [copy] Copying 1 file to C:\icu4j |
| 633 | |
| 634 | BUILD SUCCESSFUL |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 635 | Total time: 30 seconds</pre> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 636 | </blockquote> |
| 637 | <I>Note: The above output is an example. The numbers are likely to be different with the current version ICU4J.</I> |
| 638 | <p>The following are some targets that you can provide to <b>ant</b>. |
| 639 | For more targets run <code>ant -projecthelp</code> or see the build.xml file.</p> |
| 640 | <table border="1"> |
| 641 | <tr> |
| 642 | <th>jar (default)</th> |
| 643 | <td>Create ICU4J runtime library jar archives (<code>icu4j.jar</code>, |
| 644 | <code>icu4j-charset.jar</code> and <code>icu4j-localespi.jar</code>) |
| 645 | in the root ICU4J directory.</td> |
| 646 | </tr> |
| 647 | <tr> |
| 648 | <th>check</th> |
| 649 | <td>Build all ICU4J runtime library classes and corresponding unit test cases, |
| 650 | then run the tests.</td> |
| 651 | </tr> |
| 652 | <tr> |
| 653 | <th>clean</th> |
| 654 | <td>Remove all build output files.</td> |
| 655 | </tr> |
| 656 | <tr> |
| 657 | <th>main</th> |
| 658 | <td>Build all ICU4J runtime library sub-components (under the directory |
| 659 | <code>main/classes</code>).</td> |
| 660 | </tr> |
| 661 | <tr> |
| 662 | <th>tests</th> |
| 663 | <td>Build all ICU4J unit test sub-components (under the directory <code>main/tests</code>) |
| 664 | and their dependencies.</td> |
| 665 | </tr> |
| 666 | <tr> |
| 667 | <th>tools</th> |
| 668 | <td>Build the tools.</td> |
| 669 | </tr> |
| 670 | <tr> |
| 671 | <th>docs</th> |
| 672 | <td>Run javadoc over the ICU4J runtime library files, generating an HTML documentation |
| 673 | tree in the subdirectory <code>doc</code>.</td> |
| 674 | </tr> |
| 675 | <tr> |
| 676 | <th>jarDocs</th> |
| 677 | <td>Create ICU4J doc jar archive (<code>icu4jdocs.jar</code>) containing API reference |
| 678 | docs in the root ICU4J directory. </td> |
| 679 | </tr> |
| 680 | <tr> |
| 681 | <th>jarDemos</th> |
| 682 | <td>Create ICU4J demo jar archive (<code>icu4jdemos.jar</code>) in the root ICU4J |
| 683 | directory.</td> |
| 684 | </tr> |
| 685 | </table> |
| 686 | |
| 687 | <p>For more information, read the Ant documentation and the <strong>build.xml</strong> |
| 688 | file.</p> |
| 689 | <p><b>Note:</b> If you get an OutOfMemoryError when you are running <tt>"ant check"</tt>, |
| 690 | you can set the heap size of the jvm by setting the environment variable JVM_OPTIONS |
| 691 | to the appropriate java options.</p> |
| 692 | |
| 693 | <p><b>Eclipse users:</b> See the ICU4J site for information on<a |
| 694 | href="http://www.icu-project.org/docs/eclipse_howto/eclipse_howto.html"> |
| 695 | how to configure Eclipse</a> to build and develop ICU4J on Eclipse IDE.</p> |
| 696 | |
| 697 | <p><b>Note:</b> To install and configure ICU4J Locale Service Provider, please refer the user guide |
| 698 | page <a href="http://userguide.icu-project.org/icu4j-locale-service-provider">ICU4J Locale |
| 699 | Service Provider</a>.</p> |
| 700 | |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 701 | <h2 class="doc"><a name="tryingout"></a>Trying Out ICU4J</h2> |
| 702 | <p><strong>Note:</strong> the demos provided with ICU4J are for the |
| 703 | most part undocumented. This list can show you where to look, but |
| 704 | you'll have to experiment a bit. The demos are <strong>unsupported</strong> |
| 705 | and may change or disappear without notice.</p> |
| 706 | <p>The icu4j.jar file contains only the ICU4J runtime library classes, not the |
| 707 | demo classes, so unless you build ICU4J there is little to try out. |
| 708 | </p> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 709 | <h3 class="doc">Charset</h3> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 710 | To try out the <strong>Charset</strong> package, build <strong>icu4j.jar</strong> and |
| 711 | <strong>icu4j-charset.jar</strong> using the 'jar' target. |
| 712 | You can use the charsets by placing these files on your classpath. |
| 713 | <blockquote><tt>java -cp $icu4j_root/icu4j.jar:$icu4j_root/icu4j-charset.jar <your program></tt></blockquote> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 714 | <h3 class="doc">Other demos</h3> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 715 | <p>The other demo programs are <strong>not supported</strong> and |
| 716 | exist only to let you experiment with the ICU4J classes. First, build ICU4J using <tt>ant jarDemos</tt>. |
| 717 | Then launch the demos as below:</p> |
| 718 | <blockquote><tt>java -jar $icu4j_root/icu4jdemos.jar</tt></blockquote> |
| 719 | |
| 720 | <h2 class="doc"><a name="resources">ICU4J Resource Information</a></h2> |
| 721 | Starting with release 2.1, ICU4J includes its own |
| 722 | resource information |
| 723 | which is completely independent of the JRE resource information. (Note, |
| 724 | ICU4J 2.8 to 3.4, time zone information depends on the underlying JRE). |
| 725 | The ICU4J resource information is equivalent to the information in ICU4C and |
| 726 | many resources are, in fact, the same binary files that ICU4C uses. |
| 727 | <p> |
| 728 | By default the ICU4J distribution includes all of the standard resource |
| 729 | information. It is located under the directory com/ibm/icu/impl/data. |
| 730 | Depending on the service, the data is in different locations and in |
| 731 | different formats. <strong>Note:</strong> This will continue to change |
| 732 | from release to release, so clients should not depend on the exact |
| 733 | organization |
| 734 | of the data in ICU4J.</p> |
| 735 | <ul> |
Nikita Iashchenko | ebc670d | 2020-01-02 14:35:08 +0000 | [diff] [blame] | 736 | <li>The primary <b>locale data</b> is under the directory <tt>icudt66b</tt>, |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 737 | as a set of <tt>".res"</tt> files whose names are the locale identifiers. |
| 738 | Locale naming is documented the <code>com.ibm.icu.util.ULocale</code> |
| 739 | class, and the use of these names in searching for resources is documented |
| 740 | in <code>com.ibm.icu.util.UResourceBundle</code>.</li> |
| 741 | |
Nikita Iashchenko | ebc670d | 2020-01-02 14:35:08 +0000 | [diff] [blame] | 742 | <li>The <b>break iterator data</b> is under the directory <tt>icudt66b/brkitr</tt>, |
Fredrik Roubert | f716bda | 2015-03-18 22:28:34 +0100 | [diff] [blame] | 743 | as a set of <tt>".res"</tt>, <tt>".brk"</tt> and <tt>".dict"</tt> files.</li> |
| 744 | |
Nikita Iashchenko | ebc670d | 2020-01-02 14:35:08 +0000 | [diff] [blame] | 745 | <li>The <b>collation data</b> is under the directory <tt>icudt66b/coll</tt>, |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 746 | as a set of <tt>".res"</tt> files.</li> |
| 747 | |
Nikita Iashchenko | ebc670d | 2020-01-02 14:35:08 +0000 | [diff] [blame] | 748 | <li>The <b>currency display name data</b> is under the directory <tt>icudt66b/curr</tt>, |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 749 | as a set of <tt>".res"</tt> files.</li> |
| 750 | |
Nikita Iashchenko | ebc670d | 2020-01-02 14:35:08 +0000 | [diff] [blame] | 751 | <li>The <b>language display name data</b> is under the directory <tt>icudt66b/lang</tt>, |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 752 | as a set of <tt>".res"</tt> files.</li> |
| 753 | |
Fredrik Roubert | f716bda | 2015-03-18 22:28:34 +0100 | [diff] [blame] | 754 | <li>The <b>rule-based number format data</b> is under the directory |
Nikita Iashchenko | ebc670d | 2020-01-02 14:35:08 +0000 | [diff] [blame] | 755 | <tt>icudt66b/rbnf</tt>, as a set of <tt>".res"</tt> files. |
Fredrik Roubert | f716bda | 2015-03-18 22:28:34 +0100 | [diff] [blame] | 756 | |
Nikita Iashchenko | ebc670d | 2020-01-02 14:35:08 +0000 | [diff] [blame] | 757 | <li>The <b>region display name data</b> is under the directory <tt>icudt66b/region</tt>, |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 758 | as a set of <tt>".res"</tt> files.</li> |
| 759 | |
| 760 | <li>The <b>rule-based transliterator data</b> is under the directory |
Nikita Iashchenko | ebc670d | 2020-01-02 14:35:08 +0000 | [diff] [blame] | 761 | <tt>icudt66b/translit</tt>, as a set of <tt>".res"</tt> files.</li> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 762 | |
Nikita Iashchenko | ebc670d | 2020-01-02 14:35:08 +0000 | [diff] [blame] | 763 | <li>The <b>measurement unit data</b> is under the directory <tt>icudt66b/unit</tt>, |
Fredrik Roubert | f716bda | 2015-03-18 22:28:34 +0100 | [diff] [blame] | 764 | as a set of <tt>".res"</tt> files.</li> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 765 | |
Fredrik Roubert | f716bda | 2015-03-18 22:28:34 +0100 | [diff] [blame] | 766 | <li>The <b>time zone display name data</b> is under the directory |
Nikita Iashchenko | ebc670d | 2020-01-02 14:35:08 +0000 | [diff] [blame] | 767 | <tt>icudt66b/zone</tt>, as a set of <tt>".res"</tt> files.</li> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 768 | |
| 769 | <li>The <b>character property data</b> and default <b>unicode collation algorithm |
Nikita Iashchenko | ebc670d | 2020-01-02 14:35:08 +0000 | [diff] [blame] | 770 | (UCA) data</b> is found under the directory <tt>icudt66b</tt>, as a set of |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 771 | <tt>".icu"</tt> files. </li> |
| 772 | |
Nikita Iashchenko | ebc670d | 2020-01-02 14:35:08 +0000 | [diff] [blame] | 773 | <li>The <b>normalization data</b> is found under the directory <tt>icudt66b</tt>, |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 774 | as a set of <tt>".nrm"</tt> files. </li> |
| 775 | |
| 776 | <li>The <b>character set converter data</b> is under the directory |
Nikita Iashchenko | ebc670d | 2020-01-02 14:35:08 +0000 | [diff] [blame] | 777 | <tt>icudt66b</tt>, as a set of <tt>".cnv"</tt> files. These files are |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 778 | currently included only in icu-charset.jar.</li> |
| 779 | |
| 780 | <li>The <b>time zone rule data</b> is under the directory |
Nikita Iashchenko | ebc670d | 2020-01-02 14:35:08 +0000 | [diff] [blame] | 781 | <tt>icudt66b</tt>, as <tt>zoneinfo64.res</tt>.</li> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 782 | |
Nikita Iashchenko | ebc670d | 2020-01-02 14:35:08 +0000 | [diff] [blame] | 783 | <li>The <b>holiday data</b> is under the directory <tt>icudt66b</tt>, |
Fredrik Roubert | f716bda | 2015-03-18 22:28:34 +0100 | [diff] [blame] | 784 | as a set of <tt>".class"</tt> files, named <tt>"HolidayBundle_"</tt> |
| 785 | followed by the locale ID.</li> |
| 786 | |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 787 | </ul> |
| 788 | <p> |
| 789 | Some of the data files alias or otherwise reference data from other |
| 790 | data files. One reason for this is because some locale names have |
| 791 | changed. For example, <tt>he_IL</tt> used to be <tt>iw_IL</tt>. In |
| 792 | order to support both names but not duplicate the data, one of the |
| 793 | resource files refers to the other file's data. In other cases, a |
| 794 | file may alias a portion of another file's data in order to save |
| 795 | space. Currently ICU4J provides no tool for revealing these |
| 796 | dependencies.</p> |
| 797 | <blockquote><strong>Note:</strong> Java's <code>Locale</code> class |
| 798 | silently converts the language code <tt>"he"</tt> to <tt>"iw"</tt> |
| 799 | when you construct the Locale (for versions of Java through Java 5). Thus |
| 800 | Java cannot be used to locate resources that use the <tt>"he"</tt> |
| 801 | language code. ICU, on the other hand, does not perform this |
| 802 | conversion in ULocale, and instead uses aliasing in the locale data to |
| 803 | represent the same set of data under different locale |
| 804 | ids.</blockquote> |
| 805 | <p> |
| 806 | Resource files that use locale ids form a hierarchy, with up to four |
| 807 | levels: a root, language, region (country), and variant. Searches for |
| 808 | locale data attempt to match as far down the hierarchy as possible, |
| 809 | for example, <tt>"he_IL"</tt> will match <tt>he_IL</tt>, but |
| 810 | <tt>"he_US"</tt> will match <tt>he</tt> (since there is no <tt>US</tt> |
| 811 | variant for he, and <tt>"xx_YY</tt> will match root (the |
| 812 | default fallback locale) since there is no <tt>xx</tt> language code |
| 813 | in the locale hierarchy. Again, see |
| 814 | <code>java.util.ResourceBundle</code> for more information. |
| 815 | </p> |
| 816 | <p> |
| 817 | <strong>Currently ICU4J provides no tool for revealing these |
| 818 | dependencies</strong> between data files, so trimming the data |
| 819 | directly in the ICU4J project is a hit-or-miss affair. The key point |
| 820 | when you remove data is to make sure to remove all dependencies on |
| 821 | that data as well. For example, if you remove <tt>he.res</tt>, you |
| 822 | need to remove <tt>he_IL.res</tt>, since it is lower in the hierarchy, |
| 823 | and you must remove iw.res, since it references <tt>he.res</tt>, and |
| 824 | <tt>iw_IL.res</tt>, since it depends on it (and also references |
| 825 | <tt>he_IL.res</tt>). |
| 826 | </p> |
| 827 | <p> |
| 828 | Unfortunately, the jar tool in the JDK provides no way to remove items |
| 829 | from a jar file. Thus you have to extract the resources, remove the |
| 830 | ones you don't want, and then create a new jar file with the remining |
| 831 | resources. See the jar tool information for how to do this. Before |
| 832 | 'rejaring' the files, be sure to thoroughly test your application with |
| 833 | the remaining resources, making sure each required resource is |
| 834 | present. |
| 835 | </p> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 836 | <h3 class="doc">Using additional resource files with ICU4J</h3> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 837 | <blockquote> |
| 838 | <table cellpadding="3" frame="border" rules="none" width="50%"> |
| 839 | <tbody> |
| 840 | <tr> |
| 841 | <td><b><font color="red" size="+1">Warning:</font> Resource |
| 842 | file formats can change across releases of ICU4J!</b></td> |
| 843 | </tr> |
| 844 | <tr> |
| 845 | <td>The format of ICU4J resources is not part of the API. |
| 846 | Clients who develop their own resources for use with ICU4J should be |
| 847 | prepared to |
| 848 | regenerate them when they move to new releases of ICU4J.</td> |
| 849 | </tr> |
| 850 | </tbody> |
| 851 | </table> |
| 852 | </blockquote> |
| 853 | <p> |
| 854 | We are still developing ICU4J's resource mechanism. Currently it |
| 855 | is not possible to mix icu's new binary <tt>.res</tt> |
| 856 | resources |
| 857 | with traditional java-style <tt>.class</tt> or <tt>.txt</tt> |
| 858 | resources. We might |
| 859 | allow for this in a future release, but since the resource data and |
| 860 | format is not formally |
| 861 | supported, you run the risk of incompatibilities with future releases |
| 862 | of ICU4J. |
| 863 | </p> |
| 864 | <p> |
| 865 | Resource data in ICU4J is checked in to the repository as a jar file |
| 866 | containing the resource binaries, <tt>$icu4j_root/main/shared/data/icudata.jar</tt>. |
| 867 | This means that inspecting the contents of these resources is difficult. |
| 868 | They currently are compiled from ICU4C <tt>.txt</tt> file data. You |
| 869 | can view the contents of the ICU4C text resource files to understand |
| 870 | the contents of the ICU4J resources. |
| 871 | </p> |
| 872 | <p> |
| 873 | The files in <tt>icudata.jar</tt> get extracted to <tt>com/ibm/icu/impl/data</tt> |
| 874 | in the build output directory by some build targets. |
| 875 | </p> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 876 | <h3 class="doc"><a name="resourcesICU4C">Building ICU4J Resources from ICU4C</a></h3> |
Fredrik Roubert | d1ab31b | 2017-04-18 21:38:54 +0200 | [diff] [blame] | 877 | ICU4J data is built by ICU4C tools. Please see "icu4j-readme.txt" in icu4c/source/data for the procedures. |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 878 | <h5> Generating Data from CLDR </h5> |
| 879 | <I> Note: This procedure assumes that all 3 sources are present</I> |
| 880 | <ol> |
Nikita Iashchenko | 4c0e286 | 2019-11-05 16:38:00 +0000 | [diff] [blame] | 881 | <li>Checkout or download CLDR version 'release-36'</li> |
Nikita Iashchenko | 0b25a79 | 2020-03-04 15:29:02 +0000 | [diff] [blame] | 882 | <li>Checkout ICU with tag 'release-66-1'</li> |
Fredrik Roubert | d1ab31b | 2017-04-18 21:38:54 +0200 | [diff] [blame] | 883 | <li>cd to icu4c/source/data directory</li> |
| 884 | <li>Follow the instructions in icu4c/source/data/cldr-icu-readme.txt</li> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 885 | <li>Rebuild ICU4C with the newly generated data.</li> |
| 886 | <li>Run ICU4C tests to verify that the new data is good.</li> |
Fredrik Roubert | d1ab31b | 2017-04-18 21:38:54 +0200 | [diff] [blame] | 887 | <li>Build ICU4J data from ICU4C data by following the procedures in icu4j/source/data/icu4j-readme.txt</li> |
| 888 | <li>cd to icu4j dir</li> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 889 | <li>Build and test icu4j</li> |
| 890 | </ol> |
| 891 | |
| 892 | <h2 class="doc"><a name="timezone"></a>About ICU4J Time Zone</h2> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 893 | <p>ICU4J library includes the latest time zone data, as of the release date. |
| 894 | However, time zone data is frequently updated in response |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 895 | to changes made by local governments around the world. If you need to update |
| 896 | the time zone data, please refer the ICU user guide topic |
| 897 | <a href="http://userguide.icu-project.org/datetime/timezone#TOC-Updating-the-Time-Zone-Data">Updating the Time Zone Data</a>.</p> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 898 | <p>You can optionally configure ICU4J date and time |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 899 | service classes to use underlying JDK TimeZone implementation (see the ICU4J API reference |
| 900 | <a href="http://www.icu-project.org/apiref/icu4j/com/ibm/icu/util/TimeZone.html">TimeZone</a> |
| 901 | for the details). When this configuration is enabled, ICU's own time zone data |
| 902 | won't be used and you have to get time zone data patches from the JRE vendor.</p> |
| 903 | |
| 904 | <h2 class="doc"><a name="WhereToFindMore"></a>Where to Find More |
| 905 | Information</h2> |
| 906 | <p><a href="http://www.icu-project.org/">http://www.icu-project.org/</a> |
| 907 | is the home page of International Components for Unicode development project</p> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 908 | |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 909 | <h2 class="doc"><a name="SubmittingComments"></a>Submitting Comments, |
| 910 | Requesting Features and |
| 911 | Reporting Bugs</h2> |
| 912 | <p>Your comments are important to making ICU4J successful. We are |
| 913 | committed to investigate any bug reports or suggestions, |
| 914 | and will use your feedback to help plan future releases.</p> |
| 915 | <p>To submit comments, request features and report bugs, |
| 916 | please see <a href="http://www.icu-project.org/bugs.html">ICU bug database |
| 917 | information</a> or contact us through the <a |
| 918 | href="http://www.icu-project.org/contacts.html">ICU Support |
| 919 | mailing list</a>. While we are not able to respond individually to each comment, we do |
| 920 | review all comments.</p> |
| 921 | <br> |
| 922 | <br> |
| 923 | <h2>Thank you for your interest in ICU4J!</h2> |
| 924 | <br> |
| 925 | <hr align="center" size="2" width="100%"> |
Fredrik Roubert | 2d2bb24 | 2016-10-21 19:44:52 +0200 | [diff] [blame] | 926 | <p><I><font size="-1">© 2016 and later: Unicode, Inc. and others.<br> |
| 927 | License & terms of use: <a href="http://www.unicode.org/copyright.html#License">http://www.unicode.org/copyright.html#License</a> |
Fredrik Roubert | 7935b18 | 2014-11-18 20:21:54 -0800 | [diff] [blame] | 928 | </font></I></p> |
| 929 | </body> |
| 930 | </html> |