You should already have generated your node(s) with their CorDapps installed by following the instructions in Creating nodes locally.
There are several ways to run a Corda node locally for testing purposes.
runnodes is a shell script (or batch file on Windows) that is generated by
deployNodes to allow you
to quickly start up all nodes and their webservers.
runnodes should only be used for testing purposes.
Start the nodes with
runnodes by running the following command from the root of the project:
If you receive an
OutOfMemoryError exception when interacting with the nodes, you need to increase the amount of
Java heap memory available to them, which you can do when running them individually. See
Starting an individual Corda node.
Run the node by opening a terminal window in the node’s folder and running:
java -jar corda.jar
By default, the node will look for a configuration file called
node.conf and a CorDapps folder called
in the current working directory. You can override the configuration file and workspace paths on the command line (e.g.
./corda.jar --config-file=test.conf --base-directory=/opt/corda/nodes/test).
You can increase the amount of Java heap memory available to the node using the
-Xmx command line argument. For
example, the following would run the node with a heap size of 2048MB:
java -Xmx2048m -jar corda.jar
You should do this if you receive an
OutOfMemoryError exception when interacting with the node.
Optionally run the node’s webserver as well by opening a terminal window in the node’s folder and running:
java -jar corda-webserver.jar
The node webserver is for testing purposes only and will be removed soon.