title: Installing Elasticsearch on OSX Mavericks
body: <p>I'm trying to install Elasticsearch 1.1.0 on OSX Mavericks but i got the following errors when i'm trying to start:</p>
  
  <pre><code>:&gt; ./elasticsearch
  Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.elasticsearch.Version
  at org.elasticsearch.bootstrap.Bootstrap.buildErrorMessage(Bootstrap.java:252)
  at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:236)
  at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32)
  </code></pre>
  
  <p>Also when i'm executing the same command with -v arg, i got this error:</p>
  
  <pre><code>:&gt; ./elasticsearch -v
  Exception in thread "main" java.lang.NoSuchFieldError: LUCENE_36
  at org.elasticsearch.Version.&lt;clinit&gt;(Version.java:42)
  </code></pre>
  
  <p>Here's my environment:</p>
  
  <p>Java version</p>
  
  <pre><code>&gt;: java -version
  java version "1.8.0"
  Java(TM) SE Runtime Environment (build 1.8.0-b132)
  Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)
  </code></pre>
  
  <p>Instalation path (downloaded .tar.gz archive from elasticsearch download page and extracted here):</p>
  
  <pre><code>/usr/local/elasticsearch-1.1.0
  </code></pre>
  
  <p>ENV vars:</p>
  
  <pre><code>JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home 
  CLASSPATH=/usr/local/elasticsearch-1.1.0/lib/*.jar:/usr/local/elasticsearch-1.1.0/lib/sigar/*.jar
  </code></pre>
  
  <h2>UPDATE</h2>
  
  <p>i finally make it working, unfortunally not sure how because i tried a lot of changes :). But here's a list of changes i made that can help:</p>
  
  <ul>
  <li><p>i removed jdk and jre and reinstalled on a clean env.
  <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/install/mac_jdk.html#A1096855" rel="noreferrer">http://docs.oracle.com/javase/8/docs/technotes/guides/install/mac_jdk.html#A1096855</a></p></li>
  <li><p>i deleted all the cache dirs.I suppose this can be the 'cause' for that it's working now</p></li>
  </ul>
  
  <p><strong>~/Library/Caches</strong></p>
  
  <p><strong>/Library/Caches</strong></p>
  
  <ul>
  <li><p>i removed CLASSPATH env var. </p></li>
  <li><p>ES_PATH and ES_HOME env vars are not set either, but i think this is not so important.</p></li>
  </ul>
  
  <p>Note: now it's working also if i'm installing with brew. </p>
  
  <p>Thanks.</p>