Java环境安装

最近新换了电脑,重新配置环境,恰好讲这些基础能力归档一下,欢迎收藏~~

1.jdk

下载地址https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

环境配置JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_212.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 CLASSPAT

2.maven安装与配置

1 下载Maven

地址:http://maven.apache.org/download.cgi

下载tar.gz文件,并将其解压到usr/local/maven目录下。

2 配置Maven环境变量

iTem终端打开下面配置文件:

vi ~/.bash_profile

按 i 键进入编辑模式,输入如

export M2_HOME=/usr/local/maven/apache-maven-3.3.3 export PATH=$PATH:$M2_HOME/bin

点击 esc 按钮退出编辑模式,输入 :wq 保存退出。

输入如下命令使配置生效:

source ~/.bash_profile

重新打开一个终端,输入:

mvn -v

3. git 安装

https://git-scm.com/download/mac

Download for macOS

There are several options for installing Git on macOS. Note that any non-source distributions are provided by third parties, and may not be up to date with the latest source release.

Homebrew

Install homebrew if you don't already have it, then:
$ brew install git

Xcode

Apple ships a binary package of Git with Xcode.

Binary installer

Tim Harper provides an installer for Git. The latest version is 2.33.0, which was released 8 days ago, on 2021-08-30.

Building from Source

If you prefer to build from source, you can find tarballs on kernel.org. The latest version is 2.33.0.

Installing git-gui

If you would like to install git-gui and gitk, git's commit GUI and interactive history browser, you can do so using homebrew
$ brew install git-gui

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值