Home

Awesome

jinterface-builder

Clojars Project

The means by which Clojang projects generate new JInterface releases to Clojars

Clojang logo

Contents

Introduction

The various Clojang projects use various versions of Erlang's JInterface Java library, depending upon the version of Erlang (see the table below to check which versions of Erlang pair up with which versions of JInterface).

In fact, getting Erlang, JInterface, and Clojure working together can be tricky just for the simple fact that the JInterface .jar files available in various locations online can be mismatched with the intended version of Erlang (or not built properly).

Due to the problems we have encountered in running Clojure/BEAM applications with the available JInterface .jar files on Clojars, we needed a reliable solution. After the good results, we wanted to help out by publishing what, so far, seem to be working JInterface .jar files on Clojars. They are available here:

(Note that we don't yet have automated builds and testing set up for those; feedback/assistance is welcome).

To make this easier for devs to do themselves, the JInterface "builder" (a handful of make targets) has been released as its own project: this one.

A Note on Versions

JInterface is only guaranteed to work with the version of Erlang with which it was released. The following table correlates version numbers:

Erlang ReleaseErlang Version (erts)JInterface
21.0101.9
20.39.31.8.1
19.38.31.7.1
19.28.21.7.1
19.18.11.7.1
19.08.01.7
18.37.31.6.1
18.27.21.6.1
18.17.11.6
18.07.01.6
17.56.41.5.12
17.46.31.5.11
17.36.21.5.10
17.26.11.5.9
17.16.11.5.9
17.06.01.5.9
R16B035.10.41.5.8
R16B025.10.31.5.8
R16B015.10.21.5.8
R16B5.10.11.5.8
R15B035.9.31.5.6
R15B025.9.21.5.6
R15B015.9.11.5.6
R15B5.91.5.5

A convenience target is provided to display the versions that will be used to build JInterface:

$ make show-versions

Here is the list of versions we've published on Clojars to date (also availble here):

If you would like to use a version not yet uploaded to Clojars, let us know (i.e., open a ticket), and we'll see what we can do to get you sorted.

Dependencies

Building

To ensure that your version of JInterface is ready for use by Clojure with your version of Erlang, simply do this:

$ make

(Which points to the the jinterface-local target.)

This will discover the Erlang root directory for the first erl found in your PATH. This will be used to find the JInterface Java source files for that version of Erlang.

If you wish to override this, you may do the following:

$ make ERL_LIBS=/opt/erlang/15.3.1

This make target (which depends upon Maven being installed) will generate a lein-friendly .jar file for you in your ~/.m2/repository directory, just like lein does with downloaded Clojars.

License

Copyright © 2018 The Clojang Project

Copyright © 2016-2017 Duncan McGreggor

Distributed under the Apache License Version 2.0.
<!-- Named page links below: /-->