CORE JAVA simple problem ..?

Question by Mit Chauhan: CORE JAVA simple problem ..?
well i have started to learn CORE JAVA just from yesterday and its gonna be a simplest question m gonna ask you ..

i have save my my core java file in “C:\Documents and Settings\Chandrik Tools\Desktop\java\my.java” path ..

and my code is this one ..

——————————————————————————————————————
—————————————————–
my.java
—————————————————–
class a
{

public static void main(String args[])
{
System.out.println(“Hello .. This is My first Core java programme”);
}

}
——————————————————————————————————————
but when i went to “cmd” prompt and try to open this file by going
“C:\Documents and Settings\Chandrik Tools\Desktop\java\”
and by typing …
———————————-
javac my.java
———————————-
i m getting this sought of error …

———————————————————————-

< "javac" is not recognized as as internal or external command,operable programme or batch file >

———————————————————————-
wht should do noww 🙁 please help me java experts ..

thank you .. .

mitt
The First Answer not working for me as i m still getting this error by changing the path ..

🙁 help mee ..

Best answer:

Answer by Light Cloud
You need to correctly set your PATH variable.

Here’s the official solution: http://www.java.com/en/download/help/path.xml

Add your own answer in the comments!

You can leave a response, or trackback from your own site.

2 Responses to “CORE JAVA simple problem ..?”

  1. yash k says:

    This error can only be resolved by setting proper path. Or may be, you do not have jdk installed properly.
    Also, change your filename to “a.java”, which is same as the classname containing your main function.

  2. MANOJ says:

    Even though you have installed java on you system you computer does not know where to look for it.
    when you run javac command on it says no such command error.

    java compiler is in “jdk1.6.0_21bin” folder(javac.exe is the compiler).

    to tell your system to look at this path you have to set environment variable.
    Go to Control Panel->System

    System properties window will open. go to Advance Tab and click Environment Variable.

    Environment variable window will open Click on New button.

    Set Variable_name to PATH.
    and Variable_value to the path where java is installed for example
    C:Program FilesJavajdk1.6.0_21bin

Leave a Reply

You must be logged in to post a comment.

Powered by Yahoo! Answers