Java开发环境配置

HeJin大约 4 分钟

01.基础环境

JDK

下载地址:http://www.codebaoku.com/jdk/jdk-index.htmlopen in new window

安装:D盘新建目录environments专门存放。在目录environments下新建一个Java-SE-Development-Kit,用于存放jdk。里面再建一个java8目录,存放jdk8的文件。里面再建jdkjre,分别存放开发环境和运行时环境。

D:\environments\Java-SE-Development-Kit
- jdk8
	- jdk1.8.0_351
	- jre1.8.0_351

环境变量配置:

  • Path系统变量添加jdk安装路径下的bin目录,确保在最上面,不然有可能会被覆盖。

    jdk安装目录: D:\environments\Java-SE-Development-Kit\jdk8\jdk1.8.0_351\bin
    
    java
    
    javac
    
    java -version
    
    image-20230301133242669
    image-20230301133242669

Maven

下载地址:https://maven.apache.org/download.cgiopen in new window

环境变量:在Path系统环境变量添加maven安装目录的bin目录

D:\Maven\apache-maven-3.9.0\bin

mvn -v
image-20230301134404763
image-20230301134404763

配置:在D盘新建一个根目录Maven,用于存放maven文件。再在D盘新建一个根目录新建一个Mvnrepo,用于存放本地下载的maven依赖。

D:\Maven\apache-maven-3.9.0  存放maven安装和配置文件

D:\Mvnrepo 存放本地下载的maven依赖

打开D:\Maven\apache-maven-3.9.0\conf的配置文件settings.xml,主要配置本地仓库的位置中央仓库的地址

<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 https://maven.apache.org/xsd/settings-1.2.0.xsd">
  <!-- localRepository
   | The path to the local repository maven will use to store artifacts.
   |
   | Default: ${user.home}/.m2/repository
  <localRepository>/path/to/local/repo</localRepository>
  -->
  # 本地仓库位置
  <localRepository>D:\Mvnrepo</localRepository>
  <!-- interactiveMode
   | This will determine whether maven prompts you when it needs input. If set to false,
   | maven will use a sensible default value, perhaps based on some other setting, for
   | the parameter in question.
   |
   | Default: true
  <interactiveMode>true</interactiveMode>
  -->
  ...
    
  ...
    
  <mirrors>
    <!-- mirror
     | Specifies a repository mirror site to use instead of a given repository. The repository that
     | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
     | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
     |
    <mirror>
      <id>mirrorId</id>
      <mirrorOf>repositoryId</mirrorOf>
      <name>Human Readable Name for this Mirror.</name>
      <url>http://my.repository.com/repo/path</url>
    </mirror>
     -->
    # 中央仓库地址  
    <mirror>  
      <id>alimaven</id>  
      <name>aliyun maven</name>  
      <url>https://maven.aliyun.com/repository/public</url>  
      <mirrorOf>central</mirrorOf>  
    </mirror>
  </mirrors>
    
    ...
    ...
</settings>    

MySQL

下载地址:https://dev.mysql.com/downloads/installer/open in new window

安装:

Redis

windows版本:https://github.com/tporadowski/redis/releasesopen in new window

Git

下载:https://git-scm.com/downloadsopen in new window

安装:https://blog.csdn.net/mukes/article/details/115693833open in new window

Git大全:https://gitee.com/all-about-gitopen in new window

生成/添加SSH公钥:

Nodejs

下载地址:https://nodejs.org/en/open in new window

安装:https://blog.csdn.net/qq_48485223/article/details/122709354open in new window

node -v        显示安装的nodejs版本
npm -v        显示安装的npm版本

02.开发工具

IDEA

下载地址

激活:https://www.exception.siteopen in new window

ja-netfilter.zip

jetbra.zip

idea设置

maven配置

  • idea需要配置maven为本地的maven环境,不要使用默认的。
  • 代码拉下来之后,首先看jdk版本,然后看maven环境。

插件

  • .ignore
  • Alibaba Java Coding Guidelines (2.1.1-fix-2022.1)
  • arthas idea
  • CamelCase
  • CheckStyle-IDEA
  • CodeGlance Pro
  • EasyCode-MybatisCodeHelper
  • GenerateAllSetter
  • GenerateSerialVersionUID
  • Git Commit Template
  • GitToolBox
  • Grep Console
  • GsonFormatPlus
  • Json Parser
  • Maven Helper
  • maven-search
  • MyBatisX
  • One Dark theme
  • POJO to JSON
  • QAPlug
  • QAPlug - FindBugs
  • Rainbow Brackets
  • Randomness
  • Save Actions
  • SequenceDiagram
  • SonarLint
  • SQL Params Setter
  • Statistic
  • String Manipulation
  • Translation

03.工具网站

软件

网站

浏览器插件

下载地址:https://www.extfans.com/allopen in new window

  • Adblock Plus
  • Charset
  • Chrono下载管理器
  • Imagus
  • Infinity 新标签页 (Pro)
  • JSON Viewer
  • OneTab
  • Tampermonkey
  • Vue.js devtools
  • 书签侧边栏
  • 沙拉查词-聚合词典划词翻译