Quick steps:
1. Create a new text file in Notepad.
2. Add the javac line, just like you would in your dos session.
3. Save the file as something like "CompileJava.bat".
You can now run the batch file from the dos prompt or double-click it in Windows. There's no advantage to doing this for only one compilation, but how many programs have you worked on that only required compilation once? By doing it this way, you don't have to reopen a dos session or re-type the command. I use this method for compilation and also for running a
Java app under a JVM of my choice.
You can also have multiple compilation configurations in the batch file, one for each line, then add "REM" in front of the ones you don't use. This is the same as commenting out a line of code in a source file. To modify your compilation configuration, you just move one of the REMarks from the line you want to run to the currently unREMarked line. You can also copy, paste, then modify any line. Very flexible, very repeatable.
[ October 20, 2004: Message edited by: Jeff Bosch ]