1、MANIFEST.MF
在工程下新建一个MANIFEST.MF的文件,项目结构如下。
M.java
package cn.hwd.main;
import java.io.IOException;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.impl.HttpSolrClient;
import org.apache.solr.client.solrj.response.QueryResponse;
import org.apache.solr.common.SolrDocument;
import org.apache.solr.common.SolrDocumentList;
public class M {
public static void main(String[] args) throws IOException, SolrServerException {
HttpSolrClient solrClient;
String url = "http://localhost:8983/solr/user";
solrClient = new HttpSolrCl