How I Fixed: cannot access ‘’ which is a supertype of ‘’

A super easy one today, as things often are when you’re just starting out. But they can be frustrating when they happen all the same.

When learning Kotlin I’ve been using the Kotlin Koans project that’s part of IntelliJ IDEA Edu.

When filling in the examples, I have been getting the error:

cannot access '' which is a supertype of ''

The fix is really simple, though a little intuitive.

sudo apt install default-jre

// after which

➜  ~ java --version
openjdk 11.0.11 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.10)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.10, mixed mode, sharing)

So, all good. I didn’t have java installed.

Makes me wonder how on earth the example Koans were able to run then, given I was at least 6 Koans in before I got so annoyed with that error that I decided to fix it.