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.
Difference between java.exe and javaw.exe
java.exe is the command where it waits for application to complete untill it takes the next command.
javaw.exe is the command which will not wait for the application to complete. you can go ahead with another commands.
Does removing C:\Windows\System32\{java,javaw,javaws}.exe prevent Java malware?
The runtime (and the JDK, for that matter) does not need to be installed in order to use it.
I recommend the following:
make a copy of the JRE, somewhere new, or perhaps one per dependent app
uninstall it
check your browser(s) for plugins and delete/disable them if they got left behind
delete the
java.exe
files in%windir%
if they get left behinddo not point the PATH or any environment variables at a copy of the JRE
While removing or disabling the browser plugin may be sufficient, I personally wouldn't trust that it will remain removed or disabled. The Java automatic updater, for example, might inadvertently reinstall them.
Of course, doing this means that you don't get automatic updates. But Java security issues that affect legitimate programs are rare.
Difference between java.exe, javaw.exe and jvm.dll
jvm.dll
is the actual Windows implementation of the JVM (or better, the main entry point). C or C++ applications can use this DLL to run an embedded Java runtime, and that would allow the application to interface directly with the JVM, e.g. if they want to use Java for its GUI.java.exe
is a wrapper around the DLL so that people can actually run Java classes without the need for a custom launcher application. It is a Win32 Console application, so Windows will open a fresh Command Prompt window if the exe is not run from a batch file.javaw.exe
is a wrapper likejava.exe
, but it is a Win32 GUI application. Windows doesn't have to open a Command Prompt window, which is exactly what you want to run a GUI application which opens its own windows.
EDIT: These shouldn't make any difference in performance except for the overhead of process creation and initialization.
The most important thing: it should't matter; if you are worrying about this you might actually want to keep Java running instead of launching it hundreds of times.
Why javaw is not found on my java installation on ubuntu?
The javaw
utility is not available or needed on Linux. Just use java
instead.
Explanation:
on Windows, the difference between
java
andjavaw
is thatjava
launches a new Windows console andjavaw
doesn't.on Linux, the
java
command does not launch a new console, and hence there is no need for ajavaw
variant.
Related Topics
Java 8: Difference Between Method Reference Bound Receiver and Unbound Receiver
Resizing Icon to Fit on Jbutton in Java
Coding Conventions - Naming Enums
How to Configure Jackson in Wildfly
Is String Literal Pool a Collection of References to the String Object, or a Collection of Objects
Leiningen - How to Add Dependencies for Local Jars
Create a Maven Project in Eclipse Complains "Could Not Resolve Archetype"
Best Way to Encode Text Data for Xml in Java
Changing the Shapes of Points in Scatter Plot
Retrieve Version from Maven Pom.Xml in Code
Differencebetween 'Java', 'Javaw', and 'Javaws'
Java Error Opening Registry Key
How to Sort Date Which Is in String Format in Java
Custom JSON Deserializer Using Gson
What Is the Convention for Word Separator in Java Package Names