avatar
how come this stupid question?# Unix - 噫吁兮,危乎高哉
m*a
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.
avatar
n*g
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.

avatar
m*a
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.

avatar
d*x
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.

avatar
m*a
5
I got it , very stupid mistake I've made. thanks all anyway
在 dxx (xd) 的大作中提到: 】
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。