JAVA Virtual Machine installation and JAVA environment configuration, JAVA virtual machine environment Configuration

Source: Internet
Author: User

JAVA Virtual Machine installation and JAVA environment configuration, JAVA virtual machine environment Configuration

I recently helped others install the Java Virtual Machine. After the installation, problems have been solved for a long time. So I would like to share my experience with you.

First, if JAVA exists in the computer machine and you do not want this version, you can detach it (Remember, you cannot directly Delete the content in the JDK file, so it cannot be uninstalled cleanly ), generally, JDK is installed on drive C. Although JDK is deleted, some JAVA-related registries are not deleted, therefore, uninstall the program from the Control Panel> Add/delete programs.

Then go to the official website to download JDK: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html to select a machine version.

After the download is complete, install JDK:

Then install the disk. The default value is drive C.

After installation, set the environment variable JVM (Java Virtual Machine ).

Right-click my computer Properties

 

Or win10 is

 

1. Create a PATH_HOME path which is the jdk installation path:

 

2. Edit the Path variable to find the Path of the Java command. The variable value is the bin directory under the JDK installation directory.

If there are other variable values in Path, and you want to write this value first, it will be in ".; "Write down the variable value and then call it; this indicates that the variable value has been completed; otherwise, the variable value will be written in the other variable values; and then the variable value will be typed;

 

3. Create a CLASSPATH (path of the java class library) and check whether it can be executed,

 

Remember to write ".;" in front of it, and then write the dt. jar and tools. jar paths in the lib directory under the jdk installation directory, respectively, such:

To write the next one, you must enter ";" and then write the second one. Then, the installation is complete and the test starts.

Open the command line interface, press the shortcut key (WIN + R) and Enter CMD

First enter the javac-version command

This interface indicates that the Path is correct.

Step 2: Test JVM. Enter java-version

 

 

 

The installation is successful. Start the test program and use NotePad to write a program for testing.

Compile the program using the command line (I put the source program file in the Administrator's directory. If it is not, enter cd to another location, such as cd D: HELL. java)

The installation is successful.

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.