开发者

Java can't find class named 'and'? --Not standard class not found exception--

I know there are a thousand java can't find a class questions,开发者_运维知识库 but this one really seems weird and not like the standard type.

This is the exception I am getting:

Exception in thread "main" java.lang.NoClassDefFoundError: and
Caused by: java.lang.ClassNotFoundException: and
    at java.net.URLClassLoader.findClass(URLClassLoader.java:434)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:660)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:358)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:626)

I have no idea whats going on because it is looking for a class named 'and'. First this is non capitalized and supposedly a class name, and second it is showing up in the standard package, which I don't really use. So to me it looks like something else is the problem, but I can't figure it out. I had someone else look at it and they were lost too, so if someone could provide some insight, then that would be appreciated.

Thanks!

Update: Here is the error message that pops up when I try to run the launch.

Java can't find class named 'and'? --Not standard class not found exception--


you are providing the full path to your My Documents to the command line aren't you?

the problem is that the path to your My Documents folder has C:\Documents and Settings in it and the command line delimits arguments by whitespace and is interpreting this as separate arguments instead of part of a path

and the first argument of java without a leading - is taken as the class name where the main function is

if you are using commandline enclose the paths in ": "C:\Documents and Settings\hbtest\My Documents\path to folder"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜