LoginSignup
0

More than 3 years have passed since last update.

windows環境で呼び出されるkotlincがkotlinc.batでハマった

Last updated at Posted at 2019-04-25

お手製開発環境の構築中にハマりました

環境

  • windows10 x64
  • IntelliJ IDEA Community Edition 2019.1.1 x64
  • intellij のプラグインとして、Kotlin v1.3.21-release-IJ2019.1-3 がインストールされている

やろうとしたこと

  • intelljのインストールディレクトリ/plugins/Kotlin/ に Kotlin が入っていた
  • intelljのインストールディレクトリ/plugins/Kotlin/kotlinc/bin にパスを通せば、コマンドラインから kotlinc が実行できると思った。これは動作した。
  • ただし、コマンドラインでない別のプロセスから実行しようとする(例えば ruby で system("kotlinc main.kt") をする)と ENOENT を返して実行できない。

解決

  • そもそも intelljのインストールディレクトリ/plugins/Kotlin/kotlinc/bin のフォルダをよく見ると、kotlinc.exeというファイルは存在せず、kotlinckotlinc.bat というバッチファイルが存在するだけだった。
  • なので、kotlinc.batを呼び出すようにする(例えば ruby で system("kotlinc.bat main.kt") をする)とコンパイルが出来る。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0