This repository contains resources and quick starts to help Java developers get started on the NEO blockchain.
You will need to setup a few things before getting started with these examples.
Required
- neo-devpack-java – Java Native Interfaces (JNI) for Neo's methods
- neo-compiler – Converter from Java bytecode to Neo bytecode
Advised
- neo-privatenet – Docker image for local testing
- neo-python – CLI for NEO
For instructions on the setup process, see the NEO docs
The Java source code that is written is converted to an avm file (Neo's Virtual Machine bytecode) by the neoj neo-compiler. There are a few limitations with this compiler in its current state that are important to mention.
- Method calls while instantiating a field variable will result in runtime errors. Example: Do not do the following
public static final byte[] OWNER =
Helper.asByteArray"AK2nJJpJr6o664CWJKi1QRXjqeic2zRp8y";- Package names cannot start with org.neo as they will be ignored by the neoj neo-compiler.
var bskip = cc.classfile.Name.IndexOf("org.neo.") == 0 || cc.classfile.Name.IndexOf("src.org.neo.") == 0;