Skip to content

Manual Configuration

The simplest way to get started with Web3j is via the powerful Web3j CLI.

However, if you wish to configure your project manually, you can follow the steps outlined here.

Add the latest Web3j version to your project build configuration.

Maven

Java:

<dependency>
  <groupId>org.web3j</groupId>
  <artifactId>core</artifactId>
  <version>4.8.4</version>
</dependency>

Android:

<dependency>
  <groupId>org.web3j</groupId>
  <artifactId>core</artifactId>
  <version>4.6.0</version>
</dependency>

Gradle

Java:

compile ('org.web3j:core:4.8.4')

Android:

compile ('org.web3j:core:4.6.0')

Plugins

There are also gradle and maven plugins to help you generate Web3j Java wrappers for your Solidity smart contracts, thus allowing you to integrate such activities into your project lifecycle. Take a look at the project homepage for the web3j-gradle-plugin and web3j-maven-plugin for details on how to use these plugins.