IntelliJ Scala does not work anymore after El Capitan upgrade After I have updated to El Capitan I am having problems in running a Scala project with IntelliJ.  

When I run it I obtain the following error:


  Error:Cannot run program "/System/Library/Frameworks/JavaVM.framework/Home/bin/java" (in directory "/Users/donbeo/Library/Caches/IntelliJIdea14/compile-server"): error=2, No such file or directory


I think I have to specify where Java is or something like that. 

It was working before. 

How can I solve it?
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.