Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
231 views
in Technique[技术] by (71.8m points)

maven - How do I install the in3 Java client to use "import in3.*" in Java programs?

I want to use the in3 (aka Incubed) Java client. My Java programs won't compile because I get errors like these:

CallFunction.java:5: error: package in3 does not exist import in3.; ^ CallFunction.java:6: error: package in3.eth1 does not exist import in3.eth1.;

I tried following the directions here: https://in3.readthedocs.io/en/develop/api-java.html

A jar file is referred to in the "Installing" and "Downloading" sections of the above web page. But I cannot find that standalone jar file anywhere (including here https://github.com/blockchainsllc/in3/releases).

I installed Maven. I tried creating a pom.xml file to use Maven to install the Incubed Java client. This failed with an error like this:

[ERROR] 'modelVersion' is missing.

I tried tweaking the pom.xml and getting it to work, but I could not get passed the errors when running mvn commands.

I tried cloning this repository: https://github.com/blockchainsllc/in3.git I installed cmake, and I entered the java directory and ran the "sudo cmake -DJAVA=true" command. It worked. But when I run the "sudo make" command afterward, it fails with this:

/usr/bin/ld: cannot find -linit collect2: error: ld returned 1 exit status src/CMakeFiles/in3_jni.dir/build.make:94: recipe for target 'src/libin3_jni.so' failed make[2]: *** [src/libin3_jni.so] Error 1 CMakeFiles/Makefile2:87: recipe for target 'src/CMakeFiles/in3_jni.dir/all' failed make[1]: *** [src/CMakeFiles/in3_jni.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

What do I need to do to get the in3 Java client installed on Ubuntu 20.x?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...