Java does not produce .exe files. The are various (Windows specific)
tools that do - compilers - but javac isn't one of them.
If you mean the question more generally: "How do I create files that the
user can run by double clicking them, or typing their name at a
command prompt?", then the usual method is to create a .jar file.
In Windows double clicking a .jar file usually results in javaw being run
with the .jar file as its only argument. The application contained in the
.jar file then runs.
Creating .jar files - complete with lots of examples - is covered in Sun's
Tutorial here: http://java.sun.com/docs/books/tutorial/deployment/jar/index.html
(Like any document or executable a java applcation can be launched
from a .bat or .cmd file, but if you don't actually need the fine control that
these offer, .jar files are the way to go.)