[JAVA] I tried running a letter of credit transaction application with Corda 1

table of contents

  1. Overview
  2. Assumed reader
  3. Application overview
  4. Recommended environment
  5. JDK installation
  6. Download source
  7. (Proxy settings)
  8. Compile and start
  9. Summary

Overview

Sample application implementing blockchain / distributed ledger (DLT) technology http://github.com/corda/letterofcredit I tried compiling / starting / trying on Windows.


Assumed reader

Imagine the following readers:

--_ I can't write the code. __ --I have no English allergies. --I'm interested in practical blockchain applications. ――I want to touch an application that actually works.

This article was created ... I'm not familiar with technology, but I want to know about blockchain. I created it because I wanted those people to try it. Blockchain is no longer limited to cryptocurrencies. Replacement of existing business has begun.

Application overview

It is a sample that imitates letter of credit transactions in the business of trade finance. For letter of credit transactions https://lab.pasona.co.jp/97/ And https://hunade.com/lc-nagare Please refer to.


Recommended environment

We are testing using the following environment.

  • Windows7 Professional SP1 64bit
  • Core i7-6700
  • 8GB RAM --Special development environment: None

The above environment is not essential, but basically there is a high possibility that it will not work unless the memory is 8GB or more.


JDK installation

https://qiita.com/ko2a/items/69fa8a5366d7449500ca Install the JDK by referring to.


Download source

Download the Letter Of Credit program source from github. https://github.com/corda/LetterOfCredit


Select Clone or download on the right and click Download ZIP. github letterof credit.png


Select Save. githubダウンロード画面.png


(Proxy settings)

This part is a setting for those who can not download data etc. without going through the Proxy server in the company. Please check with your network administrator for details. There is almost no need for an individual.

Here are the files that can be used immediately in the Windows environment. https://github.com/sbir3japan/LetterOfCredit/raw/release/gradlew.bat Please download this file and copy it to the unzipped folder. (The above file simply rewrites the line feed code and adds the template of the proxy setting command of gradle. If you understand the meaning, you do not need to work. Please rewrite the original file directly.)

プロキシ.png

Right-click the overwritten gradlew.bat (it is displayed as gradlew depending on the setting) ⇒ click Edit. Enter the Proxy data in the 4th line of the displayed data. (Ask your network administrator for the value)

プロキシ3-3.png


Install and launch

Compile the unzipped source code and start it.

Installation

Start a command prompt and move to the unzipped folder. (For example, if you answer Desktop for an account called YourAccountName, it will be as follows)

Move folder


> cd C:¥User¥YourAccountName¥Desktop¥LetterOfCredit-release

Enter the compile command (as follows)

Enter installation command


> gradlew buildExecutableJar

It will take some time after entering the command, but if the following characters ** BUILD SUCCESSFUL ** </ font> are displayed in green, it is successful. BUILD.png

Start-up

Enter the start command (as follows)

Enter start command


> java -jar kotlin-source/build/libs/eloc-demo.jar

It will take some time after entering the command. If the following message is displayed, the startup is successful.

Startup success message


Start the demo by going to http://localhost:10014/web/loc/

The following is displayed on the screen (displayed on the last line). cmdアドレス記載部分.png

Access from browser

After confirming the startup success message, start the browser. Enter http: // localhost: 10014 / web / loc / in the address bar (http: // localhost: 10014 / web / loc /). It's okay to have the above link pressed. If it starts up correctly, the following screen will be displayed. Welcome to the world of Cordapp!

成功画面.png

Summary

I tried to explain with the goal that even beginners can experience the world of Cordap. The demonstration of LC trading will be next time. Basically, it doesn't break no matter how you move it, so I think it's a good idea to touch it properly!

Recommended Posts