Merged release/4 (Corda OS version 4.1) into a branch created from master (Corda OS version 4.3) Conflicts: build.gradle client/rpc/src/main/kotlin/net/corda/client/rpc/internal/ReconnectingCordaRPCOps.kt common/logging/build.gradle common/logging/src/main/kotlin/net/corda/common/logging/CordaVersion.kt constants.properties core-tests/src/test/kotlin/net/corda/coretests/utilities/ProgressTrackerTest.kt core/src/main/kotlin/net/corda/core/transactions/TransactionBuilder.kt docs/source/api-contract-constraints.rst docs/source/api-stability-guarantees.rst docs/source/app-upgrade-notes.rst docs/source/changelog.rst docs/source/clientrpc.rst docs/source/conf.py docs/source/corda-network/UAT.md docs/source/getting-set-up.rst docs/source/network-builder.rst docs/source/upgrading-cordapps.rst docs/source/versioning.rst node/src/integration-test/kotlin/net/corda/node/services/rpc/RpcReconnectTests.kt serialization/src/main/kotlin/net/corda/serialization/internal/amqp/PropertyDescriptor.kt serialization/src/main/kotlin/net/corda/serialization/internal/model/LocalTypeInformationBuilder.kt tools/network-builder/src/main/resources/node-Dockerfile tools/network-builder/src/main/resources/notary-Dockerfile
10 KiB
Getting set up for CorDapp development
Software requirements
Corda uses industry-standard tools:
Java 8 JVM - we require at least version , but do not currently support Java 9 or higher.
We have tested with the following builds:
Please note that OpenJDK builds usually exclude JavaFX, which our GUI tools require.
IntelliJ IDEA - supported versions 2017.x, 2018.x and 2019.x (with Kotlin plugin version )
Gradle - we use 4.10 and the
gradlew
script in the project / samples directories will download it for you.
Please note:
- Applications on Corda (CorDapps) can be written in any language targeting the JVM. However, Corda itself and most of the samples are written in Kotlin. Kotlin is an official Android language, and you can read more about why Kotlin is a strong successor to Java here. If you're unfamiliar with Kotlin, there is an official getting started guide, and a series of Kotlin Koans
- IntelliJ IDEA is recommended due to the strength of its Kotlin integration.
Following these software recommendations will minimize the number of errors you encounter, and make it easier for others to provide support. However, if you do use other tools, we'd be interested to hear about any issues that arise.
Set-up instructions
The instructions below will allow you to set up your development environment for running Corda and writing CorDapps. If you have any issues, please reach out on Stack Overflow or via our Slack channels.
The set-up instructions are available for the following platforms:
windows-label
(or in video form)mac-label
(or in video form)deb-ubuntu-label
fedora-label
Note
These setup instructions will guide you on how to install the Oracle JDK. Each JDK can be found on their respective sites:
Note
These setup instructions will guide you on how to install the Oracle JDK. Each JDK can be found on their respective sites:
Windows
Warning
If you are using a Mac, Debian/Ubuntu or Fedora machine, please follow the mac-label
, deb-ubuntu-label
or fedora-label
instructions instead.
Java
- Visit http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
- Click the download link for jdk-8uXXX-windows-x64.exe (where "XXX" is the latest minor version number)
- Download and run the executable to install Java (use the default settings)
- Add Java to the PATH environment variable by following the instructions in the Oracle documentation
- Open a new command prompt and run
java -version
to test that Java is installed correctly
Git
- Visit https://git-scm.com/download/win
- Click the "64-bit Git for Windows Setup" download link.
- Download and run the executable to install Git (use the default settings)
- Open a new command prompt and type
git --version
to test that git is installed correctly
IntelliJ
- Visit https://www.jetbrains.com/idea/download/download-thanks.html?code=IIC
- Download and run the executable to install IntelliJ Community Edition (use the default settings)
- Ensure the Kotlin plugin in Intellij is updated to version (new installs will contains this version)
Mac
Warning
If you are using a Windows, Debian/Ubuntu or Fedora machine, please follow the windows-label
, deb-ubuntu-label
or fedora-label
instructions instead.
Java
- Visit http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
- Click the download link for jdk-8uXXX-macosx-x64.dmg (where "XXX" is the latest minor version number)
- Download and run the executable to install Java (use the default settings)
- Open a new terminal window and run
java -version
to test that Java is installed correctly
IntelliJ
- Visit https://www.jetbrains.com/idea/download/download-thanks.html?platform=mac&code=IIC
- Download and run the executable to install IntelliJ Community Edition (use the default settings)
- Ensure the Kotlin plugin in IntelliJ is updated to version (new installs will contains this version)
Debian/Ubuntu
Warning
If you are using a Mac, Windows or Fedora machine, please follow the mac-label
, windows-label
or fedora-label
instructions instead.
These instructions were tested on Ubuntu Desktop 18.04 LTS.
Java
Go to https://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html and download
jdk-8u202-linux-x64.tar.gz
. You will be redirected to an Oracle login page. Login or create an account to download the JDK.Extract the archive with
tar -xvf jdk-8u202-linux-x64.tar.gz jdk1.8.0_202/
Create a directory to place the JDK e.g.
sudo mkdir -p /usr/lib/jvm
Move the extracted archive in that folder with
sudo mv ./jdk1.8.0_202 /usr/lib/jvm/
Add the most common java binaries to the list of alternatives to allow easy swap between Java versions in the future
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.8.0_202/bin/java" 1 sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.8.0_202/bin/javac" 1 sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.8.0_202/bin/javaws" 1
Update permissions
sudo chmod a+x /usr/bin/java sudo chmod a+x /usr/bin/javac sudo chmod a+x /usr/bin/javaws sudo chown -R root:root /usr/lib/jvm/jdk1.8.0_202
Set JAVA_HOME and JRE_HOME to your
~/.bash_profile
and/or~/.bashrc
export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_202 export JRE_HOME=/usr/lib/jvm/jdk1.8.0_202/jre
Verify that the JDK was installed correctly by running
java -version
Git
- From the terminal, Git can be installed using apt with the command
sudo apt install git
- Verify that git was installed correctly by typing
git --version
IntelliJ
Jetbrains offers a pre-built snap package that allows for easy, one-step installation of IntelliJ onto Ubuntu.
- To download the snap, navigate to https://snapcraft.io/intellij-idea-community
- Click
Install
, thenView in Desktop Store
. ChooseUbuntu Software
in the Launch Application window. - Ensure the Kotlin plugin in Intellij is updated to version (new installs will contains this version)
Fedora
Warning
If you are using a Mac, Windows or Debian/Ubuntu machine, please follow the mac-label
, windows-label
or deb-ubuntu-label
instructions instead.
These instructions were tested on Fedora 28.
Java
- Download the RPM installation file of Oracle JDK from https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html.
- Install the package with
rpm -ivh jdk-<version>-linux-<architecture>.rpm
or use the default software manager. - Choose java version by using the following command
alternatives --config java
- Verify that the JDK was installed correctly by running
java -version
Git
- From the terminal, Git can be installed using dnf with the command
sudo dnf install git
- Verify that git was installed correctly by typing
git --version
IntelliJ
- Visit https://www.jetbrains.com/idea/download/download-thanks.html?platform=linux&code=IIC
- Unpack the
tar.gz
file using the following commandtar xfz ideaIC-<version>.tar.gz -C /opt
- Run IntelliJ with
/opt/ideaIC-<version>/bin/idea.sh
- Ensure the Kotlin plugin in IntelliJ is updated to version (new installs will contains this version)
Next steps
First, run the example CorDapp <tutorial-cordapp>
.
Next, read through the Corda Key Concepts <key-concepts>
to understand how Corda works.
By then, you'll be ready to start writing your own CorDapps. Learn how to do this in the Hello, World tutorial <hello-world-introduction>
. You may want to refer to the API documentation in the sidebar, the flow cookbook <flow-cookbook>
and the samples along the way.
If you encounter any issues, please ask on Stack Overflow or via our Slack channels.