What's wrong with it?

Hello everyone! I hava a question:

I have make programe and import two classes(which is in E:\mypackage\test\)

generated by myself,

when my envirenment aguments is:

JAVA-HOME:C:\jdk1.6.0

path:.;C:\jdk1.6.0\bin

classpath:.;C:\jdk1.6.0\lib;E:\mypackage

these happens:

E:\mydsn\code>javac GuessNumber.java

GuessNumber.java:8: can't access GenNumber

wrong class fole丗 .\GenNumber.java

file doesn't contains class GenNumber

please delete the file or make sure it is in a right sub-director of classpath.

GenNumber random1=new GenNumber();

^

1 error

but when my envirenment aguments is:

JAVA-HOME:C:\jdk1.6.0

path:.;C:\jdk1.6.0\bin

classpath:C:\jdk1.6.0\lib;E:\mypackage

it can pass compile,but when I run it:

the follows happens:

E:\mydsn\code>java GuessNumber

Exception in thread "main" java.lang.NoClassDefFoundError: GuessNumber

please help me please!1 Thank you!

Message was edited by:

Jfan

[1072 byte] By [Jfana] at [2007-10-3 4:08:46]
# 1

but when my envirenment aguments is:

JAVA-HOME: C:\jdk1.6.0

path: .;C:\jdk1.6.0\bin

classpath: C:\jdk1.6.0\lib;E:\mypackage

it can pass compile,but when I run it:

the follows happens:

E:\mydsn\code>java GuessNumber

Exception in thread "main" java.lang.NoClassDefFoundError: GuessNumber

in the above setting change the CLASSPATH setting to

classpath: .;C:\jdk1.6.0\lib;E:\mypackage

so that it can include the current directory for loading classes.

Pravin

PMJaina at 2007-7-14 22:08:39 > top of Java-index,Java Essentials,New To Java...
# 2
crosspost http://forum.java.sun.com/thread.jspa?messageID=4364758
kilyasa at 2007-7-14 22:08:39 > top of Java-index,Java Essentials,New To Java...