Can't connect to a Oracle db instance via SQLDeveloper
In the meantime I figured it out myself.

The connection couldn't be established from SQL Developer because I was logged into my company's VPN and so "localhost" was resolved somehow as an IPV6 address.

When I closed the VPN connection and tried to connect with the same connection information it worked, localhost was resolved as normal IPV4 address then.