title: Unrecognized option: -o Could not create the Java virtual machine
body: <p>I've got an unusual build error when using <a href="http://buildroot.uclibc.org/" rel="nofollow noreferrer">Buildroot</a> to create an image for my <a href="http://www.phidgets.com/products.php?category=19&amp;product_id=1070" rel="nofollow noreferrer">Phidget SBC</a>. It's unusual because it occurs ONLY on my development laptop and NOT on my general use laptop even though I am using EXACTLY the same Builroot environment as <a href="http://www.phidgets.com/drivers.php" rel="nofollow noreferrer">published by Phidgets</a> themselves.</p>
  <p>When I try to create my Buildroot image I get the following error when it attempts to compile <a href="http://www.gnu.org/s/classpath/" rel="nofollow noreferrer">GNU classpath</a>:</p>
  <pre><code>Making all in tools
  make[2]: Entering directory `/home/xxxx/buildroot_phidgetsbc/buildroot-phidgetsbc_1.0.4.20111028/output/build/classpath-0.98/tools'
  /bin/mkdir -p classes asm 
  /bin/mkdir -p ../tools/generated/gnu/classpath/tools/gjdoc/expr
  java -classpath  antlr.Tool -o ../tools/generated/gnu/classpath/tools/gjdoc/expr/ \
        ./gnu/classpath/tools/gjdoc/expr/java-expression.g
  
  Unrecognized option: -o
  Could not create the Java virtual machine.
  make[2]: *** [tools.zip] Error 1
  </code></pre>
  <p>The only difference I can possibly thing of is the different Linux (Ubuntu) versions I am using on each laptop. Also I cannot find a -o option documented for Java and don't understand why it works on one laptop but not the other.</p>
  <p>Any suggestions would be helpful.</p>
  <p>** ADDITIONAL INFO **</p>
  <p>I took a look at the Makefile and here are what I think are the relevant lines:</p>
  <blockquote>
  <p>ANTLR = java -classpath  antlr.Tool ...</p>
  <p>#To generate the example zip just depend on the sources and ignore
  #the class files. Always regenerate all .class files and remove them
  #immediately.  And copy the template files we use to the classes dir
  #so they get also included.</p>
  <p>$(TOOLS_ZIP): $(ALL_TOOLS_FILES)</p>
  <p>@rm -rf classes asm   /bin/mkdir -p classes asm   /bin/mkdir -p
  $(gjdoc_gendir)/gnu/classpath/tools/gjdoc/expr<br />
  $(ANTLR) -o  $(gjdoc_gendir)/gnu/classpath/tools/gjdoc/expr/ \<br />
  $(srcdir)/gnu/classpath/tools/gjdoc/expr/java-expression.g</p>
  </blockquote>
  <p>You can see where the 'problem' line occurs in the last one quoted above</p>
  <p>** ADDITIONAL INFO 2 &amp; PROBLEM RESOLVED **</p>
  <p>I checked the Makefile on my 'regular' machine and it is different to my 'development' laptop. I have 'antlr' installed on my 'regular' machine whereas it wasn't on my development one. I assume that when ./configure was ran it picked this up and altered the antlr command to suit except on my development machine it created an erroneous alternative. For reference, my 'regular' i.e. working makefile is:</p>
  <blockquote>
  <p>ANTLR = runantlr
  ANTLR_JAR = /usr/share/java/antlr.jar</p>
  </blockquote>
  <p>Installing antlr on my development machine resolved the issue.</p>
  <p>Thanks for you help</p>