title: Solr Setup - Error: Could not find or load main class org.apache.solr.cloud.ZkCLI
body: <p>I am following the tutorial to set-up Solr (<a href="http://lucene.apache.org/solr/quickstart.html" rel="nofollow">http://lucene.apache.org/solr/quickstart.html</a>) using Windows 7, Java version 1.8 and Solr version 4.10.2.</p>
  
  <p>Java is installed at C:\root\java and Solr is installed at c:\root\solr-4.10.2.</p>
  
  <p>I have added 2 Environment Variables as User variables:</p>
  
  <pre><code>CLASSPATH = C:\ROOT\solr-4.10.2\dist\solr-core-4.10.2.jar
  JAVA_HOME = c:\root\java
  </code></pre>
  
  <p>I then run the following code in my command prompt:</p>
  
  <pre><code>cd c:\root\solr-4.10.2\bin &amp; solr start -e cloud -noprompt
  </code></pre>
  
  <p>The output is pasted below. The Solr server for collection1 seems to be working fine, although the gettingstarted core was not added. But, why are there errors for ZkCLI and SolrCLI? Am I doing something wrong?</p>
  
  <pre><code>Welcome to the SolrCloud example
  
  
  Starting up  Solr nodes for your example SolrCloud cluster.
  Starting node1 on port 8983 using command:
  solr -cloud -p 8983 -d node1
  
  Waiting for  0 seconds, press a key to continue ...
  Starting node2 on port 7574 using command:
  solr -cloud -p 7574 -d node2 -z localhost:9983
  
  Waiting for  0 seconds, press a key to continue ...
  
  Now let's create a new collection for indexing documents in your 2-node cluster.
  
  
  Deploying default Solr configuration files to embedded ZooKeeper
  
  Error: Could not find or load main class org.apache.solr.cloud.ZkCLI
  Creating new collection gettingstarted with 2 shards and replication factor 2 us
  ing Collections API command:
  
  "http://localhost:8983/solr/admin/collections?action=CREATE&amp;name=gettingstarted&amp;
  replicationFactor=2&amp;numShards=2&amp;collection.configName=default&amp;maxShardsPerNode=3
  &amp;wt=json&amp;indent=2"
  
  For more information about the Collections API, please see: https://cwiki.apache
  .org/confluence/display/solr/Collections+API
  
  Error: Could not find or load main class org.apache.solr.util.SolrCLI
  
  SolrCloud example is running, please visit http://localhost:8983/solr"
  
  
  c:\ROOT\solr-4.10.2\bin&gt;java -version
  java version "1.8.0_25"
  Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
  Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
  
  c:\ROOT\solr-4.10.2\bin&gt;
  </code></pre>