How I Fixed: cannot access ‘java.io.serializable’ which is a supertype of ‘kotlin.int’

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 'java.io.serializable' which is a supertype of 'kotlin.int'

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.

Published by

Code Review

CodeReviewVideos is a video training site helping software developers learn Symfony faster and easier.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.