Home > Java > javaTutorial > A brief discussion on how to set up environment variables in Java

A brief discussion on how to set up environment variables in Java

青灯夜游
Release: 2018-11-28 09:38:04
forward
2799 people have browsed it

This article brings you a brief discussion of how to build environment variables in Java. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

Install JDK development environment

jdk download address: https://www.oracle.com/technetwork/java/javase /downloads/jdk10-downloads-4416644.html, select the corresponding version to download (Remember the installation address during the installation process, you will use later)

JDK environment variable configuration

Steps: Right-click "Computer"-> Right-click-> Properties Open the "System Panel" ”

Create a new JAVA_HOME environment variable, JAVA_HOME=C:\Java\jdk1.8.0_144

Modify the path environment variable, add %JAVA_HOME at the end of the path variable %\bin (separate with semicolon ";")

Create a new classpath environment variable, classpath=.;%JAVA_HOME%\lib;% JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\tools.jar (Note the preceding symbols ".;")

Check the java and javac commands

Enter Java or javac in cmd

If you get the above output, it means the installation is successful

The above is the detailed content of A brief discussion on how to set up environment variables in Java. For more information, please follow other related articles on the PHP Chinese website!

source:cnblogs.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template