title: Spark-Java: Build the doc example from the command line
body: <p>I'm trying to build the simple example in the Spark-Java <a href="http://sparkjava.com/documentation.html#getting-started" rel="nofollow noreferrer">documentation</a> from the command line.  I've added the dependency to my pom.xml and I'm using the code from the first example:</p>
  
  <p>Added the dependency:</p>
  
  <pre><code>&lt;dependency&gt;
  &lt;groupId&gt;com.sparkjava&lt;/groupId&gt;
  &lt;artifactId&gt;spark-core&lt;/artifactId&gt;
  &lt;version&gt;2.5.5&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>Tried compiling and running this code:</p>
  
  <pre><code>import static spark.Spark.*;
  
  public class HelloWorld {
      public static void main(String[] args) {
          get("/hello", (req, res) -&gt; "Hello World");
      }
  }
  </code></pre>
  
  <p>But when I attempt to run this I get the errors:</p>
  
  <pre><code>error: ')' expected
  error: illegal start of expression
  error: ';' expected
  </code></pre>
  
  <p>The commands I'm using to compile and run my project are:</p>
  
  <pre><code>mvn compile
  mvn -q exec:java
  </code></pre>
  
  <p>Why am I getting these errors when I attempt to run this from the command line? </p>