tree: 86c173e11ec2a040905596c0d2a00e5c3960f70b [path history] [tgz]
  1. bin/
  2. cmake/
  3. example/
  4. java/
  5. lib/
  6. test/
  7. tool/
  8. .gitignore
  9. analysis_options.yaml
  10. CHANGELOG.md
  11. LICENSE
  12. pubspec.yaml
  13. README.md
pkgs/jnigen/README.md

Build Status

jnigen

This project intends to provide 2 packages to enable JNI interop from Dart & Flutter. Currently this package is highly experimental.

PackageDescription
jniErgonomic C bindings to JNI C API and several helper methods
jnigenTool to generate Dart bindings to Java code using FFI

This project is a work-in-progress and highly experimental. Users can check out and experiment with the examples. We do not guarantee stability of the API or commands at this point.

SDK Requirements

Dart standalone target is supported, but due to some problems with pubspec, the dart command must be from Flutter SDK and not Dart SDK. See dart-lang/pub#3563.

Along with JDK, maven (mvn command) is required. On Windows, it can be installed using a package manager such as chocolatey or scoop.

It‘s recommended to have clang-format installed as well, to format the generated bindings. On Windows, it’s part of the standard Clang install. On Linux, it can be installed through the package manager.

On windows, you need to append the path of jvm.dll in your JDK installation to PATH.

For example, on Powershell:

$env:Path += ";${env:JAVA_HOME}\bin\server".

(If JAVA_HOME not set, find the java.exe executable and set the environment variable in Control Panel).