JAVA开发所需环境配置

JDK环境变量

1.Oracle下载JDK1.8
2.安装JDK,并记下JDK安装路径
在这里插入图片描述3.环境变量配置

  • 在系统变量中新增变量
    在这里插入图片描述- 在Path中新增
    在这里插入图片描述3.测试
    在这里插入图片描述

MySQL解压版配置

下载地址:https://pan.baidu.com/s/1Pf9crPxCv_9dFL2VV-3akw密码:9e2l

MySQL解压版配置

MAVEN配置

链接:https://pan.baidu.com/s/1IfuQvUiYx7MGMYER2I4rPA
提取码:0pc3

setting.xml配置文件

<?xml version="1.0" encoding="UTF-8"?>
 
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
 
    <pluginGroups>
    </pluginGroups>
	
	<localRepository>F:\Maven\local-Repository</localRepository>
    <proxies>
    </proxies>
 
    <servers>
    </servers>
 
    
	<mirrors>
		<mirror>  
			<id>nexus-aliyun</id>  
			<mirrorOf>central</mirrorOf>    
			<name>Nexus aliyun</name>  
			<url>http://maven.aliyun.com/nexus/content/groups/public</url>  
		</mirror>
	</mirrors>
    <!-- 配置jdk版本-->
    <profiles>
        <profile>
            <id>JDK-1.8</id>
            <activation>
                <activeByDefault>true</activeByDefault>
                <jdk>1.8</jdk>
            </activation>
            <properties>
                <maven.compiler.source>1.8</maven.compiler.source>
                <maven.compiler.target>1.8</maven.compiler.target>
                <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
            </properties>
        </profile>
    </profiles>
    <activeProfiles>
		<activeProfile>JDK-1.8</activeProfile>
    </activeProfiles>

</settings>

环境变量配置:

  • 新建MAVEN_HOME
    在这里插入图片描述
  • Path新增%MAVEN_HOME%\bin
    在这里插入图片描述测试:
    打开cmd,输入mvn -version
    在这里插入图片描述

NodeJS

1.Node.js已自带npm,安装Node.js时会一起安装
安装后可在cmd输入npm -v和node -v测试是否安装成功
在这里插入图片描述
1.环境配置主要配置的是npm安装的全局模块所在的路径,以及缓存cache的路径,之所以要配置,是因为以后在执行类似:npm install express [-g] (后面的可选参数-g,g代表global全局安装的意思)的安装语句时,会将安装的模块安装到【C:\Users\用户名\AppData\Roaming\npm】路径中,占C盘空间。
我在安装好的nodejs文件夹中新建两个空文件夹【node_cache】,【node_global】
在这里插入图片描述创建完两个空文件夹之后,打开cmd命令窗口,输入

npm config set prefix “E:\java\version\node\nodejs\node_global”
npm config set cache “E:\java\version\node\nodejs\node_cache”
在这里插入图片描述接下来设置环境变量,关闭cmd窗口,打开环境变量
在【系统变量】下新建【NODE_PATH】,输入【E:\java\version\node\nodejs\node_global\node_modules】,将【用户变量】下的【Path】修改为【E:\java\version\node\nodejs\node_global】
在这里插入图片描述在这里插入图片描述在这里插入图片描述先将源切换成淘宝源:
npm config set registry https://registry.npm.taobao.org

  • 配置后可通过下面方式来验证是否成功
    npm config get registry

测试:npm install express -g # -g是全局安装的意思
在这里插入图片描述
在这里插入图片描述安装成功~

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值