IntelliJ Scala does not work anymore after El Capitan upgrade
If the system version of Java 6 is installed, it gets removed when you upgrade.

For applications that still rely on it, you will need to reinstall it.

Download the official Apple installer and install it. Your program should then work as expected.

Edit: Optionally, inspect your project settings and see if you configure your project to use a newer version of the Java SDK, such as 8u60.