Java SDK

Installation

How to install and set up zksync2-java for your project.

Integrating the zksync2-java into your Java project equips you with the tools necessary to interact with the ZKSync Layer-2 blockchain solution efficiently.

Prerequisites

Before beginning the installation, make sure you have:

  • Java Development Kit (JDK): Java 8 or higher installed on your machine.
  • Maven or Gradle: Depending on your project's build system, ensure Maven or Gradle is set up correctly.
Check out the Java installation guide for more information.

Installation steps

Maven setup

For projects using Maven, add the following dependency block to your pom.xml file to include the zksync2-java SDK:

<project>
  ...
  <dependencies>
    <dependency>
      <groupId>io.zksync</groupId>
      <artifactId>zksync2</artifactId>
      <version>v0.2.0</version>
    </dependency>
  </dependencies>
</project>

Gradle setup

For projects utilizing Gradle, add the dependency to your build.gradle file as follows:

dependencies {
    implementation "io.zksync:zksync2:v0.2.0"
}

Made with ❤️ by the ZKsync Community