Java Lite-client wrapper uses JNA to access methods in native lite-client binary.
<dependency>
<groupId>io.github.neodix42</groupId>
<artifactId>fift</artifactId>
<version>0.8.2</version>
</dependency>
<dependency>
<groupId>io.github.neodix42.ton4j</groupId>
<artifactId>fift</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 fift executable and simply use it as follows:
FiftRunner fiftRunne=FiftRunner.builder().build();
URL resource=TestFiftRunner.class.getResource("/test.fift");
File fiftFile=Paths.get(resource.toURI()).toFile();
String absolutePath=fiftFile.getAbsolutePath();
FiftRunner fiftRunner=
FiftRunner.builder()
.fiftExecutablePath(fiftPath)
// .fiftAsmLibraryPath(libPath)
// .fiftSmartcontLibraryPath(smartcontPath)
.build();
String result=fiftRunner.run(fiftFile.getParent(),"-s",absolutePath);
log.info("output: {}",result);
More examples in TestFiftRunner class.