Edited at

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

More than 1 year has passed since last update.


環境

macOS:10.13.6

IntelliJ IDEA: 2018.1.6


やったこと

こんな状態で、

スクリーンショット 2018-08-27 14.32.17.png

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

スクリーンショット 2018-08-27 14.32.17 2.png


分解

/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

わたしだけです。

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