lib-carabiner allows you to embed Carabiner inside a Java project, and automatically run it when needed, as long as you are running on a supported operating system and processor architecture. The combinations currently supported are:
- Linux Intel 64 bit
- macOS Intel 64 bit
- Raspberry Pi (Linux ARM 32 bit)
- Windows Intel 64 bit
lib-carabiner is available through Maven Central, so to use it in your Maven project, all you need is to include the appropriate dependency.
Click the maven central badge above to view the repository entry for lib-carabiner. The proper format for including the latest release as a dependency in a variety of tools, including Leiningen if you are using lib-carabiner from Clojure, can be found in the Dependency Information section.
lib-carabiner uses slf4j to allow you to integrate it with whatever Java logging framework your project is using, so you will need to include the appropriate slf4j binding on your class path.
It also uses edn-java to parse and build the Extensible Data Notation format messages used by Carabiner.
See the API Documentation for full details, but here is a nutshell guide:
org.deepsymmetry.libcarabiner offers a
that manages an embedded native instance of Carabiner for you. Call
to get that singleton, and then you can call
to determine whether a native build of Carabiner is offered for the
current operating system and processor architecture. If so, you can call
to extract and run it, and
when you want to terminate it.
It also offers a
that you can construct using the response lines that Carabiner sends
you, and it will parse their
edn structure for you, giving
you a convenient Java String and Map to work with instead.
Copyright © 2020 Deep Symmetry, LLC
Distributed under the Eclipse Public License 2.0. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software. A copy of the license can be found in LICENSE.md within this project.