The solr.cmd starts Solr by running java -jar start.jar, which has the MANIFEST file that tells the java command that it's main class is org.eclipse.jetty.start.Main.

So, I would think your Java program should be able to start Solr (jetty, really) by calling org.exlipse.jetty.start.Main.main(argv).

But a big question is why you'd like to do that.

TK

On 4/18/18 7:34 AM, rameshkjes wrote:
Hi guys,

I am able to run the solr instance, add the core and import the data
manually. But I want to do everything with the help of Java program, I
searched a lot but did not find any relevant answer.

In order to run the solr server, i execute following command inside
directory: D:\software\solr-7.2.0\solr-7.2.0\bin

     " /solr.cmd -s "C:\Users\lucky\github\myproject\solr-config"/  "

After that I access to " /http://localhost:8983/solr// "

and select the name of core which is "demo"

and then I select/ dataimport/ tab and "/execute/" to import documents.

First thing what i tried is to run the solr server using Java program, which
I am unable to do. Could anyone please with that?

I am using Solr 7.2.0

Thanks



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Reply via email to