Java Lite-client wrapper uses JNA to access methods in native lite-client binary.
<dependency>
<groupId>io.github.neodix42</groupId>
<artifactId>tolk</artifactId>
<version>0.8.2</version>
</dependency>
<dependency>
<groupId>io.github.neodix42.ton4j</groupId>
<artifactId>tolk</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:
TolkRunner tolkRunner=TolkRunner.builder().build();
URL resource=TestTolkRunner.class.getResource("/test.tolk");
File tolkFile=Paths.get(resource.toURI()).toFile();
String absolutePath=tolkFile.getAbsolutePath();
TolkRunner tolkRunner=TolkRunner.builder().tolkExecutablePath(tolkPath).build();
String result=tolkRunner.run(tolkFile.getParent(),absolutePath);
log.info("output: {}",result);
More examples in TestTolkRunner class.