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 > Computer Software News >
Share
Shulou(Shulou.com)05/31 Report--
I believe that many computer programmers and programmers will often encounter the word "JDK environment variable", but in practice, it is still quite difficult for some users to install JDK and configure environment variables, so today the editor will tell you how to set this JDK environment variable on the Mac Apple computer.
1. Visit the Oracle official website http://www.oracle.com, browse to the menu at the bottom of the front page, and then follow the instructions below. (as shown in the following figure:)
Click the "JDK DOWNLOAD" button. (as shown in the following figure:)
3. Select "Accept Lisence Agreement" to agree to the agreement. (as shown in the following figure:)
4. Click the download link after Mac OS X x64. (as shown in the following figure:)
When the download is complete, click the installation package and follow the prompts to complete the installation.
5. Open Finder, and you can find the installed jdk 1.8.0_40.jdk in the path shown in the following figure. (as shown in the following figure:)
6. The Home folder under Contents is the root directory of the JDK. (as shown in the following figure:)
Where:
Some terminal command tools used by JDK for development are stored in the bin directory. Common tools such as:
The function of "javac" is to compile java source files into class files (that is, self-decoding files)
The "java" command runs the class file.
Under the db directory is an open source relational database developed by java
Under the include directory are some header files in C language.
The java runtime that JDK depends on under the jre directory
Store some library files that JDK development tools depend on in the lib directory
The documentation for JDK development tools is stored in the man directory.
Then enter "java-version", and if you see the jdk version 1.8, the configuration is already in effect. (as shown in the following figure:)
1. In the state of English input method, press the keyboard "Ctrl + space" key to call up Spotlight search, where you can quickly start the terminal, enter ter, and then enter to open the terminal. (as shown in the following figure:)
2. If you are configuring environment variables for the first time, you can use "touch .bash _ profile" to create one. Hidden configuration file for bash_profile (if you are editing an existing configuration file, use the "open-e. Bash _ profile" command):
3. Enter the "open-e. Bash _ profile" command. (as shown in the following figure:)
4. Enter the following configuration:
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home
PATH=$JAVA_HOME/bin:$PATH:.
CLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:.
Export JAVA_HOME
Export PATH
Export CLASSPATH
Then save and close the window.
5. Use "source .bash _ profile" to make the configuration effective
6. Type echo $JAVA_HOME to display the path you just configured
All right, the above is the editor to bring you about "Mac install JDK and configure environment variables" this problem all introduced, through the above steps, can be easily set up, I hope to help you.
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.