2011-03-30 11:28:49 +02:00
[Installation note of snappy-java]
2011-03-30 09:17:20 +02:00
2011-08-02 08:27:43 +02:00
If your OS platform is one of the Windows/Linux/Mac OS X (32/64 bit Intel CPUs), the installation process described here is unnecessary. Simply put snappy-java-(version).jar to your Java classpath. If your OS is not listed above, create your own snappy-java-(version).jar file as follows.
2011-06-24 02:06:20 +02:00
= Required tools for building snappy-java =
2011-03-30 09:17:20 +02:00
[For all platforms]
* Java 6 (JDK1.6) http://java.sun.com/
2011-03-30 11:28:49 +02:00
- set JAVA_HOME environment variable to the Java installation folder (e.g. JAVA_HOME=C:/Program Files/Java/jdk1.6.0_24 in Windows)
2011-03-30 09:17:20 +02:00
* Maven 3.x http://maven.apache.org/
2011-06-24 02:06:20 +02:00
- Check mvn command can be used from your command line.
2011-03-30 09:17:20 +02:00
2011-06-24 02:06:20 +02:00
[Windows (32/64-bit)]
2011-03-30 09:17:20 +02:00
* GNU make
2011-08-02 08:27:43 +02:00
* And also tar, curl, cp, rm, grep commands are needed. (I use Cygwin and MinGW for building snappy-java in Windows)
2011-03-30 09:17:20 +02:00
2011-06-24 02:06:20 +02:00
[Windows (32-bit only)]
* Install MinGW http://www.mingw.org/
* Set PATH to the following command in MinGW package
- mingw32-g++
- strip
To build x86 (32bit) dll under 64-bit Windows, use "make win32" target.
[Windows (64-bit only)]
2011-03-30 09:17:20 +02:00
* Download MinGW-w64 http://sourceforge.net/projects/mingw-w64/
* Set PATH to the following commands in the downloaded archive:
- x86_64-w64-mingw32-g++
- x86_64-w64-mingw32-strip
2011-03-30 11:28:49 +02:00
NOTICE: Do not use the Cygwin version of MinGW-w64. It fails to build assemblies for 64bit environment.
2011-03-30 16:03:52 +02:00
2011-06-20 07:31:16 +02:00
[Linux (32/64-bit)]
2011-08-02 08:27:43 +02:00
* gcc-4.5.x or higher is necessary because snappy-java uses -static-libstdc++ option. It is possible to use gcc-4.3.x but a dependency to libstdc++ remains in the generated jar file; That means if another version of libstdc++ is used, snappy-java might not work correctly.
2011-06-24 02:06:20 +02:00
* You can build 32-bit native library with 64-bit Linux machine (do make linux32)
2011-06-20 07:31:16 +02:00
[Mac]
* Install gcc, make, etc. included in Mac OS X install disk. (X Code)
2011-06-24 02:06:20 +02:00
* Install mercurial using Mac Ports http://www.macports.org/
2011-03-30 16:03:52 +02:00
2011-03-30 11:28:49 +02:00
= Building snappy-java =
2011-03-30 09:17:20 +02:00
2011-03-30 11:28:49 +02:00
To build jar file of snappy-java, type:
2011-03-30 09:17:20 +02:00
$ make
2011-03-30 16:03:52 +02:00
A native library for your machine environment and a jar package target/snappy-java-(version).jar are produced in the target folder.
2011-03-30 11:28:49 +02:00
2011-06-24 02:06:20 +02:00
= Building only the native library =
2011-06-20 07:31:16 +02:00
$ make native
2011-06-24 02:06:20 +02:00
= Rebuild the native library for your platform =
2011-06-20 07:31:16 +02:00
$ make clean-native native
2011-06-24 02:06:20 +02:00
2011-08-23 05:05:19 +02:00
= Using system installed libsnappyjava (or snappyjava.dll) =
2011-08-16 04:24:22 +02:00
2011-08-16 06:04:57 +02:00
Set org.xerial.snappy.use.systemlib system property to true:
2011-08-16 04:24:22 +02:00
2011-08-16 06:04:57 +02:00
java -Djava.library.path=(path to the installed snappyjava lib) -Dorg.xerial.snappy.use.systemlib=true ...
2011-08-16 04:24:22 +02:00
With this setting snappy-java does not use bundled native libraries. Insted it tries to load native library installed at the path specified in java.library.path.
2011-08-23 05:05:19 +02:00
= Configure snappy-java using property file =
Prepare org-xerial-snappy.properties file (under the root path of your library) in Java's property file format.
Here is a list of the available properties:
* org.xerial.snappy.lib.path (directory containing a snappyjava's native library)
* org.xerial.snappy.lib.name (library file name)
* org.xerial.snappy.tempdir (temporary directory to extract a native library bundled in snappy-java)
* org.xerial.snappy.use.systemlib (if this value is true, use system installed libsnappyjava.so looking the path specified by java.library.path)