2022-02-26 14:48:07 -08:00
|
|
|
package com.rusefi.native_;
|
|
|
|
|
2022-02-28 09:29:02 -08:00
|
|
|
import java.io.File;
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
2022-02-26 14:48:07 -08:00
|
|
|
/**
|
|
|
|
* Following VM option is needed to launch:
|
|
|
|
* -Djava.library.path=../unit_tests/build
|
|
|
|
*/
|
|
|
|
public class JniSandbox {
|
2022-02-28 09:29:02 -08:00
|
|
|
|
|
|
|
private static final String LIBNAME = "lib_rusefi_test";
|
|
|
|
|
2022-02-26 14:48:07 -08:00
|
|
|
public static void main(String[] args) {
|
2022-02-28 09:29:02 -08:00
|
|
|
String[] list = new File(".").list((dir, name) -> name.startsWith(LIBNAME));
|
|
|
|
System.out.println(" " + Arrays.toString(list));
|
|
|
|
System.loadLibrary(LIBNAME);
|
|
|
|
|
2022-02-26 14:48:07 -08:00
|
|
|
EngineLogic engineLogic = new EngineLogic();
|
|
|
|
System.out.println(engineLogic.getVersion());
|
2022-02-28 09:29:02 -08:00
|
|
|
engineLogic.setConfiguration(new byte[4], 24, 14);
|
2022-02-26 14:48:07 -08:00
|
|
|
}
|
|
|
|
}
|