Java Lite-client wrapper uses JNA to access methods in native lite-client binary.
<dependency>
<groupId>io.github.neodix42</groupId>
<artifactId>func</artifactId>
<version>0.8.2</version>
</dependency>
<dependency>
<groupId>io.github.neodix42.ton4j</groupId>
<artifactId>func</artifactId>
<version>0.8.2</version>
</dependency>
Notice, if you installed TON binaries using package managers like brew, apt or chocolatey you can omit specifying path to a func executable and simply use it as follows:
FuncRunner funcRunner=FuncRunner.builder().build();
URL resource=TestFuncRunner.class.getResource("/test.fc");
File funcFile=Paths.get(resource.toURI()).toFile();
String absolutePath=funcFile.getAbsolutePath();
FuncRunner funcRunner=FuncRunner.builder().funcExecutablePath(resourcePath).build();
String result=funcRunner.run(funcFile.getParent(),"-PA",absolutePath);
log.info("output: {}",result);
More examples in TestFuncRunner class.