I had to make a couple of manual changes to the Makefile to build the Java API -- changes that were not noted in the README.
Here is the build line:
$(GCC) -shared -o libfreeling_javaAPI.so freeling_javaAPI.cxx -lfreeling \
-L$(FREELINGDIR)/lib -I$(FREELINGDIR)/include -I$(FREELINGDIR)/include/treeler -I$(JAVADIR)/include \
-I$(JAVADIR)/include/darwin -fPIC -std=c++0x \
- the extension on the shared library needs to be
System.loadLibrary to work correctly.
- you must include
-I$(JAVADIR)/include/darwin as opposed to
-I$(JAVADIR)/include/linux in order to link to the Java native libs (unsurprisingly!)
- you need the multithreaded boost libs:
Hope this helps. Would a pull request on the README be useful?