[My Blog]
All roads lead to JavaRanch
Swati Save wrote:
you must save your program with the same name as your class name.
if you are taking your class name as Test and while saving your writing test.java
Vishal Srivastava, Software Engineer (Android), Paradigm Creatives
SCJP 5, SCWCD 5 - http://in.linkedin.com/in/srivastavavishal
No it won't. Java is case-sensitive and will complain about the difference between test and Test.Swati Save wrote: . . . if you are taking your class name as Test and while saving your writing test.java
program will compile . . .
Christophe Verré wrote:Your class needs to be in the classpath. If you are executing it from the same directory, then you can use "java -cp . Example" to tell the JVM that the current directory should be in the classpath.
Regards,
Vishnu
Campbell Ritchie wrote:Have you set a system CLASSPATH variable? What operating system are you using? Have a look at this "Common Problems" link, and use ctrl-F to find the error you are suffering. It tells you how to get rid of your CLASSSPATH (for the lifetime of the current command prompt). Does that help at all?
Regards,
Vishnu
Campbell Ritchie wrote:Delete that CLASSPATH entirely. I presume you have your PATH set correctly otherwise you would have "javac is not recognized . . ." errors.
Then try again.
Regards,
Vishnu

