Reputation: 16192
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 ?
Upvotes: 0
Views: 3788
Reputation: 4368
You should identify where the AggressiveOpts
option is coming from - I haven't found that in their repo on github: https://github.com/elastic/elasticsearch
This option has been removed from the recent JDK versions - see https://chriswhocodes.com/hotspot_options_jdk11.html -> there you'll see it was deprecated in JDK 12 and subsequently removed.
That's said, I'd be surprised if Elastic Search wouldn't support anything older than JDK 13 - if you want to run it with JDK 11 you should probably tell gradle so: How do I tell Gradle to use specific JDK version?
Upvotes: 1