compiling a program

I'm new to java and have a problem compiling my program. I wrote a program using wordpad and gave it the name myprog.java.I know i have to give a command like "javac myprog.java" to use the javac compiler, but where do I give this command. Is it in a dos-box.Please help.
[293 byte] By [drommelsa] at [2007-10-1 23:42:34]
# 1
Does "dos-box" mean Command Prompt? If it does, then yes.There are fairly good tutorials here on the Sun site such as the following. http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html
atmguya at 2007-7-15 15:32:51 > top of Java-index,Administration Tools,Sun Connection...
# 2
OK, thats done.But when I type c:\jdk\bin\javac m.java (my program is called m)It says error:cannot read:m.javaWhat's wrong.
drommelsa at 2007-7-15 15:32:51 > top of Java-index,Administration Tools,Sun Connection...
# 3

The "cannot read" error comes from the javac compiler. The compiler is reporting that it can not find a file named m.java (in the current directory).

If you enter "dir" in the Command Prompt, you will get a list of files in the current directory. According to the compiler, you will not see m.java. So either the file is somewhere else or it is named something besides m.java.

A common problem occurs when you use Notepad to create the .java file. When you save the file, Notepad may add .txt to the end of the file name. So when you enter m.java, Notepad saves the file as m.java.txt. Then the compiler obviously can not find m.java. If this is your problem, an easy fix it to put "" around the file name in the Notepad Save As dialog - "m.java" for example.

atmguya at 2007-7-15 15:32:51 > top of Java-index,Administration Tools,Sun Connection...