Topic: 请大虾帮忙看看这种出错情况!! (java.lang.NoClassDefFoundError) |
Print this page |
1.请大虾帮忙看看这种出错情况!! (java.lang.NoClassDefFoundError) | Copy to clipboard |
Posted by: li123 Posted on: 2004-04-14 16:51 D:\ClassTest\sqlorder>java sqlorder.sqlclass Exception in thread "main" java.lang.NoClassDefFoundError: sqlorder/sqlclass (wr ong name: sqlorder/SqlClass) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:537) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12 3) at java.net.URLClassLoader.defineClass(URLClassLoader.java:251) at java.net.URLClassLoader.access$100(URLClassLoader.java:55) at java.net.URLClassLoader$1.run(URLClassLoader.java:194) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:187) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) D:\ClassTest\sqlorder>java -classpath d:\classtest\jtds-0.8-rc1.jar sqlorder.sql class Exception in thread "main" java.lang.NoClassDefFoundError: sqlorder/sqlclass 我快被他折腾死了; 大虾救救小弟。。 谢谢!!! |
2.Re:请大虾帮忙看看这种出错情况!!! [Re: li123] | Copy to clipboard |
Posted by: Jove Posted on: 2004-04-14 16:52 CLASSPATH=. |
3.Re:请大虾帮忙看看这种出错情况!!! [Re: li123] | Copy to clipboard |
Posted by: li123 Posted on: 2004-04-14 18:33 我已经用-classpath了还是不行 D:\ClassTest\sqlorder>java -classpath d:\classtest\jtds-0.8-rc1.jar sqlorder.sql class Exception in thread "main" java.lang.NoClassDefFoundError: sqlorder/sqlclass |
4.Re:请大虾帮忙看看这种出错情况!!! [Re: li123] | Copy to clipboard |
Posted by: bluebangbang Posted on: 2004-04-14 18:39 According your classpath,Can you find the floder sqlorder??? |
5.Re:请大虾帮忙看看这种出错情况!!! [Re: li123] | Copy to clipboard |
Posted by: jameszhang Posted on: 2004-04-14 21:51 li123 wrote: classpath后面没有"" !!! |
6.Re:请大虾帮忙看看这种出错情况!!! [Re: li123] | Copy to clipboard |
Posted by: dorrenchen Posted on: 2004-04-14 22:04 run your command in "D:\ClassTest", not "D:\ClassTest\sqlorder" |
7.Re:请大虾帮忙看看这种出错情况!!! [Re: li123] | Copy to clipboard |
Posted by: zhanglixy Posted on: 2004-04-17 20:16 URL中有端口号吗? |
8.Re:请大虾帮忙看看这种出错情况!! (java.lang.NoClassDefFoundError) [Re: li123] | Copy to clipboard |
Posted by: kjjx Posted on: 2004-04-29 17:10 在你的classpath变量前面加上 .; |
9.Re:请大虾帮忙看看这种出错情况!! (java.lang.NoClassDefFoundError) [Re: li123] | Copy to clipboard |
Posted by: 风暴冲浪 Posted on: 2004-04-30 23:42 怎么没有高手进来支招啊。。。我也出现这种问题了。。。 |
10.Re:请大虾帮忙看看这种出错情况!! (java.lang.NoClassDefFoundError) [Re: li123] | Copy to clipboard |
Posted by: 风暴冲浪 Posted on: 2004-05-01 00:15 你看看大小写吧。。。我的问题解决了。。是大小的问题。。。 |
11.Re:请大虾帮忙看看这种出错情况!! (java.lang.NoClassDefFoundError) [Re: li123] | Copy to clipboard |
Posted by: bencafe Posted on: 2004-05-03 10:26 maybe classpath wrong |
12.Re:请大虾帮忙看看这种出错情况!! (java.lang.NoClassDefFoundError) [Re: li123] | Copy to clipboard |
Posted by: bencafe Posted on: 2004-05-03 10:28 maybe classpath is wrong |
13.Re:请大虾帮忙看看这种出错情况!! (java.lang.NoClassDefFoundError) [Re: li123] | Copy to clipboard |
Posted by: midlet Posted on: 2004-05-03 10:30 this is a problem of package definition. When Java is trying to load your program or program package, it will start searching directory in environment variable CLASSPATH. You can add".;" into the varaible to make java loader search your program in your CURRENT DIRECTORY. And also, in your question, i think you should go to directory D:\ClassText rather than D:\ClassText\sqloader since your have explicitly state your package as sqloader.sqlclass. By the way, I heard that JDK1.4.2 has done some adjustment for this. It means you will not encouter such a problem even without proper CLASSPATH setting. |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |