In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article is to share with you about how to install the latest version of jdk and the environmental variables, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.
download
JDK
Java's official website is called www.sun.com.
Installation
Double-click the file jdk-8u144-windows-x64.exe and follow the wizard step by step. (note that the installation directory should be appropriate)
Modify the installation path
After the JDK installation is completed, an interface will pop up to install JRE, just click close.
Environment variable
A configuration environment variable is a set of paths
Start a dos; and tap a command in dos, and the system will find it according to one of the paths configured in the environment variable, the command .exe, the command .bat, the command .cmd. If it is found, it will be executed. If it cannot be found, the following command will be reported that the external command cannot be executed.
Open dos (command prompt)
Press the windows key (the key in ctrl and alt with Windows's logo on one side) + R, and an interface pops up:
Click the start menu
Dos enhanced version
Enter command: in the newly opened dos window, type: notepad to open a notepad
Default environment variables:
% SystemRoot%\ system32;%SystemRoot%;%SystemRoot%\ System32\ Wbem;%SYSTEMROOT%\ System32\ WindowsPowerShell\ v1.0\; C:\ java\ TortoiseGit\ bin;C:\ java\ TortoiseSVN\ bin;C:\ java\ Git\ cmd
Where:% SystemRoot% refers to c:\ windows, and the input notepad.exe finds the notepad.exe at: C:\ Windows\ System32, so it executes. To use before multiple paths; separate.
Configure environment variables
When you enter javac, the following interface appears by default, indicating that the system cannot find javac.exe,javac.bat,javac.cmd in a large number of paths specified in the environment variable (path), so the following error will be reported
Actually javac: it's under C:\ Java\ jdk1.8.0_144\ bin
If you do not configure the environment variable, you must write down the path every time you access the javac. If you follow the given path, if you can't find it, go to the environment variable.
Absolute path: (reference: root directory)
C:\ Java\ jdk1.8.0_172\ bin\ javac.exe
Relative path: (reference: current directory)
Bin\ javac.exe
Examples
Relative path:
Village: just say the group when you introduce it; reference: village
Town: let's first talk about the XX group of XX village; reference: town
Beijing web page: X province, city, X county; reference: Beijing
Absolute path:
At any time: say X province, city, X county; frame of reference
Nothing is forever absolute; it's just that the frame of reference is different.
Tips for using Dos:
First name
Description
Examples
Toggle drive letter:
Drive letter + colon
C:
Go to a directory
Cd + path
Cd c:\ Java\ jdk1.8.0_172\ bin\ javac.exe
Current path
.
Upper-level path
..
This path is not configured in the default environment variables:
Default environment variabl
% SystemRoot%\ system32;%SystemRoot%;%SystemRoot%\ System32\ Wbem;%SYSTEMROOT%\ System32\ WindowsPowerShell\ v1.0\; C:\ java\ TortoiseGit\ bin;C:\ java\ TortoiseSVN\ bin;C:\ java\ Git\ cmd
Solution
Create a variable value: JAVA_HOME, which is the installation path of jdk
Configure PATH environment variables
% JAVA_HOME%\ bin;%SystemRoot%\ system32;%SystemRoot%;%SystemRoot%\ System32\ Wbem;%SYSTEMROOT%\ System32\ WindowsPowerShell\ v1.0\; C:\ java\ TortoiseGit\ bin;C:\ java\ TortoiseSVN\ bin;C:\ java\ Git\ cmd
Click OK all the way
After configuring the environment variables, you need to reopen a new dos
The above is how to install the latest version of jdk and the environment variables. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.