Configuring Java Environment Variables on a Windows Host
- Open Control Panel, search for environment variables, and open the System Properties window.
- On the Advanced tab, click Environment Variables.
- In the System variables area, click New and add the following two variables in sequence.
Table 1 Creating system variables Name
Value
CLASSPATH
.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;
NOTE:Do not omit the period (.) in the beginning of the variable value.
JAVA_HOME
Enter the Java installation path. For example, C:\Program Files\Java\jdk1.8.0_222. You can search for jdk to determine this path.
- In the System variables area, double-click Path. In the dialog box that is displayed, add the variable value %JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;.
- Click OK.
- Open the Git Bash client and enter the java -version command.
If information similar to the following is displayed, the configuration is successful.
Figure 1 Checking the Java version
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot