
                         Java API for idnkit
             -- internationalized domain name toolkit --
                               version 2
               Japan Registry Services Co., Ltd.(JPRS)


Table of contents of this file:

  1. Overview
  2. Components
  3. Build from source
  4. Contact information


1. Overview

This package provides Java API for idnkit, working on J2SE 5.0 and later.
Currently, it supports idnkit version 2 (2.0 and later versions).

To use this API package, idnkit binary (at least libidnkitlite shared
library) and JNA (Java Native Access) are required.

The latest version of idnkit can be found at:

        http://jprs.co.jp/idn/

Also the latest version of Java API for idnkit can be found here.
The latest version of JNA can be retrieved from:

        https://jna.dev.java.net/

Since JNA has native code dispatcher and it depends on operating
system, the official JNA distribution (jna.jar) doesn't work on
every systems.  Please check its supported systems.

If you'd like to build the package from the source distribution, also
Apache Ant and JUnit are required.  Apache Ant can be found at:

        http://ant.apache.org/

and JUnit can be found at:

        http://www.junit.org/


2. Components

Java API for idnkit consists of a JAR file 'idnkit.jar' and API
documents generated by JavaDoc.  In addition, the source distribution
includes source files, test suites and sample programs.


3. Build from source

Go to the top directory of the source distribution where 'build.xml'
file resides.  If JDK on your system doesn't known where JNA or JUnit
resides, put them on the 'lib' sub-directory, like this:

        % ls lib
        jna.jar  junit-4.8.2.jar  junit-dep-4.8.2.jar

Edit 'build.properties' file.  The 'idnkitlitedir' property represents
an absolute path to the directory of libidnkitlite shared library.

        idnkitlibdir=/usr/local/lib

On Windows, type two backslashes (\\) for the separator, like:

        idnkitlibdir=C:\\Program Files\\idnkit\\lib

Then, type 'ant'.  It builds 'idnkit.jar' and generates JavaDoc documents
under the 'dist' sub-directory.  (This package doesn't support Ant launcher
of Eclipse.)

        % ant

Type 'ant test' to compile and run test programs.

        % ant test

Optionally, type 'ant tools' to compile sample programs.

        % ant tools

The following sample programs are built under the 'tools/build'
sub-directory.

    idnconv.sh
        Tiny 'idnconv' ('idnconv2' in idnkit version 2) command.
	Its main source is 'tools/src/IDNConv.java'.
	It always works as if '-whole' option is specified.

    idncmp.sh
        Tiny 'idncmp' command.
	Its main source is 'tools/src/IDNCmp.java'.

    idncheck.sh
        Tiny 'idncheck' command.
	Its main source is 'tools/src/IDNCheck.java'.

Those sample programs do not support some options the native commands
have.  For more details about options, execute the sample programs with
'-help' option.


4. Contact information

The latest version and information about Java API for idnkit can be
found at:

	http://jprs.co.jp/idn/

Send bug reports and comments to

	idnkit-info@jprs.co.jp
