IOException when trying to run new ballerina project

136 views Asked by At

Tools:

  • MacOS 10.15.6
  • Ballerina distribution slp4
  • IntelliJ IDEA 2020.2.3
  • Ballerina plugin 1.2.8

I created a new Ballerina project in IntelliJ, then added a module named main containing one file, main.bal.

main.bal contains a main() function.

Clicking the green arrow next to it gives me this output:

/usr/local/Cellar/ballerina/1.2.8/libexec/distributions/ballerina-slp4/bin/ballerina run --sourceroot /Users/me/ballerina/my-project main
Compiling source
    me/main:0.1.0

Creating balos
    target/balo/main-2020r2-any-0.1.0.balo
    target/bin/main.jar

Running executables

error: Error occurred while running the executable java.io.IOException: error=2, No such file or directory

Process finished with exit code 1

The same thing happens when I open a terminal window and do ballerina run main.

What could be causing this?

2

There are 2 answers

9
Suganya On

This happens when Ballerina is installed via Homebrew on macOS. Could you please try with the mac installer? We will fix this soon.

0
Dulaj Dilshan On

I got this solved after removing the ballerina installation fully and deleting its files.

For ubuntu I used: sudo dpkg -r <ballerina-package> and sudo dpkg --purge <ballerina-package>

And then, I manually deleted the content in ballerina installation and .ballerina directory in the home directory.