Description:
My machine has installed JDK 11 and i am using ballerina 1.2.8 which has inbuilt jdk 1.8.
When i execute build command it works but when i execute run command i am getting following warning whereas uses my installed JDK.
WARNING: Incompatible JRE version '11.0.8' found. This ballerina program supports running on JRE version '1.8.*'
ballerina: Oh no, something really went wrong.
This might be due to we are not setting inbuilt jdk for ballerina commands like run,test etc. https://github.com/ballerina-platform/ballerina-update-tool/blob/master/resources/bin/ballerina#L27
This happened inside packerina run executable task where it referred java
Following 2 PRs have fixed this in both 1.2.x and swanlake previews
https://github.com/ballerina-platform/ballerina-lang/pull/26535/
https://github.com/ballerina-platform/ballerina-lang/pull/26534/
Most helpful comment
This might be due to we are not setting inbuilt jdk for ballerina commands like run,test etc. https://github.com/ballerina-platform/ballerina-update-tool/blob/master/resources/bin/ballerina#L27