Giter Club home page Giter Club logo

icu4jni's Introduction

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
	<TITLE>ICU4JNI Read Me</TITLE>
	<META NAME="GENERATOR" CONTENT="OpenOffice.org 2.4  (Win32)">
	<META NAME="CREATED" CONTENT="0;0">
	<META NAME="CHANGED" CONTENT="20080703;15320206">
	<META NAME="COPYRIGHT" CONTENT="Copyright (c) 1997-2008 IBM Corporation and others. All Rights Reserved.">
	<STYLE TYPE="text/css">
	<!--
		@page { size: 8.5in 11in }
		H1 { border: 1.00pt solid #000000; padding: 0.02in; text-align: center }
		H4 { text-decoration: underline }
		H4.western { font-family: "Albany", sans-serif; font-size: 11pt; font-style: italic }
		H4.cjk { font-family: "HG Mincho Light J"; font-size: 11pt; font-style: italic }
		H4.ctl { font-family: "Arial Unicode MS"; font-size: 11pt; font-style: italic }
		H5 { text-decoration: underline }
		H5.western { font-family: "Albany", sans-serif; font-size: 11pt }
		H5.cjk { font-family: "HG Mincho Light J"; font-size: 11pt }
		H5.ctl { font-family: "Arial Unicode MS"; font-size: 11pt }
	-->
	</STYLE>
</HEAD>
<BODY LANG="en-US" DIR="LTR">
<H1>ICU4JNI: International Components for Unicode for Java Native
Interface<BR>ICU4JNI 4.0 ReadMe</H1>
<P>Version: 2008-Jul-3<BR>Copyright &copy; 1997-2008 International
Business Machines Corporation and others. All Rights
Reserved.<BR>Author: Ram Viswanadha, Steven R. Loomis 
</P>
<H4 CLASS="western">Contents</H4>
<UL TYPE=DISC>
	<LI><P STYLE="margin-bottom: 0in"><A HREF="#introduction">Introduction</A>
		</P>
	<LI><P STYLE="margin-bottom: 0in"><A HREF="#license">License
	Information</A> 
	</P>
	<LI><P STYLE="margin-bottom: 0in"><A HREF="#requirements">System
	Requirements</A> 
	</P>
	<LI><P><A HREF="#installation">Installation</A> 
	</P>
</UL>
<H4 CLASS="western"><A NAME="introduction"></A>Introduction</H4>
<P STYLE="margin-left: 0.5in; margin-right: 0.5in">ICU4JNI contains
Java Native Interface wrappers for ICU4C's character set conversion
and collation libraries. <BR>These wrappers provide increased
performace of conversion and collation, and complete compatibility
with ICU4C.</P>
<H4 CLASS="western"><A NAME="license"></A>License Information</H4>
<P STYLE="margin-left: 0.5in; margin-right: 0.5in">The The X license
is a non-viral and recommended free software license that is
compatible with the GNU GPL license. The X license is listed as GPL
compatible, see the gnu page at
<A HREF="http://www.gnu.org/philosophy/license-list.html#GPLCompatibleLicenses">http://www.gnu.org/philosophy/license-list.html#GPLCompatibleLicenses</A>.
Please see <A HREF="license.html">license.html</A> for text of the
license. 
</P>
<H4 CLASS="western"><A NAME="requirements"></A>System Requirements</H4>
<UL TYPE=DISC>
	<LI><P STYLE="margin-bottom: 0in">JDK1.3 or above with most recent
	release updates. 
	</P>
	<LI><P>ICU4C built and installed 
	</P>
</UL>
<H5 CLASS="western">Tested Environments</H5>
<TABLE COLS=4 WIDTH=100% BORDER=1 CELLPADDING=2 CELLSPACING=2>
	<TR>
		<TD>
			<P>&nbsp;Operating System</P>
		</TD>
		<TD>
			<P>&nbsp;Compiler</P>
		</TD>
		<TD>
			<P>&nbsp;Sun's JDK</P>
		</TD>
		<TD>
			<P>&nbsp;Additional Requirements</P>
		</TD>
	</TR>
	<TR>
		<TD>
			<P>AIX 5.1</P>
		</TD>
		<TD>
			<P>xlC</P>
		</TD>
		<TD>
			<P>1.4.2</P>
		</TD>
		<TD>
			<P>gmake</P>
		</TD>
	</TR>
	<TR>
		<TD>
			<P>AIX 5.2</P>
		</TD>
		<TD>
			<P>xlC</P>
		</TD>
		<TD>
			<P>1.5.0</P>
		</TD>
		<TD>
			<P>gmake</P>
		</TD>
	</TR>
	<TR>
		<TD>
			<P>HPUX 11i</P>
		</TD>
		<TD>
			<P>aCC</P>
		</TD>
		<TD>
			<P>1.4.2</P>
		</TD>
		<TD>
			<P>gmake</P>
		</TD>
	</TR>
	<TR>
		<TD>
			<P>Solaris 2.6</P>
		</TD>
		<TD>
			<P>GCC</P>
		</TD>
		<TD>
			<P>1.4.2</P>
		</TD>
		<TD>
			<P>gmake</P>
		</TD>
	</TR>
	<TR>
		<TD>
			<P>Solaris 2.7</P>
		</TD>
		<TD>
			<P>CC v6</P>
		</TD>
		<TD>
			<P>1.4.2</P>
		</TD>
		<TD>
			<P>gmake</P>
		</TD>
	</TR>
	<TR>
		<TD>
			<P>Solaris 2.7</P>
		</TD>
		<TD>
			<P>CC v4.2</P>
		</TD>
		<TD>
			<P>1.4.2</P>
		</TD>
		<TD>
			<P>gmake</P>
		</TD>
	</TR>
	<TR>
		<TD>
			<P>Solaris 9.0</P>
		</TD>
		<TD>
			<P>CC v5.5</P>
		</TD>
		<TD>
			<P>1.4.2</P>
		</TD>
		<TD>
			<P>gmake</P>
		</TD>
	</TR>
	<TR>
		<TD>
			<P>RedHat/Linux 7.2</P>
		</TD>
		<TD>
			<P>GCC</P>
		</TD>
		<TD>
			<P>1.4.2</P>
		</TD>
		<TD>
			<P>gmake</P>
		</TD>
	</TR>
	<TR>
		<TD>
			<P>RedHat/Linux 9.0</P>
		</TD>
		<TD>
			<P>GCC</P>
		</TD>
		<TD>
			<P>1.4.2</P>
		</TD>
		<TD>
			<P>gmake</P>
		</TD>
	</TR>
	<TR>
		<TD>
			<P>RedHat Enterprise Linux 3.0</P>
		</TD>
		<TD>
			<P>GCC</P>
		</TD>
		<TD>
			<P>1.4.2</P>
		</TD>
		<TD>
			<P>gmake</P>
		</TD>
	</TR>
	<TR>
		<TD>
			<P>Windows XP</P>
		</TD>
		<TD>
			<P>CL</P>
		</TD>
		<TD>
			<P>1.4.2</P>
		</TD>
		<TD>
			<P>nmake</P>
		</TD>
	</TR>
</TABLE>
<P><BR>&nbsp;&nbsp;&nbsp; <I><B>Note: For running ICU Conversion
service with the JDK 1.4 java.nio.charset API, place the icu4jni.jar
and ICU4JNIInterface.&lt;dll/so&gt; files in &lt;java_home&gt;/jre/lib/ext/
directory.</B></I></P>
<H4 CLASS="western"><A NAME="installation"></A>Installation</H4>
<H5 CLASS="western">UNIX</H5>
<OL>
	<LI><P STYLE="margin-bottom: 0in">Download and install ICU4C from
	<A HREF="http://ibm.com/software/globalization/icu/downloads.jsp">http://ibm.com/software/globalization/icu/downloads.jsp</A>
		</P>
	<LI><P STYLE="margin-bottom: 0in">Ensure that ICU libraries are
	available in system's dynamic library search path. 
	</P>
	<LI><P STYLE="margin-bottom: 0in">Make sure that <B>'icu-config'</B>
	is in the system's executable search path defined by PATH
	environment variable 
	</P>
	<LI><P STYLE="margin-bottom: 0in">Set the JAVA_HOME environment
	variable, e.g.:<BR><TT>&nbsp;&nbsp;&nbsp;</TT><TT><FONT FACE="Courier New"><FONT SIZE=2>export
	JAVA_HOME=/java/jdk1.3</FONT></FONT></TT> 
	</P>
	<LI><P STYLE="margin-bottom: 0in">Run configure with prefix and jdk
	options, ./configure --&lt;enable/disable&gt;-jdk14,
	e.g.:<BR><TT>&nbsp;&nbsp;&nbsp;</TT><TT><FONT FACE="Courier New"><FONT SIZE=2>./configure
	--prefix=/usr/local/ --enable-jdk14</FONT></FONT></TT> <BR>( use the
	prefix where ICU is installed, and where you may wish icu4jni to be
	installed )</P>
	<LI><P>Run <TT><FONT FACE="Courier New"><FONT SIZE=2>make check</FONT></FONT></TT>
	to build and run tests. Some failures may be due to JDK variants.</P>
	<LI><P>Binary output is in 'build/lib'. 
	</P>
</OL>
<P>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; <I><B>Note: </B></I>
</P>
<UL>
	<LI><P STYLE="margin-bottom: 0in"><I><B>Building ICU4JNI on Solaris
	need libC.so and libc.so to be present in the search path defined by
	LD_LIBRARY_PATH environment variable. libC.so should be a symbolic
	link to libC.so.5</B></I> 
	</P>
	<LI><P><I><B>Building ICU4JNI on AIX, Solaris 64bit requires ICU to
	be built with --disable-64bit-libraries configure option enabled, as
	Java is often a 32-bit binary. This may prevent you from using the
	standard ICU4C binaries.  </B></I>
	</P>
	<LI><P><I><B>For AIX xlC, set the PATH </B></I><FONT COLOR="#000000"><FONT FACE="Helv, sans-serif"><FONT SIZE=2>
	PATH=$PATH:/usr/vacpp/bin</FONT></FONT></FONT><FONT COLOR="#000000"><FONT FACE="Helv, sans-serif"><FONT SIZE=2><I><B>
	to ensure the corect compiler is chosen.</B></I></FONT></FONT></FONT></P>
</UL>
<H5 CLASS="western">Win32</H5>
<P>Make is configured to build with or without JDK 1.4</P>
<OL>
	<LI><P STYLE="margin-bottom: 0in">Download and install ICU4C from
	<A HREF="http://ibm.com/software/globalization/icu/downloads.jsp">http://ibm.com/software/globalization/icu/downloads.jsp</A>
		</P>
	<LI><P STYLE="margin-bottom: 0in">Set the JAVA_HOME environment
	variable or pass JAVAPATH on the command line, e.g.:<BR><TT>&nbsp;&nbsp;&nbsp;</TT><TT><FONT FACE="Courier New"><FONT SIZE=2>set
	JAVA_HOME=c:\jdk1.3</FONT></FONT></TT> 
	</P>
	<LI><P STYLE="margin-bottom: 0in">Ensure that the &lt;icu_dir&gt;\bin
	directory is in your PATH. 
	</P>
	<LI><P STYLE="margin-bottom: 0in">Ensure that your environment is
	set right for the C compilation. For Microsoft C compilers, ensure
	that &nbsp;<B>vcvars32.bat&nbsp;</B> has been ran to set the
	environment variables. 
	</P>
	<LI><P STYLE="margin-bottom: 0in">Run nmake with the supplied win32
	makefile. You can set the configuration option by defining CFG.
	Also, if ICU_DATA is not set, you can provide the path to the ICU
	bin directory by defining ICUBIN. 
	</P>
	<UL TYPE=CIRCLE>
		<LI><P STYLE="margin-bottom: 0in">To set configuration options
		define CFG to either Debug or Release, default is Debug 
		</P>
		<LI><P>If ICU_DATA is not set, define ICUBIN=&lt;icu&gt;/bin 
		</P>
		<LI><P>The ICU_VERSION is the two-digit version of ICU4C that you
		are building against, so &ldquo;40&rdquo; for ICU 4.0.</P>
	</UL>
</OL>
<P STYLE="margin-left: 0.5in">For example:<BR><TT>&nbsp;&nbsp;&nbsp;</TT><TT><FONT FACE="Courier New"><FONT SIZE=2>nmake
/f makefile-win32 CFG=&quot;Debug&quot; ICUBIN=&quot;c:\icu\bin</FONT></FONT></TT><TT><FONT FACE="Courier New, monospace"><FONT SIZE=2>&quot;</FONT></FONT></TT>
<FONT FACE="Courier New, monospace"><FONT SIZE=2>ICU_VERSION=&rdquo;40&rdquo;</FONT></FONT></P>
<P STYLE="margin-left: 0.5in">For building with JDK 1.4 type the
following command</P>
<P STYLE="margin-left: 0.5in">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
nmake /f makefile-win32 CFG=&quot;Debug&quot; ICUBIN=&quot;&lt;location
of ICU&gt;\icu\bin&quot; ICU_VERSION=&rdquo;40&rdquo;</P>
<P STYLE="text-indent: 0.5in">For building with JDK1.3 type the
following command</P>
<P STYLE="margin-left: 0.5in">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nmake
/f makefile-win32 CFG=&quot;Debug&quot; ICUBIN=&quot;&lt;location of
ICU&gt;\bin&quot; ICU_VERSION=&rdquo;40&rdquo; JDK14=&quot;FALSE&quot;</P>
<OL START=6>
	<LI><P>The files are built in the &lt;jniroot&gt;/build directory.
	The test is com.ibm.icu4jni.test.TestAll. You must define the
	library path to point to the jni library, and set the classpath to
	point to the icu4jni class files. E.g.:<BR><TT>&nbsp;&nbsp;&nbsp;</TT><TT><FONT FACE="Courier New"><FONT SIZE=2>java
	-Djava.library.path=c:\icu4jni\build\lib -classpath
	;c:\icu4jni\build\classes;
	com.ibm.icu4jni.test.TestAll</FONT></FONT></TT><BR>Alternatively,
	you can also run the test by making the 'check' target,
	e.g.:<BR><TT>&nbsp;&nbsp;&nbsp;</TT><TT><FONT FACE="Courier New"><FONT SIZE=2>&lt;full
	nmake command as described above&gt;&nbsp;CHECK</FONT></FONT></TT> 
	</P>
</OL>
<H4 CLASS="western">For Integrating into JVM only</H4>
<P STYLE="margin-left: 0.5in; margin-right: 0.5in">&nbsp;* Place the
java source files in $(TARGETDIR)/com,i.e, &lt;jdksource&gt;/com <BR>&nbsp;*
Add the following lines to &lt;jdk&gt;/make/mkinclude/java_java.jmk
<BR>&nbsp; $(TARGDIR)com/ibm/icu4jni/ICUJNIInterface.java \ <BR>&nbsp;
$(TARGDIR)com/ibm/icu4jni/CharToByteConverterICU.java \ <BR>&nbsp;
$(TARGDIR)com/ibm/icu4jni/ByteToCharConverterICU.java \ <BR>&nbsp; #
the files below are test classes <BR>&nbsp;
$(TARGDIR)com/ibm/icu4jni/ByteToCharGB18030.java \ <BR>&nbsp;
$(TARGDIR)com/ibm/icu4jni/CharToByteGB18030.java \ <BR>&nbsp;* The
JNI wrappers work under the assumption that ICU4C is available and
installed on the target platform. <BR>&nbsp;* For adding additional
codepages open CharacterEncoding.java in &lt;jdksource&gt;/sun/io
directory and add the <BR>&nbsp;&nbsp; aliases to the converter <BR>&nbsp;
for eg: <BR>&nbsp; For GB18030 support you add: <BR>&nbsp;
aliasTable.put( &quot;gb18030&quot; , &quot;GB18030&quot;); <BR>&nbsp;
aliasTable.put( &quot;gb-18030&quot;, &quot;GB18030&quot;); <BR>&nbsp;
aliasTable.put( &quot;gb_18030&quot;, &quot;GB18030&quot;); <BR>&nbsp;
aliasTable.put( &quot;GB-18030&quot;, &quot;GB18030&quot;); <BR>&nbsp;*
Compile JNI wrapper code into dll/so using a C compiler <BR>&nbsp;*
Package the ICUJNIInterface.dll &lt;jdkbuild&gt;/&lt;platform&gt;/bin
directory <BR>&nbsp;* Rebuild the JDK source</P>
</BODY>
</HTML>

icu4jni's People

Contributors

ramv avatar srl295 avatar grhoten avatar poulsbo avatar aheninger avatar douglasfelt avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.