Uh oh!
There was an error while loading. Please reload this page.
Maven generates an auto installable jar with C libraries embedded. - #78
Maven generates an auto installable jar with C libraries embedded.#78pabloa wants to merge 1 commit into
Conversation
Only tested on Linux. When jpy is invoked from the JVM, C libraries are extracted to the temporal directory and jpy library is initialized. Therefore there is not need to install JPY by compiling jpy sources. It is enough to use the generated jar file.
forman
commented
Mar 8, 2017
@pabloa nice work! Could you meanwhile test on other platforms? (We urgently need Travis/AppVeyor support.) |
pabloa
commented
Mar 8, 2017
Hello, Regarding to the jar generation with the compiled C modules embebbed, it should work in the 3 OS because maven is instructed to include .so and .dll files. But again, no windows box to test it. |
| OutputStream output = null; | ||
| byte[] buffer = new byte[8 * 1024]; | ||
| try { | ||
| filename = new File(System.getProperty("java.io.tmpdir"), "jpy-" + randomInt); |
There was a problem hiding this comment.
There is still a risk that this line overwrites an existing file. A safer alternative would be to delete randomInt and use File.createTempFile("jpy-", ".so") (or ."dll") instead.
Only tested on Linux.
When jpy is invoked from the JVM, C libraries are extracted to the
temporal directory and jpy library is initialized.
Therefore there is not need to install JPY by compiling jpy sources.
It is enough to use the generated jar file.