In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to install and use Hyperledger Fabric Java SDK in Maven, Gradle and Eclipse, which has a certain reference value, and interested friends can refer to it. I hope you can learn a lot after reading this article.
Hyperledger Fabric Java SDK is a necessary development kit for developing Java applications based on Hyperledger Fabric block chain.
1. Use Fabric Java SDK under Maven
Add a dependency on fabric-sdk-java in the maven configuration file pom.xml:
Org.hyperledger.fabric-sdk-java fabric-sdk-java 1.4.12, use Fabric Java SDK under Gradle
Add a dependency on fabric-sdk-java in the gradle configuration file build.gradle:
Dependencies {compile group: 'org.hyperledger.fabric-sdk-java', name:' fabric-sdk-java', version: '1.4.1'} 3, use Fabric Java SDK in Eclipse
The easiest way to use Fabric Java SDK in Eclipse is to create a Maven project or a Gradle project, and then add a dependency on Farbic-sdk-java to the project configuration as described earlier.
4. Fabric Java SDK installation test code
The entry class of fabric-sdk-java is HFClient, so we can use the following simple code to create an instance of HFClient, and then set its security suite. If it can be compiled and executed normally, it means that Fabric Java SDK is installed successfully:
Package com.hubwiz.demo;import org.hyperledger.fabric.sdk.HFClient;import org.hyperledger.fabric.sdk.security.CryptoSuite;public class App {public static void main (String [] args) throws Exception {HFClient client = HFClient.createNewInstance (); client.setCryptoSuite (CryptoSuite.Factory.getCryptoSuite ()); System.out.println ("fabric-sdk-java installed successfully.") }} Thank you for reading this article carefully. I hope the article "how to install and use Hyperledger Fabric Java SDK in Maven, Gradle and Eclipse" shared by the editor will be helpful to you. At the same time, I hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.