m****a 发帖数: 394 | 1 I compiled the a simples java file in Linux smoothly, but
when I tried to executes iit using "java test", it said that
" can not find test class", why?
I checked out the PATH and CLASSPATH, seems all are ok, I do
not know why? can any body help me?
Thanks in advance. | n********g 发帖数: 10 | 2 Is your class named "test"?
try to find *.class to see whether you typed the correct class name.
【在 m****a 的大作中提到】 : I compiled the a simples java file in Linux smoothly, but : when I tried to executes iit using "java test", it said that : " can not find test class", why? : I checked out the PATH and CLASSPATH, seems all are ok, I do : not know why? can any body help me? : Thanks in advance.
| m****a 发帖数: 394 | 3 yeah. I did. I compiled a java source code file "test.java"
to "test.class". and I am sure that it existed in the same
directory, but "java test" does NOT work, so I am really
really puzzled about it. what's wrong with it? I checked out
all $CLASSPATH and $PATH, everything seems ok. so I do not
know why.
【在 n********g 的大作中提到】 : Is your class named "test"? : try to find *.class to see whether you typed the correct class name.
| d*x 发帖数: 9 | 4
Try the "-classpath" option, instead of setting CLASSPATH.
【在 m****a 的大作中提到】 : yeah. I did. I compiled a java source code file "test.java" : to "test.class". and I am sure that it existed in the same : directory, but "java test" does NOT work, so I am really : really puzzled about it. what's wrong with it? I checked out : all $CLASSPATH and $PATH, everything seems ok. so I do not : know why.
| m****a 发帖数: 394 | 5 I got it , very stupid mistake I've made. thanks all anyway
在 dxx (xd) 的大作中提到: 】 |
|