Reddikishore <yourkish...@gmail.com> wrote:
>> i [sic] am getting exception :"java.langnosuchmethod:main"
GArlington wrote:
> This is NOT what you are getting...
> If there is a problem copy it as it is, DO NOT rephrase...
Amen.
>> i saved it in d:colon &
In what directory did you place the source file? Because in your command lines:
>> i compiled it d:\>javac Helo.java
>> D:\>java Helo
you show no indication that you put the file in the "colon" directory.
>> at this time i got this exception.in my system ihave
>> classpath&path.for this i used JDK1.6 used
>> please solve
GArlington wrote:
> if java.lang.NoSuchMethodException is thrown that means JVM can not
> find your class/method...
> Check your class path...
Also, list your working directory (D:\ in the example you gave) to make sure
the .java and .class files that you expect actually are there.
The default classpath absent explicit specification is '.', the current
working directory. Your commands should have worked, if the .java and .class
files were in the correct directory.
For future reference, don't use the root directory of a drive as your working
directory.
--
Lew
|