Java Maven - Loading native library

310
December 14, 2017, at 09:22 AM

I'm currently trying to use JNI for my project, and I've already created the library using maven aswell. Now I just can't find any way to load the library that is not simply executing the java program from the command line.

If possible, I'd like to only use maven(preferred) or use Eclipse settings to load the library.

My project structure is something like:

src/main/java
src/main/c
src/test/java
src/test/c
target/*
library.so
pom.xml

I've already tried the following:

  • set System.setProperty("java.library.path", path)
  • set -Djava.library.path=${project_loc:NAME} in the run-configuration
  • use maven-surefire-plugin to provide the -D option

I'd like an option that does not require compiling the library to the default java.library.path to keep the library from having to be compiled each time the project is pulled from git.

Rent Charter Buses Company
READ ALSO
Why might changing a field from int to Integer cause objects to disappear from Sets?

Why might changing a field from int to Integer cause objects to disappear from Sets?

There's a presentation on AutoValue (a terse way to define immutable objects in Java, with sensible defaults for equals, hashCode, etc): https://docs

268
Using Swing Library to Move Buttons

Using Swing Library to Move Buttons

I am trying to create a type of Graphics Editor that allows users to create graphic depictions of American Football playsTo do this, the User should be able to do the following:

282
How to make the run time of a program a constant everytime?

How to make the run time of a program a constant everytime?

I have been finding the size of a stack in java and the run time is different every timeIs there any way the run time of the method be constant? What does run time depend upon? Would it help if the stack had a constant size?

231
Lisp : Don't know how to create ISeq from Java.lang.Integer

Lisp : Don't know how to create ISeq from Java.lang.Integer

I'm trying to open a text file and split it into a list of integer values in ClojureI get this error code every single time, and I've got no idea why

321