Last active
May 5, 2018 12:07
-
-
Save bassaer/00f9d20c9bb279faf48f55cbb2af2a92 to your computer and use it in GitHub Desktop.
KotlinをCLIから試す ref: https://qiita.com/bassaer/items/a4e5f0420e2606d56374
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
❯ brew update | |
❯ brew install kotlin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
❯ cat hello.kt | |
fun main(args: Array<String>) { | |
println("Hello, World!") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
❯ kotlinc hello.kt -include-runtime -d hello.jar | |
❯ ll | |
total 1712 | |
-rw-r--r-- 1 nakayama staff 849K 5 5 20:58 hello.jar | |
-rw-r--r-- 1 nakayama staff 64B 5 5 20:57 hello.kt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
❯ java -jar hello.jar | |
Hello, World! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment