Code:
I get the following when running it:
Reference:
https://www.youtube.com/watch?v=AmeDNZ-86ig
Settings (did not change anything here):
Got a solution see record "Eugene Zhuravlev 18 Feb 2016, 16:29" here: https://youtrack.jetbrains.com/issue/IDEA-140228?replyTo=27-1304218
Seems like under mac IDEA's custom SDK home points to "IntelliJ IDEA 15.app/Contents" instead of "IntelliJ IDEA 15.app/Contents/Home". As a workaround please define a project JDK in Project Structure | Project Settings | Project
来源:https://stackoverflow.com/questions/35457087/error-running-scratch-file-in-intellij-15