Seems to have a long time have not written a blog, there are some reasons for the work, there are some reasons for the individual, today just rain, there is no place to go, so the nest in the home Daoteng, this article is a brief introduction to how to build a Java development environment in the Mac OS system, do Java development work, Of course, the first is to have a Java environment, so the next step is to briefly introduce some of the Java environment variables in the MAC environment configuration work.
My humble Computer Configuration:
Open the terminal and view the 10.9.5 version of the system with what shell command:
As you can see, the console output bash shows that the system is using the Bourbe shell, which is the default Unix shell command.
Then enter java-version on the command line to view the Java version of the current system, some systems do not install the JDK by default, when you enter java-version in the console, if the system does not install the JDK environment, will automatically prompt you to install after you can use this command, At this point, you can download a Mac version of the JDK and install it on the Oracle website.
Http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
I download is the jdk1.7 version of the current official version of the latest jdk1.8.
If the system has previously successfully installed the JDK, then by entering Java-version, the command line will output the corresponding JDK version installation information.
Next, start configuring the Java environment variables
Enter the command in the terminal:
sudo vim /etc/profile
We can use VI to edit the profile file
Then enter I for insert insert mode
At the very end of the file, add the path to Java
JAVA_HOME=“Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/”CLASS_PATH=“$JAVA_HOME/lib”PATH=“.;$PATH:$JAVA_HOME/bin”
After adding, press and hold the ESC key to exit Insert mode, and then enter wq! or Wq or X to save the exit file.
Here, the entire configuration is done. This is where the global Java path and CLASSPATH environment variables are configured. Although the content is very simple, but still want to record.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
How to build a Java development environment diagram in Mac OS system