oops

コンパイルエラーの要因を探ります。

《関連記事》

┃なにが問題か

プログラムをコンパイルしようとしても、

$ cd sheep/tips902/
$ scalac -d bin Tips.scala
scalac error: bin does not exist or is not a directory
  scalac -help  gives more information
$ 

ディレクトリー bin が存在しないと指摘されます。ここに問題がありそうです。そこで、ディレクトリー bin を作成して、再コンパイルします。

$ cd sheep/tips902/
$ scalac -d bin Tips.scala
$ scala -cp bin apple.pie.Tips

すると、何も問題なく、プログラムを実行できます。

scalac -d オプション
$ scalac -help
Usage: scalac  
where possible standard options include:
  ...
  -d          destination for generated classfiles.

-d オプションを利用すると、指定したフォルダーにクラスファイルを生成します。

update*12/07/14 14:38:00