1
0
Fork
You've already forked hunspell-java
0
Java bindings to Hunspell
  • Java 100%
Find a file
Ole Schönburg 5406bce194 Merge branch '9-provide-classloader-to-nativelibrary-getinstance' into 'master'
Resolve "provide classloader to NativeLibrary.getInstance"
Closes #9
See merge request dumonts/hunspell-java!16 
2023年01月31日 21:07:04 +00:00
.mvn Remove deploy from CI config 2019年11月03日 13:37:07 +01:00
src fix: don't rely on thread context classloader 2023年01月31日 21:59:08 +01:00
.gitignore Ignore target dir 2022年11月23日 19:40:38 +01:00
.gitlab-ci.yml Slim down CI 2022年11月20日 15:42:26 +01:00
.gitmodules Initial commit 2019年03月12日 15:15:53 +01:00
CHANGELOG.md Release 2.1.1 2022年11月24日 17:48:37 +01:00
LICENSE Add License 2019年10月27日 10:08:26 +00:00
pom.xml Prepare for 2.2.0 2023年01月31日 22:02:24 +01:00
README.md Replace bridj with JNA 2022年11月20日 15:23:15 +01:00

Hunspell for Java

Provides Java bindings and wrappers for Hunspell 1.7. We generate JNA bindings with jnaerator and wrap the automatically generated bindings.

Upgrading libhunspell

The libhunspell source code is included as a git submodule under src/main/cpp/hunspell. Update the submodule and then rebuild hunspell.

Building libhunspell

Building for Linux is fairly straightforward. Install required build dependencies hunspell documentation. After installing dependencies, the following steps should work. If it doesn't, refer to the build instructions of hunspell.

git submodule init
git submodule update
cd src/main/cpp/hunspell
autoreconf -vfi
./configure
make
cp src/hunspell/.libs/libhunspell-1.7.so ../../resources/org/bridj/lib/linux_x64/libhunspell.so

The last step copies the dynamic library to the appropriate resource folder (assuming you build on a 64 bit system). You can use strip to save some space on debug symbols.

Building for Windows is tricky because we want to create a dll that statically links most dependencies. In general we want to create a static library with MXE and then create a dynamic library from these static sources, including statically build runtime dependencies.

After building libhunspell for all desired platforms and moving the binaries to the proper resources folder, you can use the usual maven lifecycle to build, test, package and deploy the java side of things. For example to generate jars run mvm package.