Reputation: 1102
When I try to download sources of a library class pulled by Maven I receive error in Intellij IDEA:
java.rmi.ConnectException: Connection refused to host: 127.0.0.1
Upvotes: 3
Views: 6433
Reputation: 41
Yes, Changing JDK for importer works
Settings> Build, Execution,Deployment>Build Tools>Maven>Importing
Change the "JDK for importer": [from Default to ] installed version of JDK
Upvotes: 0
Reputation: 21
After setting JDK for the Maven importer to the installed JDK, if you have done the setting and still can not download sources, you may just need to re-open your project.
Upvotes: 2
Reputation: 1102
UPD (from @Andrey): This might have been fixed in version 2021.1.3
For older versions:
This can be fixed by selecting a proper JDK in your project's Maven Importer setting.
In the project setting go to Build Tools -> Maven -> Importing
Set JDK for importer to the JDK installed on your OS (Not the built-in one)
Try to download sources again - should be working now.
Upvotes: 18