intelij idea: Exception in thread "main" java.lang.ClassNotFoundException
来源:互联网 发布:python上使用caffe 编辑:程序博客网 时间:2024/06/04 18:03
http://www.cnblogs.com/do-better/p/5864165.html
从网上搜了好多,大多是说,在类里边是不是没有main函数,而且强调了main函数的写法: public static void main(String[] args)
还有人说了classpath的问题,是不是找不到那个类,等等。
其实,我使用的是intelij idea,也看了书,知道main该怎么写,所以,以上答案都不对!
直到我看到了顶上的答案,实验了一下,果然如此!!我已经找了一周的方法了,查了那么多网页,就这个是对的!我要把这个小错误再记录一下,希望能被其他新手看到,少耽误时间!
对,就是project structure对话框,module的设置里,paths那一项,把输出的位置设置好,估计关键是那个文件夹要存在吧?我为了统一管理输出,在project设置里,project compiler output下设置了一个绝对路径的文件夹,已经存在的文件夹,然后再module的设置的paths里,输出那一项,选择继承,即inherit project compile output path。
1 0
- intelij idea: Exception in thread "main" java.lang.ClassNotFoundException
- intelij idea: Exception in thread "main" java.lang.ClassNotFoundException
- idea找不到导入的包和类,intelij idea: Exception in thread "main" java.lang.ClassNotFoundException
- IntelliJ IDEA Exception in thread "main" java.lang.ClassNotFoundException
- Exception in thread "main" java.lang.ClassNotFoundException
- 异常:Exception in thread "main" java.lang.ClassNotFoundException: Student
- Exception in thread "main" java.lang.ClassNotFoundException: xxxx
- intelij idea java.lang.ClassNotFoundException
- IDEA 14.1.3-import之前的scala项目报错:Exception in thread "main" java.lang.ClassNotFoundException: kmust.hj
- IDEA 14.1.3-import之前的scala项目报错:Exception in thread "main" java.lang.ClassNotFoundException: kmust.hj
- Exception in thread "main" java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
- Exception in thread "main" java.lang.NoClassDefFoundError
- Exception in thread "main" java.lang.NoClassDefFoundError
- Exception in thread "main" java.lang.NoClassDefFoundError
- Exception in thread "main" java.lang.NoClassDefFoundError
- Exception in thread "main" java.lang.NoClassDefFoundError:
- Exception in thread "main" java.lang.NoClassDefFoundError
- Exception in thread "main" java.lang.NoClassDefFoundError
- linux中的线程本地存储pthread_key_t和pthread_once
- HZAU 1099 Die Die Die!(分类讨论水题)
- Litepal的使用
- java泛型
- Zend Studio 12.5.1 破解、注册码
- intelij idea: Exception in thread "main" java.lang.ClassNotFoundException
- Android 中布局的优化措施都有哪些?
- web.xml配置
- UIViewController生命周期
- php socket编程学习建立简单web服务器
- 【21.58%】【codeforces 746D】Green and Black Tea
- (读书笔记) 暗时间(12.19日更)
- 斐波拉契数列
- 整理 pthread