![](https://michalpiotrowski.dev/wp-content/uploads/2025/02/ErlangLogo.jpg)
Written by Michał Piotrowski2025-02-08
Simple HelloWorld with Erlang in IntelliJ
Erlang Article
Erlang isn’t the most popular functional language out there, but sometimes there’s a need to touch it. I got one project written in it, and therefore I had to setup my IntelliJ to work properly. Here’s a short story how to setup our favourite IDE to run simple HelloWorld in Erlang.
My intent here is to have a simple remind-me post, so don’t expect anything fancy. Here are the steps:
-
- Have IntelliJ installed
- Install Erlang
- Install Erlang Plugin
- Restart the IDE
- You can freely create new Erlang project – simple HelloWorld
- Create a simple file (e.g. hello.erl) and put the following contents there:
-module(hello). -author("michal.piotrowski"). %% API -export([hello_world/0]). hello_world() -> io:fwrite("hello, world\n").
- Create a new runtime config with the Erlang Console as a type. Also you should add build as a before launch step.
- Now just run the project – the Erlang console should appear in the IDE. In order to run our simple function just paste there (note the ‘.’ at the end of the line!):
hello:hello_world().
- The output should look kind like this:
hello, world ok 2>
- That means it works 😉
Leave a Reply
You must be logged in to post a comment.