I have already set JAVA_HOME in the environment variables file as shown below.
I also built ballerina from the source and extracted the zip with the Runtime and the tools as per the Ballerina documentation. However when I try to give this distribution as the Ballerina SDK in IntelliJ IDEA or even in the Terminal and try to run a Ballerina program as shown below:
I get the following error:
Error: JAVA_HOME is not defined correctly.
But when I type:
echo $JAVA_HOME
I get the following output:
/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
What am I doing wrong?
Note: Ballerina Version: jballerina-tools-2.0.0-Preview3-SNAPSHOT