![]() This will append export "JAVA_HOME=\$(/usr/libexec/java_home -v 1.7)" into your bash_profile file. If successful, mvn -version will return info on what was just installed.You can set JAVA_HOME in Mac OS X 10,10 or Yosemite by adding the following command in your ~/.bash_profile file, as shown below:Įxport JAVA_HOME= `/usr/libexec/java_home` (remember backticks)Įcho export "JAVA_HOME= \$(/usr/libexec/java_home -v 1.7)" > ~/.bash_profile bash_profile to refresh it and then run mvn -version. If you're using the same terminal, go ahead and clear it with CMD K. The latest version as of 08/26/20 is 3.6.3.Įxport M2_HOME=/Applications/apache-maven-3.6.3 ![]() Version number will vary based on when you're reading this. bash_profile again and add these two variables. ![]() Once it's downloaded, move it into your Applications folder and unzip it ( unzip apache-maven-3.6.3-bin.zip).This tutorial follows downloading the binary zip archive file. Add export JAVA_HOME=$(/usr/libexec/java_home) to the file and save it.bash_profile, go ahead and create one with touch. If you run echo $JAVA_HOME and it returns blank, it means you haven't set the variable yet. bash_profile, you can skip the next step). Next, you'll need to add the $JAVA_HOME variable in your.In your terminal, if you run java -version again now, it should return details of the installed JDK.You can check the installed Java path by going to your Mac's Settings > Java > Java (within the Java Control Panel) > Path.If you don't have a JDK installed, you can download it here. Open a new terminal and run java -version.You can skip the first half if you already have Java JDK installed. I've needed to set up Java and Maven enough times that I figured I should write about it so that it's an easier setup for at least one other person. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |