简体   繁体   中英

Java SDK HyperLedger Fabric

I am new using the HyperLedger Fabric Java SDK. I have been using the fabcar example as a starting point. I would like to hook up the application to a rest API, where users can submit a transaction to the blockchain but I am having a hard time finding a good resource for this. the example I am following is here: https://github.com/IBM/blockchain-application-using-fabric-java-sdk . From this example, I am simply building the application and then copying the jar file into various classes to invoke the chain and query the chain ,etc. I am a little confused by this approach. Is this the standard for using HyperLedger fabric, all done from the command line like this, and are the logs that are outputted the actual blockchain? Are there any other resources out there that can help me with this concept?

I also experience like you. Before you start to learn how to code Fabric Java SDK, you need to understand all of the components and processes of Hyperledger Fabric. Then, you download the Fabric Java SDK from here . Please read the read.me carefully. After you created the Maven project and imported the latest Fabric Java SDK, then you import the sample project files from this folder . I recommend you to test the project file name End2endIT.java first.

For your info, you need to run the script to create the container in Docker before you run End2endIT.java . The script files are in this folder . When you enter that folder you need to run the script in the command line with .\\fabric.sh start to create the container in Docker. There have various commands using in different situations. Please read fabric.sh file carefully.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM