Like Dave said,
javaw.exe doesn't spawn a command line prompt.
java.exe does, but the command window will disappear as soon as the program has finished running, so
you should usually put a
readLine() statement at the end of your program so the user has the chance to see the output.