OpenViSTAI · Agents · Blockchain · Crypto
Menu
Smart Contracts

Fabric Chaincode Java

Fabric Chaincode Java is a Java implementation of Hyperledger Fabric chaincode shim APIs. It provides shim classes for communication between Java smart contracts and Fabric peers, publishes the fabric-chaincode-shim JAR, and includes examples, integration tests and instructions for building a Docker-based Java chaincode environment.

Independent OpenViST project profile, based on linked sources.

Fabric Chaincode Java — OpenViST project profile in Smart Contracts.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when developing Java chaincode for Hyperledger Fabric and you need the shim API, project examples, or instructions for building the Java runtime environment.

Who it is for

  • Java developers building smart contracts for Hyperledger Fabric.
  • Fabric developers seeking Gradle or Maven contract examples and a Java chaincode runtime build path.

Documented uses

  • Use Java shim classes to implement a contract that communicates with Fabric peers.
  • Start a Java contract project from Gradle, Maven or Kotlin Gradle examples.
  • Build shim artifacts locally and build the documented Java environment Docker image.
  • Review a state-based endorsement chaincode example or higher-level integration tests.
Before you choose

Requirements & limits

The project is publicly available as open-source software under the Apache-2.0 license.

  • The repository documents Docker, Docker Compose and JDK 11 as build prerequisites.
  • It provides separate Gradle and Maven Java contract examples, plus a Kotlin Gradle example.
  • The shim API, Docker environment instructions and integration tests are separate repository components.
  • The README directs users to a compatibility document for Java runtime and Hyperledger Fabric version details.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Build the Java shim JARs and local Docker environment

Build and install the Java shim artifacts locally, then build the documented Java chaincode environment image.

Before you start

  • Docker
  • Docker Compose
  • JDK 11
  • A local clone of the repository

Steps

  1. Clone the fabric-chaincode-java repository and change into its directory.

  2. Run ./gradlew clean build install to build the shim artifacts and install them to the local Maven repository.

  3. Run ./gradlew buildImage to build the hyperledger/fabric-javaenv Docker image locally.

Expected outcome

The shim artifacts are installed in the local Maven repository and the Java chaincode environment image is built locally.

Guide limitations

  • This describes local building, not production deployment.
  • Consult the compatibility document for Java runtime and Hyperledger Fabric version details.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
2 October 2026
Original website title
hyperledger/fabric-chaincode-java · Official homepage title · retained in its source language