Java/JNI bindings to libpostal for for fast international street address parsing/normalization

Related tags

Geospatial jpostal
Overview

jpostal

Build Status

These are the Java/JNI bindings to libpostal, a fast, multilingual NLP library (written in C) for parsing/normalizing physical addresses around the world.

Usage

To expand address strings into normalized forms suitable for geocoder queries:

import com.mapzen.jpostal.AddressExpander;

// Singleton, libpostal setup is done in the constructor
AddressExpander e = AddressExpander.getInstance();
String[] expansions = e.expandAddress("Quatre vingt douze Ave des Champs-Élysées");

To parse addresses into components:

import com.mapzen.jpostal.AddressParser;

// Singleton, parser setup is done in the constructor
AddressParser p = AddressParser.getInstance();
ParsedComponent[] components = p.parseAddress("The Book Club 100-106 Leonard St, Shoreditch, London, Greater London, EC2A 4RH, United Kingdom");

for (ParsedComponent c : components) {
    System.out.printf("%s: %s\n", c.getLabel(), c.getValue());
}

To use a libpostal installation with a datadir known at setup-time:

import com.mapzen.jpostal.AddressParser;
import com.mapzen.jpostal.AddressExpander;

AddressExpander e = AddressExpander.getInstanceDataDir("/some/path");
AddressParser p = AddressParser.getInstanceDataDir("/some/path");

Building libpostal

Before building the Java bindings, you must install the libpostal C library. Make sure you have the following prerequisites:

On Ubuntu/Debian

sudo apt-get install curl autoconf automake libtool pkg-config

On CentOS/RHEL

sudo yum install curl autoconf automake libtool pkgconfig

On Mac OSX

brew install curl autoconf automake libtool pkg-config

Installing libpostal

git clone https://github.com/openvenues/libpostal
cd libpostal
./bootstrap.sh
./configure --datadir=[...some dir with a few GB of space...]

make
sudo make install

# On Linux it's probably a good idea to run
sudo ldconfig

Note: libpostal >= v0.3.3 is required to use this binding.

Make sure pkg-config can find libpostal

Some users have reported issues with the jpostal build related to pkg-config.

For jpostal to build, make sure this command runs without any errors:

pkg-config --cflags --libs libpostal

If you get a message like No package 'libpostal' found, try the following:

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

Try the pkg-config --cflags --libs libpostal command again. If it still can't find libpostal, return to the libpostal checkout directory and try:

export PKG_CONFIG_PATH=$(pwd)

Building jpostal

Only one command is needed:

./gradlew assemble

This will implicitly run build.sh which automatically runs the Autotools build for the JNI/C portion of the library and installs the resulting shared libraries in the expected location for java.library.path

Usage in a Java project

The JNI portion of jpostal builds shared object files (.so on Linux, .jniLib on Mac) that need to be on java.library.path. After running gradle assemble the .so/.jniLib files can be found under src/main/jniLibs in the checkout dir. For running the tests, we set java.library.path explicitly here.

For gradle users, there's a plugin called gradle-natives that may be helpful: https://github.com/cjstehno/coffeaelectronica/wiki/Going-Native-with-Gradle

Compatibility

Building jpostal is known to work on Linux and Mac OSX. The Travis CI build tests Oracle JDK 7/8 and OpenJDK 7.

Tests

To run the tests:

./gradlew check

License

The package is available as open source under the terms of the MIT License.

Comments
  • Can't build jpostal

    Can't build jpostal

    After following the instructions in https://github.com/openvenues/jpostal/blob/master/README.md to install libpostal on my mac, everything seem to work, and I did not get any errors.

    When I try running ./gradlew assemble, I get the following error:

    checking for libpostal... no configure: error: Could not find libpostal make: *** No rule to make target `install'. Stop. :buildJniLib FAILED

    FAILURE: Build failed with an exception.

    • What went wrong: Execution failed for task ':buildJniLib'.

      Process 'command './build.sh'' finished with non-zero exit value 2

    • Try: Run with --info or --debug option to get more log output.

    • Exception is: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':buildJniLib'. at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46) at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35) at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64) at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58) at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52) at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53) at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185) at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66) at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110) at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37) at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23) at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43) at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30) at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:154) at org.gradle.internal.Factories$1.create(Factories.java:22) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:52) at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:151) at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32) at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:99) at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:93) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:62) at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:93) at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:82) at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:94) at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28) at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:43) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28) at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:77) at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:47) at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:51) at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:28) at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43) at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:170) at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237) at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210) at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35) at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22) at org.gradle.launcher.Main.doAction(Main.java:33) at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45) at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54) at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35) at org.gradle.launcher.GradleMain.main(GradleMain.java:23) at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61) Caused by: org.gradle.process.internal.ExecException: Process 'command './build.sh'' finished with non-zero exit value 2 at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:367) at org.gradle.process.internal.DefaultExecAction.execute(DefaultExecAction.java:31) at org.gradle.api.tasks.AbstractExecTask.exec(AbstractExecTask.java:54) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:227) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:220) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:209) at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:585) at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:568) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61) ... 60 more

    BUILD FAILED

    Total time: 11.833 secs

    opened by zonapellucida 22
  • Build jpostal error on Mac OS

    Build jpostal error on Mac OS

    I followed instructions to build postal and jpostal on MacOS per https://github.com/openvenues/jpostal. Everything worked fine until running:

    ./gradlew assemble

    Which resulted in the following error. How to resolve this? See below. Thank you.

    .......

    checking if javac works... yes
    checking for javac... /usr/bin/javac
    checking symlink for /usr/bin/javac... /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/javac
    checking for /System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers/jni.h... no
    checking for /System/Library/Frameworks/JavaVM.framework/Versions/include/jni.h... no
    configure: error: cannot find JDK header files
    make: *** No rule to make target `install'.  Stop.
    :buildJniLib FAILED
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':buildJniLib'.
    > Process 'command './build.sh'' finished with non-zero exit value 2
    
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    
    BUILD FAILED
    
    Total time: 17.889 secs
    
    opened by coachwei 13
  •  Setup Error: Error loading transliteration module

    Setup Error: Error loading transliteration module

    Trying to install on the following : Linux HP-Pavilion-15-Notebook-PC 4.8.0-41-generic #44~16.04.1-Ubuntu SMP Fri Mar 3 17:11:16 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

    When I try to check ./src/address_parser I get the following error: Loading models... ERR Error loading transliteration module, dir=(null) at libpostal_setup_datadir (libpostal.c:1069) errno: No such file or directory

    The following are the steps I've used:

    cd ~
    rm -rf libpostal
    git clone https://github.com/openvenues/libpostal
    cd libpostal
    ./bootstrap.sh
    ./configure LDFLAGS=-L/usr/lib64 --datadir=$(pwd)/data --prefix=$(realpath $(pwd)) --bindir=$(realpath $(pwd)/bin)
    make install
    sudo ldconfig
    ./src/address_parser
    

    Any guidance would be great. I'm a newbie ubuntu user but would love to check this module out for python.

    opened by TheLegend29 11
  •  Expander and Parser not in java.library.path

    Expander and Parser not in java.library.path

    Hi, I'm trying to execute the package but I got this errors (after a lot of work to build and compile everything from libpostal!!). What I've done is:

    • install libpostal
    • build jpostal (./gradlew assemble) -> this give me the jpostal-master.jar
    • copy jpostal-master.jar into lib in my project -> this let me import com.mapzen.jpostal.AddressExpander into a class of my project
    • when I try to execute one of the examples (Parser, and Expander) this is the result:

    Hello JPostal! Exception in thread "main" java.lang.UnsatisfiedLinkError: no jpostal_expander in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867) at java.lang.Runtime.loadLibrary0(Runtime.java:870) at java.lang.System.loadLibrary(System.java:1122) at MerchantBuilder.examples.AddressExpander.(AddressExpander.java:7) at MerchantBuilder.TestJPostal.main(TestJPostal.java:24) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)

    Please can u help me with this? I really want to explore the possibilities of LibPostal in NLP workflows...but it's really hard to set up all the environment, cause to the fact there is no sbt/maven inclusion!! Thanks

    opened by gianvi 11
  • Parser/expander not loaded

    Parser/expander not loaded

    Hi are u familiar with this issue? It's happen when I try to expand an address string with and without lang options.... (I'm using scala)

    ERR language_classifier not loaded, run libpostal_setup_language_classifier() at classify_languages (language_classifier.c:63) errno: No such file or directory ERR parser is not setup, call libpostal_setup_address_parser() at address_parser_parse (address_parser.c:808) errno: No such file or directory ERR Parser returned NULL at parse_address (libpostal.c:1046) errno: No such file or directory

    opened by gianvi 10
  • tomcat 7, failed libpostal_setup

    tomcat 7, failed libpostal_setup

    During the libpostal install, I set datadir to /var/lib. After the gradle build for jpostal I copied everything from src/main/jniLibs/lib to /usr/local/lib/jpostal.

    In tomcat.conf, the java.library.path is set to /usr/local/lib/libpostal:/usr/local/lib/jpostal.

    Upon trying to parse an address, tomcat crashes with the following in catalina.log :

    ^[[31mERR^[[39m   Error loading transliteration module
      ^[[90m at libpostal_setup (libpostal.c:1057) ^[[94merrno: No such file or directory^[[39m
    

    I poked around through the source of libpostal and traced that back to loading the transliteration.dat file, which is located at /var/lib/libpostal/transliteration/transliteration.dat.

    What do I need to add to the tomcat configuration so that it finds the datafile?

    opened by krustyfur 7
  • gradlew check fail on :test

    gradlew check fail on :test

    I followed the steps of installing libpostal and followed it with installing jpostal. Libpostal works via command line and the jpostal built successfully but the test :test failed when running "./gradlew check" per the readme.md. Below is the following output to the console and the log file is attached.

    :test FAILED

    FAILURE: Build failed with an exception.

    • What went wrong: Execution failed for task ':test'.

      Process 'Gradle Test Executor 1' finished with non-zero exit value 134

    • Exception is: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':test'. hs_err_pid80052.log.zip

    opened by tdicken73 7
  • Create a tag of the latest commit as 1.0 release?

    Create a tag of the latest commit as 1.0 release?

    Hi, thanks for all the work you do on libpostal and the various language bindings! We are excited to use them to improve our data quality.

    I am using RPM to package and distribute libpostal and jpostal to our fleet. Our RPM builder bootstraps source code packages, preferably from the Releases tab of the upstream Github project.

    I see that you have tagged a pypostal as 1.0, which has an analog in jpostal.

    Would it be possible for you to tag the latest jpostal commit so that Github packages it up as tarball and zip packages?

    opened by mateor 3
  • ./gradlew assemble

    ./gradlew assemble

    ./gradlew assemble :buildJniLib libtoolize: putting auxiliary files in .'. libtoolize: copying file./ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIR, m4'. libtoolize: copying filem4/libtool.m4' libtoolize: copying file m4/ltoptions.m4' libtoolize: copying filem4/ltsugar.m4' libtoolize: copying file m4/ltversion.m4' libtoolize: copying filem4/lt~obsolete.m4' configure.ac:11: installing './compile' configure.ac:11: installing './config.guess' configure.ac:11: installing './config.sub' configure.ac:9: installing './install-sh' configure.ac:9: installing './missing' src/main/c/Makefile.am: installing './depcomp' checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking how to print strings... printf checking for style of include used by make... GNU checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking dependency style of gcc... gcc3 checking for a sed that does not truncate output... /bin/sed checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for fgrep... /bin/grep -F checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 1572864 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... yes checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop checking for /usr/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm -B output from gcc object... ok checking for sysroot... no checking for mt... mt checking if mt is a manifest tool... no checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries...yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking for gcc option to accept ISO C99... -std=gnu99 checking for gcj... no checking for guavac... no checking for jikes... no configure: error: no acceptable Java compiler found in $PATH checking for javac... no make: *** No rule to make target `install'. Stop.

    :buildJniLib FAILED

    FAILURE: Build failed with an exception.

    • What went wrong: Execution failed for task ':buildJniLib'.

    Process 'command './build.sh'' finished with non-zero exit value 2

    • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

    BUILD FAILED

    Total time: 24.033 secs

    opened by thx-fan 3
  • Tests failing to link

    Tests failing to link

    When I run the tests using ./gradle check or as a unit test in IntelliJ I get: java.lang.UnsatisfiedLinkError: /home/<>/jpostal/src/main/jniLibs/libjpostal_expander.so.0.0.0: libpostal.so.1: cannot open shared object file: No such file or directory

    The files are there and libpostal works.

    So far I've tried cleaning out and reinstalling the libpostal libraries, explicitly pointing to /usr/local/lib, and a few other things but no hints as to why it's not being found.

    Building on Linux btw.

    opened by mkaranta 3
  • Can't load native library

    Can't load native library

    When running test java code, got the following error (I added a "main" method to the TestAddressParser class):

    $  java -classpath .:../../libs/jpostal.jar com.mapzen.jpostal.TestAddressParser 
    Exception in thread "main" java.lang.UnsatisfiedLinkError: no jpostal_parser in java.library.path
    	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
    	at java.lang.Runtime.loadLibrary0(Runtime.java:870)
    	at java.lang.System.loadLibrary(System.java:1122)
    	at com.mapzen.jpostal.AddressParser.<clinit>(AddressParser.java:8)
    	at com.mapzen.jpostal.TestAddressParser.testParse(TestAddressParser.java:17)
    	at com.mapzen.jpostal.TestAddressParser.testParseUSAddress(TestAddressParser.java:54)
    	at com.mapzen.jpostal.TestAddressParser.main(TestAddressParser.java:13)
    

    Looks like that I need to set up the java.library.path (I checked this property. None of the directories that it points to have the libpostal library). What should I set to the java.library.path variable?

    ( I did built/installed libpostal and jpostal following the instructions on https://github.com/openvenues/jpostal)

    opened by coachwei 3
  • no jpostal_parser in java.library.path

    no jpostal_parser in java.library.path

    I have been trying to load jpostal into an existing maven project. To do this, I added a jpostal folder with the following files at the root directory of my project:

    1. libjpostal_expander.a
    2. libjpostal_expander.jnilib
    3. libjpostal_expander.la
    4. libjpostal_parser.a
    5. libjpostal_parser.jnilib
    6. libjpostal_parser.la

    This is my main class:

    public class Main {
        public static void main(String[] args) {
            System.loadLibrary("jpostal_parser");
        }
    }
    
    

    Before running my class, I set -Djava.library.path=./jpostal.

    This is the output:

    /Library/Java/JavaVirtualMachines/jdk-11.0.15.jdk/Contents/Home/bin/java -Djava.library.path=./jpostal -javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=56917:/Applications/IntelliJ IDEA.app/Contents/bin -Dfile.encoding=UTF-8 -classpath /Users/areeb.siddiqui/Documents/Projects/jpostalLibTest/target/classes Main
    Exception in thread "main" java.lang.UnsatisfiedLinkError: no jpostal_parser in java.library.path: [./jpostal]
    	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2662)
    	at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:827)
    	at java.base/java.lang.System.loadLibrary(System.java:1871)
    	at Main.main(Main.java:3)
    
    Process finished with exit code 1
    

    Compute Details: Chip: MacBook Pro (M1 Pro chip) OS: macOS Monterey (v12.1)

    Things already tried:

    1. Copy jpostal files into another project and try and load it there. Doesn't work.
    2. I tried using System.load() instead of loadLibrary by giving it the absolute path of the libjpostal_parser.jnilib. It gave me an error that it can not find the file.
    3. I tried playing with changing the working directory and java.library.path to reference the library in other ways. Didn't work.
    4. Clone jpostal locally and build it on my computer then copy the resulting src/main/jniLibs content into /jpostal in my project. Building it was a bit tricky. I had to comment out AX_JNI_INCLUDE_DIR in configure.ac because it kept trying to find JDK header in locations where it isnt as I have installed oracle jdk and the macro fails to look inside /Library/Java/JavaVirtualMachines/jdk-11.0.15.jdk/Contents/Home/include. Then removed the loop that was creating CFLAGS variable and replace that with the following lines:
    CFLAGS="-I/Library/Java/JavaVirtualMachines/jdk-11.0.15.jdk/Contents/Home/include"
    CFLAGS="$CFLAGS -I/Library/Java/JavaVirtualMachines/jdk-11.0.15.jdk/Contents/Home/include/darwin"
    

    Didn't work.

    I am out of ideas on what could possibly be wrong. How to fix this?

    opened by mareebsiddiqui 0
  • ./gradlew assemble fails due to missing file when the file clearly exists

    ./gradlew assemble fails due to missing file when the file clearly exists

    I'm trying to build JPostal as described in this link using the following command:

    ./gradlew assemble
    

    However, the command produces the following output claiming the file /../tcl-tea.m4 does not exist when it clearly does:

    :buildJniLibaclocal-1.16: error: aclocal: file '/x/Program Files/Msys64/usr/share/aclocal/tcl-tea.m4' does not exist
    autoreconf-2.71: error: aclocal failed with exit status: 1
    ./build.sh: line 3: ./configure: No such file or directory
    make: *** No rule to make target 'install'.  Stop.
     FAILED
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':buildJniLib'.
    > Process 'command 'sh'' finished with non-zero exit value 2
    
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    
    BUILD FAILED
    
    Total time: 3.387 secs
    

    I can clearly see a file named tcl-tea.m4 in the directory: C:\x\Program Files\Msys64\usr\share\aclocal

    See the screenshot below:

    [enter image description here]2

    If the file clearly exists, why am I getting this error? Why is the file being discriminated against?

    opened by BG864 0
  • Cannot Assemble

    Cannot Assemble

    This the assemble command yields an error:

    ./gradlew assemble --stacktrace  
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Could not determine java version from '11.0.9'.
    
    * Try:
    Run with --info or --debug option to get more log output.
    
    * Exception is:
    java.lang.IllegalArgumentException: Could not determine java version from '11.0.9'.
    

    My OS:

    $ neofetch -off
    OS: macOS Big Sur 11.0.1 20B29 x86_64 
    Host: MacBookPro15,1 
    Kernel: 20.1.0 
    Uptime: 2 days, 23 hours, 32 mins 
    Packages: 171 (brew) 
    Shell: zsh 5.8 
    Resolution: 1680x1050@2x, 3840x1600@2x, 1050x1680@2x 
    DE: Aqua 
    WM: Quartz Compositor 
    WM Theme: Blue (Dark) 
    Terminal: vscode 
    CPU: Intel i7-8850H (12) @ 2.60GHz 
    GPU: Intel UHD Graphics 630, Radeon Pro 560X 
    Memory: 12592MiB / 16384MiB 
    $ java --version       
    openjdk 11.0.9 2020-10-20
    OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.9+11)
    Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.23.0, JRE 11 Mac OS X amd64-64-Bit Compressed References 20201023_788 (JIT enabled, AOT enabled)
    OpenJ9   - 0394ef754
    OMR      - 582366ae5
    JCL      - 3b09cfd7e9 based on jdk-11.0.9+11)
    $ gradle --version                   
    
    ------------------------------------------------------------
    Gradle 6.7.1
    

    Tried it with IntelliJ as well for good measure:

    Cannot determine classpath for resource 'java/sql/SQLException.class' from location 'jrt:/java.sql/java/sql/SQLException.class'.
    
    The project uses Gradle 2.9 which is incompatible with IDEA running on Java 10 or newer.
    See details at https://github.com/gradle/gradle/issues/8431
    Possible solution:
     - Upgrade Gradle wrapper to 4.8.1 version and re-import the project
    
    opened by tbrodbeck 1
  • Fix modified utf-8 issues

    Fix modified utf-8 issues

    I recently bumped into JNI's usage of modified UTF-8, which was causing the parser / expander to error and hang when I passed in any address which contained \0, \u0000 or any 4 byte UTF-8 character.

    I did a bit of reading up on the way to work around the issue (this blog was quite instructive: http://banachowski.com/deprogramming/2012/02/working-around-jni-utf-8-strings/), and had a crack at making a fix to avoid the usage of NewStringUTF and GetStringUTFChars and instead passing jbyteArray into and out of the JNI code.

    I've added some new tests which were failing before the change, and are now passing for me. This was the first time going anywhere near C code for me so would be really appreciative if someone could check I'm not doing anything really stupid or dangerous e.g. not releasing memory (I can see this project has been dormant for a while so will understand if that's not possible!).

    This should fix https://github.com/openvenues/jpostal/issues/36

    And also hopefully is the more general solution you referenced in this other pull request: https://github.com/openvenues/jpostal/pull/22

    Noteworthy things:

    1. If you pass in a \0 or \u0000 character in the middle of your address string the rest of the string will be truncated (I assume this is because C uses NUL terminated char arrays so it just stops at a NUL char). Removing these from the middle of an address felt like something that should be done as an upfront step by the user rather than in jpostal

    2. There are still usages of GetStringUTFChars and NewStringUTF remaining, but they are for strings which should shouldn't contain problematic characters, e.g. languages and other parser options. I've only changed how the address input string is handled

    opened by wboult 1
  • jpostal in msys2 issues

    jpostal in msys2 issues

    Been trying to get this working in msys2 - the build.sh keeps erroring out

    fun descriptive error with --stacktrace

    # ./gradlew assemble --stacktrace
    :buildJniLib FAILED
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':buildJniLib'.
    > A problem occurred starting process 'command './build.sh''
    
    * Try:
    Run with --info or --debug option to get more log output.
    
    * Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':buildJniLib'.
            at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
            at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
            at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
            at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
            at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
            at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
            at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
            at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
            at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
            at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
            at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
            at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
            at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
            at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)
            at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
            at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
            at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
            at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
            at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
            at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
            at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
            at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
            at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:154)
            at org.gradle.internal.Factories$1.create(Factories.java:22)
            at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
            at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:52)
            at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:151)
            at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
            at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:99)
            at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:93)
            at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
            at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:62)
            at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:93)
            at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:82)
            at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:94)
            at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
            at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
            at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:43)
            at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28)
            at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:77)
            at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:47)
            at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:51)
            at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:28)
            at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)
            at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:170)
            at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
            at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
            at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
            at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
            at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
            at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
            at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
            at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
            at org.gradle.launcher.Main.doAction(Main.java:33)
            at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
            at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
            at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
            at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
            at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
            at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
            at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
    Caused by: org.gradle.process.internal.ExecException: A problem occurred starting process 'command './build.sh''
            at org.gradle.process.internal.DefaultExecHandle.setEndStateInfo(DefaultExecHandle.java:197)
            at org.gradle.process.internal.DefaultExecHandle.failed(DefaultExecHandle.java:327)
            at org.gradle.process.internal.ExecHandleRunner.run(ExecHandleRunner.java:86)
            at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
            at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
    Caused by: net.rubygrapefruit.platform.NativeException: Could not start './build.sh'
            at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(DefaultProcessLauncher.java:27)
            at net.rubygrapefruit.platform.internal.WindowsProcessLauncher.start(WindowsProcessLauncher.java:22)
            at net.rubygrapefruit.platform.internal.WrapperProcessLauncher.start(WrapperProcessLauncher.java:36)
            at org.gradle.process.internal.ExecHandleRunner.run(ExecHandleRunner.java:68)
            ... 2 more
    Caused by: java.io.IOException: Cannot run program "./build.sh" (in directory "C:\msys64\home\<redacted>\jpostal"): CreateProcess error=193, %1 is not a valid Win32 application
            at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(DefaultProcessLauncher.java:25)
            ... 5 more
    Caused by: java.io.IOException: CreateProcess error=193, %1 is not a valid Win32 application
            ... 6 more
    

    So I thought I would run it line by line and it was fine until I got to 'make install'

    found an issue with the JAVA_HOME and corrected it - then it could not find jni_md.h

    So I modified the ax_jni_include_dir.m4 to assume that it was going to look in the subdirectory win32

    But wait - there's more ;)

    Now after all that I am getting the error

    /c/Java/jdk1.8.0_231/include/win32/jni_md.h:34:9: error: unknown type name ‘__int64’
       34 | typedef __int64 jlong;
          |         ^~~~~~~
    make[1]: *** [Makefile:473: libjpostal_parser_la-jpostal_AddressParser.lo] Error 1
    make[1]: Leaving directory '/home/<redacted>/jpostal/src/main/c'
    make: *** [Makefile:402: install-recursive] Error 1
    

    Am I using the wrong version of java? Any help is appreciated.

    opened by jacwalte 5
  • libpostal logs

    libpostal logs "invalid UTF-8" warning for a string having "\0" or "\u0000" and stays in waiting state

    Using the jpostal, if I call jpostal parseaddress like:

    AddressParser.getInstance().parseAddress("Rue du Médecin-Colonel Calbairac Toulouse France\u0000")

    I am seeing this warning logged

    WARN  invalid UTF-8
       at transliterate (transliterate.c:791) errno: No such file or directory
    WARN  invalid UTF-8
       at transliterate (transliterate.c:791) errno: No such file or directory
    WARN  invalid UTF-8
       at transliterate (transliterate.c:791) errno: No such file or directory
    WARN  invalid UTF-8
       at transliterate (transliterate.c:791) errno: No such file or directory
    

    And the thread remains in waiting state.. This happens only when the address have \u0000 or (simple \0) character in it. Simplest solution seems to not send \0 character or replace it before calling parseAddress...

    opened by myasirkhan 1
Releases(1.0)
Owner
openvenues
An open source project sponsored by Mapzen.
openvenues
Open source routing engine for OpenStreetMap. Use it as Java library or server.

GraphHopper Routing Engine GraphHopper is a fast and memory efficient Java routing engine, released under Apache License 2.0. By default it uses OpenS

GraphHopper 4k Jan 3, 2023
LocationTech Spatial4j: A Geospatial Library for Java

Spatial4j (note: Spatial4j's official home page is at LocationTech: https://projects.eclipse.org/projects/locationtech.spatial4j but this README has r

LocationTech 880 Dec 23, 2022
The JTS Topology Suite is a Java library for creating and manipulating vector geometry.

JTS Topology Suite The JTS Topology Suite is a Java library for creating and manipulating vector geometry. It also provides a comprehensive set of geo

LocationTech 1.5k Jan 6, 2023
Geohash utitlies in java

geo Java utility methods for geohashing. Status: production, available on Maven Central Maven site reports are here including javadoc. Add this to you

Dave Moten 386 Jan 1, 2023
LocationTech Spatial4j: A Geospatial Library for Java

Spatial4j (note: Spatial4j's official home page is at LocationTech: https://projects.eclipse.org/projects/locationtech.spatial4j but this README has r

LocationTech 880 Dec 23, 2022
GeoServer is an open source software server written in Java that allows users to share and edit geospatial data

GeoServer is an open source software server written in Java that allows users to share and edit geospatial data. Designed for interoperability, it publishes data from any major spatial data source using open standards.

GeoServer 3k Jan 1, 2023
TrashEmail is hosted Telegram bot that can save your private email address by offering disposable email address

TrashEmail is hosted Telegram bot that can save your private email address by offering disposable email address. It can create, manage, disposable email address and link them with your telegram bot chat.

Rohit Sehgal 493 Dec 28, 2022
A JNI code generator based on the JNI generator used by the eclipse SWT project

HawtJNI Description HawtJNI is a code generator that produces the JNI code needed to implement java native methods. It is based on the jnigen code gen

FuseSource 153 Nov 17, 2022
A desktop application designed to serve the co-curricular uses of students, clubs and forums, and admins of United International University.

ECA Management System Made by "Team Apocalypse": S M Jishanul Islam Sadia Ahmmed Sahid Hossain Mustakim Description A desktop application designed to

S M Jishanul Islam 2 Jan 31, 2022
A Local implementation of a java library functions to create a serverside and clientside application which will communicate over TCP using given port and ip address.

A Local implementation of java library functions to create a serverside and clientside application which will communicate over TCP using given port and ip address.

Isaac Barry 1 Feb 12, 2022
Reference implementation for MINAS (MultI-class learNing Algorithm for data Streams), an algorithm to address novelty detection in data streams multi-class problems.

Reference implementation for MINAS (MultI-class learNing Algorithm for data Streams), an algorithm to address novelty detection in data streams multi-class problems.

Douglas M. Cavalcanti 4 Sep 7, 2022
Screaming fast JSON parsing and serialization library for Android.

#LoganSquare The fastest JSON parsing and serializing library available for Android. Based on Jackson's streaming API, LoganSquare is able to consiste

BlueLine Labs 3.2k Dec 18, 2022
JPassport works like Java Native Access (JNA) but uses the Foreign Linker API instead of JNI. Similar to JNA, you declare a Java interface that is bound to the external C library using method names.

JPassport works like Java Native Access (JNA) but uses the Foreign Linker API instead of JNI. Similar to JNA, you declare a Java interface t

null 28 Dec 30, 2022
A library for bypassing all of Java's security mechanisms, visibility checks, and encapsulation measures via the JNI API

Narcissus: thwart strong encapsulation in JDK 16+ Narcissus is a JNI native code library that provides a small subset of the Java reflection API, whil

ToolFactory 29 Nov 3, 2022
Starting JNI in Mac vscode environment

JNI Starting JNI in Mac vscode environment. 본 소스코드 경로는 [projectname]/src/* 이다. Java 소스코드 작성 Decline native, load library (helloJNI.java 소스코드 참조) 클래스 파

김용빈 2 Nov 4, 2022
The ANT HAL Service functions as a JNI wrapper for the ANT HAL.

Android ANT HAL Service v.4.0.0 - 25 Aug 2014 The ANT HAL Service functions as a JNI wrapper for the ANT HAL. The ANT Hal Service provides the messagi

Project Kaleidoscope 0 Jun 11, 2022
Jaeger Bindings for Java OpenTracing API

Jaeger's Tracing Instrumentation Library for Java Intended to be used with Jaeger backend, but can also be configured to send traces to Zipkin. Implem

Jaeger - Distributed Tracing Platform 485 Dec 5, 2022
Java Bindings for V8

J2V8 J2V8 is a set of Java bindings for V8. J2V8 focuses on performance and tight integration with V8. It also takes a 'primitive first' approach, mea

EclipseSource 2.3k Jan 4, 2023
Java Foreign Linker bindings to Lua

jpanlua Java bindings to liblua using JEP 398: Foreign Linker API. Requires JDK 16 or above. Requires -Dforeign.restricted=permit JRE flag. Exports pa

Aly Cerruti 5 Dec 24, 2021
jextract is a tool which mechanically generates Java bindings from a native library headers.

Jextract jextract is a tool which mechanically generates Java bindings from a native library headers. This tools leverages the clang C API in order to

OpenJDK 120 Dec 30, 2022