Differencebetween 'Java', 'Javaw', and 'Javaws'

What is the difference between 'java', 'javaw', and 'javaws'?

See Java tools documentation for:

  • java command1/javaw command2
  1. The java tool launches a Java application. It does this by starting a Java runtime environment, loading a specified class, and invoking that class's main method.
  2. The javaw command is identical to java, except that with javaw there is no associated console window. Use javaw 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.

The javaws 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 the javaws 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 behind

  • do 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 like java.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 and javaw is that java launches a new Windows console and javaw doesn't.

  • on Linux, the java command does not launch a new console, and hence there is no need for a javaw variant.



Related Topics



Leave a reply



Submit