升级到IntelliJ 14后,Java和Scala ClassNotFoundException [英] Java and Scala ClassNotFoundException after upgrading to IntelliJ 14

查看:125
本文介绍了升级到IntelliJ 14后,Java和Scala ClassNotFoundException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近升级到 IntelliJ 14 ,然后添加了 Scala 支持.

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

我的主文件停止运行.例如,GUI文件,该文件没有错误,并且是完全独立的hello world样式,用于测试此错误:

My main files stopped running. For example the GUI file, which has no errors and is a totally self contained hello world style for testing this error:

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

这是没有道理的,我很沮丧IntelliJ开发人员在不自动检测解决方案方面懈怠.我已经尽力解决了.从设置,编译器到重新创建项目.

It makes no sense and I'm pretty frustrated that the IntelliJ devs are slacking in not auto-detecting a solution to this. I have tried everything to fix it. From settings, compilers, to making the project from scratch.

从头开始制作时,我只有一点运气,但是一旦我开始添加其他文件(甚至没有使用过的文件!),它就会从错误开始.

I only had a bit of luck when making it from scratch, but as soon as I started to add my other files (files that were not even being used!) it starts with the error.

似乎在原始项目模块之外的任何文件(在创建新项目以测试修订时)都不会运行,并提供ClassNotFoundException.

这可能与我的其他问题有关:

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

推荐答案

结果显示,Make,No Error Check在scala中的作用与Java相同.

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

scala文件中的错误将在运行时导致模棱两可的错误消息,没有明确的错误链接.

Errors in the scala files will cause an ambiguous error message on run, with no clear link to the error.

修复scala文件可修复错误.

Fixing the scala files fixes the error.

这篇关于升级到IntelliJ 14后,Java和Scala ClassNotFoundException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆