adityasinghraghav adityasinghraghav - 1 year ago 319
Java Question

How can I setup and run/debug ElasticSearch in IntelliJ IDEA

I am trying to learn how ES works however I haven't been able to run it from an IDE. I want to run the 2.3.3 build which still uses Maven as its build system but keep getting errors. Can someone tell me how I can do this in IDEA after I download the repository in detail ie. the configuration etc.

I downloaded the repository from github, then I imported the project into intellij
and used the following configurations:

Main class: org.elasticsearch.bootstrap.Elasticsearch

Vm options:


working directory: ES directory

environment variable: ES_TEST_LOCAL=true

use classpath of module: elasticsearch(1)(org.elasticsearch)

and then I get the following errors when i try to run:


Answer Source


  1. Build the root project : mvn clean package -DskipTests (or execute
  2. copy ./distribution/src/main/resources/config to ./core/.

Create a Run/Debug configuration as follows:

Main Class: org.elasticsearch.bootstrap.Elasticsearch   
VM Options: -Des.path.home=/code/elasticsearch/core   
Program Arguments: start   
Classpath of Module : [select the core project]   
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download