Version: 2002-Dec-19
Copyright © 1997-2002 International Business Machines Corporation and
others. All Rights Reserved.
Author: Ram Viswanadha
ICU4JNI
contains Java Native Interface wrappers for ICU4C's character set conversion
and collation libraries.
These wrappers provide increased performace of conversion and collation,
and complete compatibility with ICU4C.
The ICU projects (ICU4C and ICU4J) have changed their licenses from the IPL (IBM Public License) to the X license. The X license is a non-viral and recommended free software license that is compatible with the GNU GPL license. This is effective starting with release 1.8.1 of ICU4C and release 1.3.1 of ICU4J. All previous ICU releases will continue to utilize the IPL. New ICU releases will adopt the X license. The users of previous releases of ICU will need to accept the terms and conditions of the X license in order to adopt the new ICU releases. The main effect of the change is to provide GPL compatibility. The X license is listed as GPL compatible, see the gnu page at http://www.gnu.org/philosophy/license-list.html#GPLCompatibleLicenses Please see http://oss.software.ibm.com/cvs/icu4j/~checkout~/icu4j/license.html for text of the license and the Project FAQ.
*
JDK1.3 or above with most recent release updates.
* ICU4C built and installed
Tested Environments
Operating System | Compiler | Sun's JDK | Additional Requirements |
AIX 5.1 | xlC | 1.3.0 |
gmake |
Solaris 2.6 | GCC | 1.3.1 |
gmake |
Solaris 2.7 | CC v6 |
1.3.1 |
gmake |
Solaris 2.7 |
CC v4.2 |
1.3.1 |
gmake |
Solaris 2.8 |
CC v4.2 |
1.3.1 |
gmake |
RedHat/Linux 7.2 | GCC | 1.3.1 |
gmake |
RedHat Alpha/Linux 7.2 | GCC | 1.3.1 ( Compaq's JDK) |
gmake |
WinXP | CL | 1.3.1 |
nmake |
WinNT | CL | 1.3.1 |
nmake |
Win2000 | CL | 1.3.1 & 1.4.0 |
nmake |
Make is configured to build with or without JDK 1.4
For example:
nmake
/f makefile-win32 CFG="Debug" ICUBIN="c:\icu\bin"
For building with JDK 1.4
type the following command
nmake /f makefile-win32
CFG="Debug" ICUBIN="<location of ICU>\icu\bin" JDK14="TRUE" JAVAPATH="<location
of JDK>\bin"
For building with JDK1.3
type the following command
nmake /f makefile-win32 CFG="Debug" ICUBIN="<location of ICU>\bin" JDK14="FALSE" JAVAPATH="<location of JDK>\bin"
*
Place the java source files in $(TARGETDIR)/com,i.e, <jdksource>/com
* Add the following lines to <jdk>/make/mkinclude/java_java.jmk
$(TARGDIR)com/ibm/icu4jni/ICUJNIInterface.java \
$(TARGDIR)com/ibm/icu4jni/CharToByteConverterICU.java \
$(TARGDIR)com/ibm/icu4jni/ByteToCharConverterICU.java \
# the files below are test classes
$(TARGDIR)com/ibm/icu4jni/ByteToCharGB18030.java \
$(TARGDIR)com/ibm/icu4jni/CharToByteGB18030.java \
* The JNI wrappers work under the assumption that ICU4C is available
and installed on the target platform.
* For adding additional codepages open CharacterEncoding.java in
<jdksource>/sun/io directory and add the
aliases to the converter
for eg:
For GB18030 support you add:
aliasTable.put( "gb18030" , "GB18030");
aliasTable.put( "gb-18030", "GB18030");
aliasTable.put( "gb_18030", "GB18030");
aliasTable.put( "GB-18030", "GB18030");
* Compile JNI wrapper code into dll/so using a C compiler
* Package the ICUJNIInterface.dll <jdkbuild>/<platform>/bin
directory
* Rebuild the JDK source