You should run
java Clock2

(without the class extension), i.e java class_name

--
Regards,
Anthony G. Starovojtov,
System Administrator of IMS Department,
Kharkov State Technical University of Radioelectronics,
pr. Lenina,14, room 254, Kharkov, 61726, Ukraine
Phone +380 572 409451 (Work), +380 572 648863 (Home)
E-mail: [EMAIL PROTECTED],  [EMAIL PROTECTED]
ICQ: 32572820;   Yahoo Messenger ID: starovojtov

Zhang Yuyong wrote:

 

hi everyone:
i used jdk118(glibc version) on redhat6.0, and i have already set my JAVA_HOME envoirment variable to "/opt/jdk118_v1" , and CLASSPATH is "/opt/jdk118_v1/lib/classes.zip:." .

 in the directory /opt/jdk118_v1/demo/Clock,  i can complier the source file with "javac Clock2.java", but when i run it with "java Clock2.class",  i get an error "can't find class Clock2.class", what should i do?

any help will be appreciated!
thanks

the files in the /opt/jdk118_v1/demo/Clock lists as following:
-rwxr-xr-x   1 root     root         5033 Dec 28 16:41 Clock2.class
-rwxr-xr-x   1 root     root         8306 Dec  7 23:11 Clock2.java
-rwxr-xr-x   1 root     root         1469 Dec  7 23:11 example1.html


 
 

Reply via email to