I'm trying to import a project into Intellij using Solus and I'm having a bit of an issue with Gradle being able to find the correct Java location. I get this error when I try to sync:
Cause: error=2, No such file or directory
Which, when going through Intellij's logs, is caused by this:
Caused by: java.io.IOException: Cannot run program "/opt/jdk1.8.0_221/bin/java" (in directory "/home/me"): error=2, No such file or directory
For some reason Gradle is looking in my home directory for my $JAVA_HOME location, and I have no idea why or how to point it to the right destination. I have a symlink between /opt/jdk1.8.0_221
and usr/bin/java
, and when I run echo $JAVA_HOME
I get this output:
~ $ echo $JAVA_HOME
/usr/bin/java
Is there something I'm doing incorrectly with setting up Java on Solus? Or am I missing some Gradle setting?