IntelliJ IDEA上でKotlinをRunしたときの内部コマンド

# 環境

macOS:`10.13.6`
IntelliJ IDEA: `2018.1.6`

# やったこと

こんな状態で、

<img width="649" alt="スクリーンショット 2018-08-27 14.32.17.png" src="https://qiita-image-store.s3.amazonaws.com/0/68978/945feb5b-3eff-f2e5-6625-0b82fd4c4e70.png">

実行時のコマンドを、適当に改行しただけです。

<img width="617" alt="スクリーンショット 2018-08-27 14.32.17 2.png" src="https://qiita-image-store.s3.amazonaws.com/0/68978/2b71909a-9730-c0b9-2c4b-111c6fdd28b2.png">

# 分解

```bash
/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/bin/java
 "-javaagent:/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar=56856:/Applications/IntelliJ IDEA CE.app/Contents/bin"
 -Dfile.encoding=UTF-8
 -classpath
  "/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/charsets.jar
   :/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/deploy.jar
   :/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/ext/cldrdata.jar
   :/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/ext/dnsns.jar
   :/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/ext/jaccess.jar
   :/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/ext/jfxrt.jar
   :/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/ext/localedata.jar
   :/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/ext/nashorn.jar
   :/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/ext/sunec.jar
   :/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar
   :/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar
   :/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/ext/zipfs.jar
   :/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/javaws.jar
   :/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/jce.jar
   :/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/jfr.jar
   :/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/jfxswt.jar
   :/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/jsse.jar
   :/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/management-agent.jar
   :/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/plugin.jar
   :/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/resources.jar
   :/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/rt.jar
   :/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/lib/ant-javafx.jar
   :/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/lib/dt.jar
   :/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/lib/javafx-mx.jar
   :/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/lib/jconsole.jar
   :/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/lib/packager.jar
   :/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/lib/sa-jdi.jar
   :/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/lib/tools.jar  
   :/Users/koji/work/kotlin/myfirstkotlin/out/production/myfirstkotlin
   :/Users/koji/Library/Application Support/IdeaIC2018.1/Kotlin/kotlinc/lib/kotlin-stdlib.jar
   :/Users/koji/Library/Application Support/IdeaIC2018.1/Kotlin/kotlinc/lib/kotlin-reflect.jar
   :/Users/koji/Library/Application Support/IdeaIC2018.1/Kotlin/kotlinc/lib/kotlin-test.jar
   :/Users/koji/Library/Application Support/IdeaIC2018.1/Kotlin/kotlinc/lib/kotlin-stdlib-jdk7.jar
   :/Users/koji/Library/Application Support/IdeaIC2018.1/Kotlin/kotlinc/lib/kotlin-stdlib-jdk8.jar"
 HelloWorldKt
```

- Java共通のクラスパス
- Runボタンを押した対象のクラス
- Kotlin実行のためのライブラリ

という順番っぽい。

# まとめ

![image.png](https://qiita-image-store.s3.amazonaws.com/0/68978/227e0b86-d031-8147-b22c-f86a1b33e26c.png)

わたしだけです。

そもそもJavaの時点でずっとGradleにお任せしてたので、もうわかんないですね。