Get the App
SLTechnology News&Howtos  ›  Development  › 

How to build Java Development Environment under Mac OS X

Shulou Source: shulou.com Published: 2022-06-02 20:22:59 09月22日 Update

This article will explain in detail how to build a Java development environment under Mac OS X. The content of the article is of high quality, so the editor shares it for you as a reference. I hope you will have some understanding of the relevant knowledge after reading this article.

This paper introduces how to build the java development environment under the Mac osx system. With the java development environment, we can do Java-related development. Both Eclipse and Android Studio can run in the JVM environment, so we will briefly summarize how to configure java environment variables under Mac osx.

Let's first take a look at the author's computer configuration:

Open the terminal and see what shell command the version 10.10 system uses:

The output is bash, which means Bourne shell, which is the default Unix Shell command.

Let's view the author's java version from the command line:

If your system has successfully installed JDK, you can see the corresponding jdk version through java-version.

If you don't have JDK installed on your computer, you can download jdk from Oracle's official website.

Http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

The author downloaded version 1.7, and the current jdk*** version is 1.8.

Configure java environment variables

Enter sudo vim etc/profile

Use vi to edit profile files

Type I to enter insert mode

At the end of the file, add the java path

JAVA_HOME= "/ Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/"

CLASS_PATH= "$JAVA_HOME/lib"

PATH= ".; $PATH:$JAVA_HOME/bin"

After adding, press esc to exit insert mode and type wq! Save the exit file.

At this step, we have configured the global path and classpath environment variables for java.

On how to build the Java development environment under Mac OS X to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Tags: Environment development version configuration variables commands files author system content articles more patterns computers knowledge articles good successful global tail Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno MySQL Huawei Redmi Xiaomi