I want to understand the inner workings of Elasticsearch, for that, I want to debug the Elasticsearch Source Code in IntelliJ IDEA.
I am following this and this to install and configure the code in Intellij.
I have cloned the main Elasticsearch code repository to my local machine.
Then, I imported Elasticsearch into an IntelliJ IDEA project. IntelliJ IDEA starts building the source code, and after some time build is completed and is successful.
Now, the next step was to Start Elasticsearch for debugging, for that I ran the following command in terminal
./gradlew :run
But, then I got the following error :
Unrecognized VM option 'AggressiveOpts' Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.
I followed several SO answers, but I am not able to resolve this issue.
Gradle version is 6.3
and Java version is 14
Edit 1:
When I switched to java version 11, and ran the command ./gradlew :run
I get the error :
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':generateGlobalBuildInfo'.
The compiler java.home must be set to a JDK installation directory for Java 13 but is [/home/bhavya/.jenv/versions/11] corresponding to [11]
Can anyone help me resolve this issue ?