I think your PATH is okay, because otherwise the error message would be something about an unrecognized command.
.mht is a file extension for MHTML (MIME HTML), so I suspect the editor you're using to create your Java source files is saving the files as the wrong type. (Are you using MS
Word, by chance?
)
If that's the case,
you should probably find a different editor. Tell us what operating system you're using, and we can suggest some free downloads. (Even Notepad might be better than Word.)
If you want to keep your current editor (for the moment), how to work around this depends on the application you're using. But in general, make sure that your file format is
plain text. When you save, save as a generic type like "all files" or ".*". If it still adds a different extension after ".java," then try putting your file name in quotes ("HelloWorldApp.java").
Let us know what you're using and if this works.