title: scala: Error occurred during initialization of VM on Ubuntu 12.04
body: <p>I tried to work with easy example of scala language.
  I installed <code>sbt</code> successfully. When run <code>sbt -h</code> I see help message from sbt:</p>
  
  <pre><code>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   &lt;path&gt;  path to global settings/plugins directory (default: ~/.sbt)
    -sbt-boot  &lt;path&gt;  path to shared boot directory (default: ~/.sbt/boot in 0.11 series)
    -ivy       &lt;path&gt;  path to local Ivy repository (default: ~/.ivy2)
    -mem    &lt;integer&gt;  set memory options (default: 1536, which is -Xms1536m -Xmx1536m -XX:MaxPermSize=384m -XX:ReservedCodeCacheSize=192m) ....
  </code></pre>
  
  <p>but when I tried to run in the directory with scala assignments (it's Coursera course) I caught error:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>but it should open the sbt command prompt. Smt like this:</p>
  
  <pre><code>shell$ cd /path/to/progfun-project-directory                        # This is the shell of the operating system
  shell$ sbt
  &gt; _                                                                 # This is the sbt shell
  </code></pre>
  
  <p><strong>UPDATE:</strong>  </p>
  
  <p>After I add this following line</p>
  
  <p><code>java -Xms64M -Xmx256M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=64M -jar</code>dirname $0<code>/sbt-launch.jar "$@"</code></p>
  
  <p>at <code>/usr/bin</code> I see next output:</p>
  
  <pre><code>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
  </code></pre>
  
  <p><strong><em>- Why this happen?<br>
   - How to solve this issue?</em></strong></p>