Differences in processes such as Java, JAVAW, Javaws, and Jvm.dll under Windows _java

Source: Internet
Author: User

The difference between Java, JAVAW and Javaws:
First of all, all of these are Java Launcher, Java.exe often used, when using the command line output to window, there will be java.exe process, through the task manager can be seen. Usually when we execute some small Java program, there will be a java.exe process running. Javaw.exe is also special to us, we can see the Javaw.exe process running through Task Manager. Javaws the process that usually comes when the web is open.

Jvm.dll

Jvm.dll is the implementation of a Java virtual machine on the Windows platform environment and is part of the JRE, a C program that can run directly on the JVM using Jvm.dll.

Java.exe

Java.exe is a Win32 console application that provides a help instead of using Jvm.dll to execute a Java classes file as a Win32 console application, apparently connected to a console that runs when Java classes is executed.

Javaw.exe

Javaw.exe is similar and Java.exe is a Win32 GUI application that provides its own GUI window without enabling the console.

So we want to run a GUI program that doesn't require a command console.

Here is an example:

Copy Code code as follows:

Package JAVAW;

Import javax.swing.*;

public class Helloworldswing {
private static void Createandshowgui () {
JFrame JFrame = new JFrame ("HelloWorld Swing");
Jframe.setdefaultcloseoperation (Jframe.exit_on_close);
JLabel Hellolabel = new JLabel ("Hello world!");
Jframe.getcontentpane (). Add (Hellolabel);
Jframe.pack ();
Jframe.setvisible (TRUE);
}

public static void Main (string[] args) {
Javax.swing.SwingUtilities.invokeLater (New Runnable () {
public void Run () {
Createandshowgui ();
}
});
}
}

It is a GUI program that runs on the console as follows:

Copy Code code as follows:

Java-classpath. Javaw. Helloworldswing

Explanation: of which-classpath. The representative sets the path of the classpath to the current directory.
The Java.exe process has occurred after running the View Task Manager------because it is running through the console.
The figure is as follows:

If you are running directly in eclipse: The Javaw.exe process occurs after the Run View Task Manager--because it is not running through the console output.
The figure is as follows:

If you run it through the command line with JAVAW, as shown in the previous illustration:

Note:

Javaw-classpath. Javaw. The process initiated by Helloworldswing is Javaw.exe
Java-classpath. Javaw. The process initiated by Helloworldswing is Java.exe

The difference between Java.exe and javaw.exe two modes of operation there's a little Java running GUI later jams up there until the window closes.

JAVAW running the GUI directly allows you to run the next command.

Javaws.exe

The Javaws.exe process is useful for starting programs that are configured through the Web, in short, in a Web application.

Summarize:
Java.exe used to start the Window console console program
Javaw.exe for starting GUI programs
Javaws.exe is used for web programs.
Jvm.dll is an implementation of Java Virtual Machine specification on Windows platform

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.