问题
I kept getting the error "Could not find or load main class org.apache.solr.util.SolrCLI" while trying to setup SOLR on windows x64 machine.
回答1:
The resolution to the problem is really simple. 1)start solr. notice that you have to use solr.cmd instead of just solr
*bin/solr.cmd start*
2) then create the collection:
*bin/solr.cmd create -c gettingstarted -p 8983*
3) then add file/s to index using post tool. You can execute the post command in two ways
a)java -Dc=gettingstarted -jar post.jar *.json
or
b) bin/post -c gettingstarted example/exampledocs/books.json
Now you can navigate to your newly created collection 'gettingstarted' and query your books.
`http://localhost:8983/solr/#/gettingstarted/query'
Hope this saves someone's time.
来源:https://stackoverflow.com/questions/43059709/could-not-find-or-load-main-class-org-apache-solr-util-solrcli