Difference between java and javaw

Both applications will run your program, and are very similar, but have one key difference - java runs it through a Java Console, while javaw does not.

    The console is there mostly for text programs - for example, all your print statemements won't get printed if you run it using javaw. The same then goes for error messages, messages you print on the program's usage etc etc.

    However a java console slows the program down some - since it's constantly listening to your program for things to output.

 

    So, if you're choosing which to use:

          1) If it's a text-based program, use java.

          2) If it's graphical but prints text at any point, use java

          3) If you're error checking, use java

          4) If it's purely graphical, and you need to increase the speed, use javaw.

你可能感兴趣的:(java javaw)