libzt icon indicating copy to clipboard operation
libzt copied to clipboard

Maven Repository

Open paulrd opened this issue 4 years ago • 5 comments

Request: It would be wonderful if java / clojure programmers could use this via a maven repository. I would be willing to put up some money for a bounty. I know javafx and sqlite provide similar cross-platform maven artifacts.

paulrd avatar Apr 27 '20 15:04 paulrd

I like this idea. I'll look into the requirements next week and take it into consideration.

joseph-henry avatar May 02 '20 05:05 joseph-henry

New API docs are now live: http://docs.zerotier.com/libzt-java. I'll be doing a little webinar on Jun 2nd to answer questions, lend some help and discuss any feature requests people have. Sign up page is here

examples/java/Example.java has also been updated to take advantage of the refreshed API. The maven package isn't here yet but it's getting closer now that things have been brought up to date.

There's a new workflow file .github/workflows/jar.yaml that builds the JAR on ubuntu-latest. I plan to add support for other platforms but at least now it's easier to build.

joseph-henry avatar May 19 '21 21:05 joseph-henry

Any updates here? I tried to compile it on windows but got the following error

D:\a\libzt\libzt\ext\ZeroTierOne\osdep\OSUtils.hpp(46,10): fatal error C1083: Cannot open include file: 'nlohmann/json.hpp': No such file or directory [D:\a\libzt\libzt\cache\win-x64-jni-release\zt_pic.vcxproj]
D:\a\libzt\libzt\src\bindings\java\JavaSockets.cxx(392,38): error C2039: 's_addr': is not a member of 'zts_in_addr' [D:\a\libzt\libzt\cache\win-x64-jni-release\zt_pic.vcxproj]
D:\a\libzt\libzt\src\bindings\java\JavaSockets.cxx(392,48): error C2660: 'memcpy': function does not take 2 arguments [D:\a\libzt\libzt\cache\win-x64-jni-release\zt_pic.vcxproj]

action log: https://github.com/IceSoulHanxi/libzt/actions/runs/6708859892/job/18230601167 workflow file: https://github.com/IceSoulHanxi/libzt/blob/win-build/.github/workflows/jar.yaml

IceSoulHanxi avatar Oct 31 '23 16:10 IceSoulHanxi

Second and third errors should be an easy fix by replacing s_addr with S_addr in an #if defined (_WIN32) block.

https://github.com/zerotier/libzt/blob/2f0f25a15870ac0ae52815558c539e63d656d506/include/ZeroTierSockets.h#L497

janvanbouwel avatar Nov 01 '23 13:11 janvanbouwel

For some reason json support is not disabled on Windows, I assume setting the OMIT_JSON_SUPPORT flag would fix the other issue.

https://github.com/zerotier/libzt/blob/2f0f25a15870ac0ae52815558c539e63d656d506/CMakeLists.txt#L357

janvanbouwel avatar Nov 01 '23 14:11 janvanbouwel