Java and Scala ClassNotFoundException after upgrading to IntelliJ 14

I recently upgraded to IntelliJ 14, and then added Scala support.

My main files stopped working. For example, a GUI file that has no errors and is a completely standalone style hello worldfor checking for this error:

Exception in thread "main" java.lang.ClassNotFoundException: GUI

This makes no sense, and I'm very upset that IntelliJ developers are not involved in automatically detecting the solution. I tried to fix it. From the settings, compilers to make a project from scratch.

I was only lucky when they did it from scratch, but as soon as I started adding my other files (files that were not even used!), It starts with an error.

It seems that any files outside the source module of the project (when creating a new project to check for fixes) will not be triggered with a ClassNotFoundException.

This may be due to my other question: https://stackoverflow.com/questions/27516673/cannot-run-file-located-out-of-main-module-intellij-14-java-scala

+4
source share
2 answers

It turns out that Make, No Error Check does not work the same for scala as it does for Java.

Errors in scala files trigger an ambiguous error message, without a clear link to the error.

Committing scala files fixes the error.

0
source
+22

All Articles