Could not find the main class: *****.Program will exit
2014-02-02 19:03
267 查看
今天在运行一个 java Application时突然出现一下对话框,并抛异常。
java.lang.NoClassDefFoundError: sy12/FrameQueryTest
Caused by: java.lang.ClassNotFoundException: sy12.FrameQueryTest
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Exception in thread "main"
解决办法是:
由于我的磁盘合并过,原来的jdbc驱动所在的磁盘盘号变了,重新引入了驱动包,但原来的驱动包没删,所以出现了这个问题,把原来的包删了就好了。报的是找不到FramQueryTest的main函数,但实际上和这个没关系。
java.lang.NoClassDefFoundError: sy12/FrameQueryTest
Caused by: java.lang.ClassNotFoundException: sy12.FrameQueryTest
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Exception in thread "main"
解决办法是:
由于我的磁盘合并过,原来的jdbc驱动所在的磁盘盘号变了,重新引入了驱动包,但原来的驱动包没删,所以出现了这个问题,把原来的包删了就好了。报的是找不到FramQueryTest的main函数,但实际上和这个没关系。
相关文章推荐
- 错误处理:could not find the main class, Program will exit
- java调用本地方法的时候报错 could not find the main class:xx.program will exit
- Eclipse 出错:Could not find the main class. Program will exit
- Could not find the main class. Program will exit.
- Java执行main方法,异常为:could not find the main class.program will exit
- Could not find the main class. Program will exit...
- Could not find the main class Program will exit 解决方案解决办法
- "Could not find the main class: org.apache.catalina.startup.Boostrap. Program will exit."
- Eclipse运行异常:Could not find the main class. Program will exit.
- @(报错)could not find the main class, Program will exit(已解决)
- Could not find the main class. Program will exit
- 错误处理:could not find the main class, Program will exit
- Could not find the main class: org.apache.catalina.startup.Boostrap. Program will exit.
- Debian配置JAVA环境报错之Could not find the main class: HelloWorld. Program will exit.
- Could not find the main class. Program will exit.
- (报错)could not find the main class, Program will exit(已解决)
- MyEclipse导入项目错误:Could not find the main class.Program will exit.
- could not find the main class : program will exit
- Java中Could not find the main class.program will exit和java.lang.UnsupportedClassVersionError 的解决方法
- Eclipse运行异常:Could not find the main class. Program will exit.