Java mapscript
==============

Before you begin, the JAVA_HOME environment variable must be properly set
and the Java programs "java" and "javac" must be on your path.

To generate the SWIG wrappers you need swig > 1.3.24.

+----------------------------------------------------------------------------+
| IMPORTANT API CHANGE: swig 1.3.24 introduced a new way of wrapping         |
| enumerations in Java which breaks compatibility with the mapscript         |
| generated by previous versions of swig.                                    |
| This will change again in the next major version of mapserver (version 5). |
+----------------------------------------------------------------------------+

MAPSCRIPT Reference
-------------------

The complete reference documentation is available on-line:

http://mapserver.gis.umn.edu/docs/reference/mapscript

or in the file:

../doc/mapscript.txt

SWIG wrappers
-------------

MapServer releases, beginning with 4.2.4, contain pre-generated wrapper code
(mapscript/java/mapscript_wrap.c) and class files (mapscript/java/edu).
Nevertheless it is recommended that you generate your own using the "interface"
target in the Java Makefile.

Requires swig > 1.3.24. Version 1.3.28 or 1.3.29 are recommended.

Installation
------------

After MapServer is configured and compiled, change directory to the Java
mapscript location and execute:

    $ cd mapscript/java
    $ make interface
    $ make
    $ make test (optional)
    $ make threadtests (optional)

The 'make interface' step is optional, but strongly recommended, see 'SWIG Wrappers'
above for the details.

Copy libmapscript.so and mapscript.jar to the appropriate location.

Windows
-------

Edit makefile.vc to match your environment.  You will need to set JAVA_HOME 
and SWIG_HOME to the appropriate variables.  You will likely need to copy 
all of the DLLs needed to run MapServer into the mapscript/java directory 
(including libmap.dll) so the mapscript.dll can see them to run.

cd mapscript/java
nmake /f makefile.vc
nmake /f makefile.vc test

International language support
------------------------------

Since May 2006 Java mapscript has complete support for international languages
usage in queries and mapscript internals. To document this improvement
we have created the examples/QueryByAttributeUnicode.java
test program which uses the ISO-8859-15 encoding.

http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1753
http://thread.gmane.org/gmane.comp.gis.mapserver.user/19298/focus=19298
http://thread.gmane.org/gmane.comp.gis.mapserver.user/19213/focus=19213

Onlice resources
----------------

Java mapscript related:

http://mapserver.gis.umn.edu/docs/howto/javamapscript
http://mapserver.gis.umn.edu/docs/howto/java_mapscript_Tomcat_55
http://mapserver.gis.umn.edu/docs/faq/thread_safety

General:

http://mapserver.gis.umn.edu/docs

