DEV Community

Cover image for Hi, Java developers: It's time to try Web3j for Ethereum
Yongchang He
Yongchang He

Posted on

Hi, Java developers: It's time to try Web3j for Ethereum

A highly modular and type-safe Java library for Ethereum BlockChain development


Hi Java Developers,

Suppose you are comfortable with Java programming, and you are exactly right eager to know what has been happening in the promising blockchain world, you should get familiar and play with this API: Web3j - a highly modular, reactive, type safe Java and Android library for working with Smart Contracts and integrating with clients (nodes) on the Ethereum network.

Image description

Intro & review

As a developer, I’m sure you strive to test what you develop, and in most established programming languages you have a box full of tools to pick from. In BlockChain world, the box is still being built. The Ethereum blockchain is the world computer on which you’d like to deploy and interact with your smart contract code.

The smart contracts themselves can be written in Solidity - a high-level language for implementing smart contracts, and for Java developers, we couldn't run Java directly on the Ethereum BlockChain. Now thanks to Web3j, which can bridge this gap by helping you generate type-safe contract wrappers with easy access to protocol functionality.

Image description

Web3j features:

  • Complete implementation of Ethereum's JSON-RPC client API over HTTP and IPC
  • Ethereum wallet support
  • Auto-generation of Java smart contract wrappers to create, deploy, transact with and call smart contracts from native Java code (Solidity and Truffle definition formats supported)
  • Reactive-functional API for working with filters
  • Ethereum Name Service (ENS) support
  • Support for OpenEthereum's Personal, and Geth's Personal client APIs
  • Support for Alchemy and Infura, so you don't have to run an Ethereum client yourself
  • Support for ERC20 and ERC721 token standards
  • Comprehensive integration tests demonstrating a number of the above scenarios
  • Command line tools
  • Android compatible
  • Support for JP Morgan's Quorum via web3j-quorum

Quick Start Link

Cannot wait to get hands dirty? OK here is the link to get Quickstart with Web3j.

Have fun with your Java and Ethereum BlockChain!

Image description


Previous blogs related

Learning BlockChain? Here are the things you want to go through
Tutorial: Ethereum BlockChain Development (1)
Tutorial: Ethereum BlockChain Development (2)
Tutorial: Ethereum BlockChain Development (3)
Tutorial: Ethereum BlockChain Development (4)
Tutorial: Ethereum BlockChain Development (5)


Reference

https://docs.web3j.io/4.8.7/
https://blog.web3labs.com/web3development/making-manual-solidity-version-management-a-thing-of-the-past
https://kauri.io/#communities/Java%20Ethereum/how-to-test-ethereum-smart-contracts-from-java/#running-evm-code-in-the-jvm

Discussion (0)