2015-11-25 13:27:07 +00:00
Getting set up
==============
2017-01-31 12:59:24 +00:00
Software requirements
---------------------
2016-11-14 18:12:39 +00:00
2017-01-31 12:59:24 +00:00
Corda uses industry-standard tools to make set-up as simple as possible. Following the software recommendations below 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're interested to hear about any issues that arise.
2015-11-25 13:27:07 +00:00
2017-01-31 12:59:24 +00:00
JVM
~~~
2015-11-25 13:27:07 +00:00
2017-01-31 12:59:24 +00:00
Corda is written in Kotlin and runs in a JVM. We develop against Oracle JDK 8, and other JVM implementations are not actively
supported. Oracle JDK 8 can be obtained directly from
`Oracle <http://www.oracle.com/technetwork/java/javase/downloads/index.html> `_ . Installation instructions are
available for `Windows <http://docs.oracle.com/javase/8/docs/technotes/guides/install/windows_jdk_install.html#CHDEBCCJ> `_ ,
`Linux <http://docs.oracle.com/javase/8/docs/technotes/guides/install/linux_jdk.html#BJFGGEFG> `_ and
`OS X <http://docs.oracle.com/javase/8/docs/technotes/guides/install/mac_jdk.html#CHDBADCG> `_ .
2016-12-05 17:46:26 +00:00
2017-01-31 12:59:24 +00:00
Please ensure that you keep your Oracle JDK installation updated to the latest version while working with Corda.
Even earlier versions of JDK 8 versions can cause cryptic errors.
2015-11-25 13:27:07 +00:00
2017-01-31 12:59:24 +00:00
If you do choose to use OpenJDK instead of Oracle's JDK, you will also need to install OpenJFX.
2016-11-29 15:53:35 +00:00
2017-01-31 12:59:24 +00:00
Additional troubleshooting information can be found `here <https://docs.corda.net/getting-set-up-fault-finding.html#java-issues> `_ .
2016-05-18 09:39:47 +00:00
2016-11-14 18:12:39 +00:00
Kotlin
2017-01-31 12:59:24 +00:00
~~~~~~
2016-05-18 09:39:47 +00:00
2017-01-31 12:59:24 +00:00
Applications on Corda (CorDapps) can be written in any JVM-targeting language. However, Corda itself and most of the samples
are written in Kotlin. If you're unfamiliar with Kotlin, there is an official `getting started guide <https://kotlinlang.org/docs/tutorials/> `_ .
See also our :doc: `further-notes-on-kotlin` .
2016-05-18 09:39:47 +00:00
2017-01-31 12:59:24 +00:00
IDE
~~~
2015-11-25 13:27:07 +00:00
2017-01-31 12:59:24 +00:00
We strongly recommend the use of IntelliJ IDEA as an IDE, primarily due to the strength of its Kotlin integration. The free Community
Edition can be downloaded from `JetBrains <https://www.jetbrains.com/idea/download/> `_ .
2015-11-25 13:27:07 +00:00
2017-01-31 12:59:24 +00:00
Please make sure that you're running the latest version of IDEA, as older versions have been known to have problems integrating with Gradle,
the build tool used by Corda.
You'll also want to install the Kotlin IDEA plugin by following the instructions
`here <https://kotlinlang.org/docs/tutorials/getting-started.html> `_ .
Additional troubleshooting information can be found `here <https://docs.corda.net/getting-set-up-fault-finding.html#idea-issues> `_ .
Git
~~~
We use git to version-control Corda. Instructions on installing git can be found
`here <https://git-scm.com/book/en/v2/Getting-Started-Installing-Git> `_ .
Following these instructions will give you access to git via the command line. It can also be useful to control git via IDEA. Instructions
for doing so can be found on the `JetBrains website <https://www.jetbrains.com/help/idea/2016.2/using-git-integration.html> `_ .
2015-11-25 13:27:07 +00:00
2016-11-14 18:12:39 +00:00
Gradle
2017-01-31 12:59:24 +00:00
~~~~~~
2015-11-25 13:27:07 +00:00
2017-01-31 12:59:24 +00:00
We use Gradle as the build tool for Corda. However, you do not need to install Gradle itself, as a wrapper is provided.
2015-11-25 13:27:07 +00:00
2017-01-31 12:59:24 +00:00
The wrapper can be run from the command line by using `` ./gradlew [taskName] `` on OS X/Linux, or `` gradlew.bat [taskName] `` on Windows.
2015-11-25 13:27:07 +00:00
2016-11-25 14:29:13 +00:00
Corda source code
2016-11-14 18:12:39 +00:00
-----------------
2015-12-08 15:47:45 +00:00
2017-01-31 12:59:24 +00:00
The Corda platform source code is available here:
2016-11-14 18:12:39 +00:00
2016-11-23 12:25:44 +00:00
https://github.com/corda/corda.git
2015-12-08 15:47:45 +00:00
2017-02-08 10:34:54 +00:00
A CorDapp template that you can use as the basis for your own CorDapps is available here:
2016-11-23 12:25:44 +00:00
https://github.com/corda/cordapp-template.git
2015-12-08 15:47:45 +00:00
2017-02-08 10:34:54 +00:00
And a simple example CorDapp for you to explore basic concepts is available here:
2017-01-31 12:59:24 +00:00
2017-02-08 10:34:54 +00:00
https://github.com/corda/cordapp-tutorial.git
You can clone these repos to your local machine by running the command `` git clone [repo URL] `` .
By default, these repos will be on the `` master `` branch. However, this is an unstable development branch. You should check
2017-04-07 15:28:18 +00:00
out the latest release tag instead by running `` git checkout release-M10.1 `` .
2017-01-31 12:59:24 +00:00
Opening Corda/CorDapps in IDEA
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2017-03-30 11:13:23 +00:00
.. warning :: If you choose to use IntelliJ you must run the `` gradlew kaptKotlin `` task before attempting to compile via IntelliJ.
.. note :: If you change branch , gradle clean or see a compile error in `` VaultSchemaTest.kt `` you must also then re-run `gradlew kaptKotlin`
2017-01-31 12:59:24 +00:00
When opening a Corda project for the first time from the IDEA splash screen, please click "Open" rather than "Import Project",
and then import the Gradle project by clicking "Import Gradle project" in the popup bubble on the lower right-hand side of the screen.
If you instead pick "Import Project" on the splash screen, a bug in IDEA will cause Corda's pre-packaged run configurations to be erased.
2017-04-05 14:19:37 +00:00
If you see this warning too late, that's not a problem - just use `` git checkout .idea/runConfigurations `` or the version control tab in
2017-01-31 12:59:24 +00:00
IDEA to undelete the files.
IDEA's build of the project may need to be resynced from time to time. This can be done from within IDEA by going to "View" -> "Tool Windows" -> "Gradle"
and clicking "Refresh all Gradle projects". Whenever prompted about Gradle, accept the defaults suggested by IDEA.
2015-12-08 15:47:45 +00:00
2017-01-31 12:59:24 +00:00
Next steps
----------
2015-12-08 15:47:45 +00:00
2017-01-31 12:59:24 +00:00
The best way to check that everything is working fine is by :doc: `running-the-demos` .
2015-12-08 15:47:45 +00:00
2017-01-31 12:59:24 +00:00
Once you have these demos running, you may be interested in writing your own CorDapps, in which case you should refer to
:doc: `tutorial-cordapp` .
2015-11-25 13:27:07 +00:00
2017-01-31 12:59:24 +00:00
If you encounter any issues, please see the :doc: `getting-set-up-fault-finding` page, or get in touch with us on the
2017-04-05 14:19:37 +00:00
`forums <https://discourse.corda.net/> `_ or via `slack <http://slack.corda.net/> `_ .