When we need to use Java for program development, we must first install jdk, and then configure the Java environment variables according to the jdk installation directory. So how to configure the Java environment variables?
How to configure java environment variables
For Java program development, two commands of the JDK are mainly used: javac. exe,java.exe. Assuming path: C:\Java\jdk 1.7.0 _09\bin. However, since these commands are not Windows' own commands, if you want to use them, you need to configure the path. (Recommended tutorial: java tutorial)
Click "Computer-Properties-Advanced System Settings" and click "Environment Variables". Click "New" under the "System Variables" column to create a new system environment variable.
(1) Create new->Variable name "JAVA_HOME", variable value "C:\Java\jdk1.8.0_05" (that is, the installation path of JDK)
(2)Edit->Variable name "Path", add ";%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin" at the end of the original variable value
(3) New -> Variable name "CLASSPATH", variable value ".;%JAVA_HOME%\lib;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar"
Confirm environment configuration Is it true:
javac command:
cmd-->java -version
Detect JAVA version
The above is the detailed content of How to configure java environment variables. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Dreamweaver CS6
Visual web development tools