What is the difference between 'java', 'javaw', and 'javaws'?
See Java tools documentation for:
java
command1/javaw
command2
- The
java
tool launches a Java application. It does this by starting a Java runtime environment, loading a specified class, and invoking that class'smain
method.- The
javaw
command is identical tojava
, except that withjavaw
there is no associated console window. Usejavaw
when you don't want a command prompt window to appear.
javaws
command, the "Java Web Start command"
The
javaws
command launches Java Web Start, which is the reference implementation of the Java Network Launching Protocol (JNLP). Java Web Start launches Java applications/applets hosted on a network.
If a JNLP file is specified,javaws
will launch the Java application/applet specified in the JNLP file.
Thejavaws
launcher has a set of options that are supported in the current release. However, the options may be removed in a future release.
See also JDK 9 Release Notes Deprecated APIs, Features, and Options:
Java Deployment Technologies are deprecated and will be removed in a future release
Java Applet and WebStart functionality, including the Applet API, the Java plug-in, the Java Applet Viewer, JNLP and Java Web Start, including thejavaws
tool, are all deprecated in JDK 9 and will be removed in a future release.
java: Java application executor which is associated with a console to display output/errors
javaw: (Java windowed) application executor not associated with console. So no display of output/errors. It can be used to silently push the output/errors to text files. It is mostly used to launch GUI-based applications.
javaws: (Java web start) to download and run the distributed web applications. Again, no console is associated.
All are part of JRE and use the same JVM.