私はスカラ言語の簡単な例で作業しようとしました. 無事にインストールsbt
できました。実行するsbt -h
と、sbt からのヘルプ メッセージが表示されます。
Usage: sbt [options]
-h | -help print this message
-v | -verbose this runner is chattier
-d | -debug set sbt log level to debug
-no-colors disable ANSI color codes
-sbt-create start sbt even if current directory contains no sbt project
-sbt-dir <path> path to global settings/plugins directory (default: ~/.sbt)
-sbt-boot <path> path to shared boot directory (default: ~/.sbt/boot in 0.11 series)
-ivy <path> path to local Ivy repository (default: ~/.ivy2)
-mem <integer> set memory options (default: 1536, which is -Xms1536m -Xmx1536m -XX:MaxPermSize=384m -XX:ReservedCodeCacheSize=192m) ....
しかし、scala割り当てを使用してディレクトリで実行しようとすると(Courseraコースです)、エラーが発生しました:
nazar_art@nazar-desctop:~/scala/example$ sbt
Detected sbt version 0.12.1
Starting sbt: invoke with -help for other options
Error occurred during initialization of VM
Could not reserve enough space for object heap
ただし、sbt コマンド プロンプトを開く必要があります。このようにsmt:
shell$ cd /path/to/progfun-project-directory # This is the shell of the operating system
shell$ sbt
> _ # This is the sbt shell
アップデート:
この次の行を追加した後
java -Xms64M -Xmx256M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=64M -jar
ディレクトリ名 $0/sbt-launch.jar "$@"
/usr/bin
次の出力が表示されます。
nazar_art@nazar-desctop:/usr/bin$ sbt
bash: /usr/bin/sbt: Permission denied
nazar_art@nazar-desctop:/usr/bin$ sudo sbt
sudo: sbt: command not found
-なぜこれが起こるのですか?
- この問題を解決するにはどうすればよいですか?