[Mac] VS Code development environment construction (Java, Gradle, Node.js)

1. Java, Gradle, Node installation

brew installation

  1. Execute the following to install.

Terminal


/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Java installation

  1. Download Java SE Development Kit * u *** → Mac OS X → jdk-* u ***-macosx-x64.dmg from the following site and run the installer.

Java8(Archive) Java9(Archive)

  1. Setting environment variables (execute the following according to the version)

Terminal


export JAVA_HOME=`/System/Library/Frameworks/JavaVM.framework/Versions/A/Commands/java_home -v "1.8"`
source ~/.bash_profile
  1. Version confirmation

Terminal


java -version
#OK if the output is as follows
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

Gradle installation

  1. Execute the following to install.

Terminal


brew update
brew install gradle
  1. Version confirmation

Terminal


gradle -v
#OK if the output is as follows
------------------------------------------------------------
Gradle 6.3
------------------------------------------------------------

Build time:   2020-03-24 19:52:07 UTC
Revision:     bacd40b727b0130eeac8855ae3f9fd9a0b207c60

Kotlin:       1.3.70
Groovy:       2.5.10
Ant:          Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM:          1.8.0_144 (Oracle Corporation 25.144-b01)
OS:           Mac OS X 10.14.6 x86_64

Groovy installation

  1. Execute the following to install.

Terminal


brew install groovy
  1. Version confirmation

Terminal


groovy -v
#OK if the output is as follows
Groovy Version: 3.0.3 JVM: 1.8.0_144 Vendor: Oracle Corporation OS: Mac OS X

Node installation

  1. Execute the following to install nodebrew.

Terminal


brew install nodebrew
  1. Version confirmation

Terminal


nodebrew -v
#OK if the output is as follows
nodebrew 1.0.1
:
  1. Execute the following to install nodebrew. (Example when v8.11.1 is specified)

Terminal


mkdir -p ~/.nodebrew/src
nodebrew install-binary v8.11.1
  1. Activation of the version used

Terminal


nodebrew use  v8.11.1
  1. Version confirmation

Terminal


nodebrew list
#OK if the output is as follows
v8.11.1

current: v8.11.1
  1. Pass through

Terminal


echo 'export PATH=$PATH:~/.nodebrew/current/bin' >> ~/.bashrc
source ~/.bashrc
  1. Node version confirmation

Terminal


node -v
#OK if the output is as follows
v8.11.1
  1. npm version check

Terminal


npm -v
#OK if the output is as follows
5.6.0

2. Git

  1. Execute the following to install.

Terminal


brew install git
  1. Pass through the pass.

Terminal


echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile
  1. Version confirmation

Terminal


git --version
#OK if the output is as follows
git version 2.26.2

3. Install VS Code

Download the main body by google.

Extension installation

  1. Start VS Code
  2. Open the command palette (cmd + shift + p)
  3. Select "Shell Command: Install'code' command in PATH"
  4. Open the terminal and do the following

Terminal


code --install-extension MS-CEINTL.vscode-language-pack-ja
code --install-extension VisualStudioExptTeam.vscodeintellicode
code --install-extension leizongmin.node-module-intellisense
code --install-extension vscjava.vscode-java-debug
code --install-extension vscjava.vscode-java-dependency
code --install-extension vscjava.vscode-java-pack
code --install-extension vscjava.vscode-java-test
code --install-extension vscjava.vscode-maven
code --install-extension vscjava.vscode-spring-boot-dashboard
code --install-extension vscode-icons-team.vscode-icons
code --install-extension shardulm94.trailing-spaces
code --install-extension ionutvmi.path-autocomplete
code --install-extension redhat.vscode-yaml
code --install-extension eamodio.gitlens
code --install-extension donjayamanne.githistory
code --install-extension CoenraadS.bracket-pair-colorizer-2
code --install-extension GitHub.vscode-pull-request-github
code --install-extension IBM.output-colorizer
code --install-extension emilast.LogFileHighlighter
code --install-extension stevencl.addDocComments

Command to output a list of installed extensions


code --list-extensions | xargs -L 1 echo code --install-extension
  1. From the menu below, open the setting file with "Code> Basic settings> Settings", check it as you like, and enable it. (Enter the property name in "Search settings" to filter.) ・ InsertFinalNewline -> Insert the latest line at the end when saving a file ・ Editor.renderControlCharacters -> Display control characters ・ Terminal.integrated.copyOnSelection -> Automatically copy the selected text in the terminal ・ Editor.wordWrap -> Wrap display. Wrapping is effective by setting it to "on". ・ Workbench.startupEditor -> Open untitled file at startup. Untitled file can be set with "newUntitledFile", and can be set without specification with "none".

Recommended Posts

[Mac] VS Code development environment construction (Java, Gradle, Node.js)
Java development environment (Mac, VS Code)
Build Java development environment with VS Code on Mac
[Environment construction] Build a Java development environment with VS Code!
Java web application development environment construction with VS Code (struts2)
Prepare Java development environment with VS Code
Java development environment construction memo on Mac
java development environment construction
Build a Java development environment with VS Code
Rails6 development environment construction [Mac]
Java development environment (Mac, Eclipse)
Build Java development environment with WSL2 Docker VS Code
How to build Java development environment with VS Code
Java Spring environment in vs Code
Java build with mac vs code
Build Java development environment (for Mac)
[Java & SpringBoot] Environment Construction for Mac
Install Java development environment on Mac
Create a Java and JavaScript team development environment (gradle environment construction)
Java development environment construction (Mac + Pleiades All in One Eclipse 4.7 + Spring Boot + Gradle (Buildship))
[Processing x Java] Construction of development environment
Laravel development environment construction with Docker (Mac)
[Java] Environment construction
Java environment construction
Java development environment
What is Java and Development Environment (MAC)
Build a Java development environment on Mac
Let me do VS Code Remote Development + Java development in Proxy environment
Spring Boot + Docker Java development environment construction
Hello World on Mac VS Code Java
[ev3 × Java] leJOS development environment construction (Eclipse on Mac OSX / bluetooth)
Introduction to Java development environment & Spring Boot application created with VS Code
[Jakarta EE 8 application development with Gradle] 1. Environment construction
Using Gradle with VS Code, build Java → run
Ruby on Rails development environment construction on M1 Mac
[Mac] Install Java in Visual Studio Code (VS Code)
Java development environment memo
Create a Java development environment using jenv on Mac
Build Java program development environment with Visual Studio Code
Java + Spring development environment construction with VirtualBox + Ubuntu (Xfce4)
The procedure I did when I prepared the environment of gradle + Java with VS Code (Windows 10)
JavaFX application development with IntelliJ IDEA and Gradle ~ From environment construction to sample code ~
JavaFX environment construction in Java 13
AtCoder Challenge Environment Construction (Java 8)
[Rails / MySQL] Mac environment construction
Web application development environment construction in Java (for inexperienced people)
Eclipse installation and code completion enhancements (Mac for Java development)
Build WebAPP development environment with Java + Spring with Visual Studio Code
[Java development environment construction] Install OpenJDK 11 (Java 11) on macOS with Homebrew.
[Windows] WSL2 + Ubuntu + Node.js environment construction
Node.js environment construction with Docker Compose
[Eclipse Java] Development environment setting memo
◆ Spring Boot + gradle environment construction memo
Environment construction for Servlet application development
Ruby environment construction summary ~ mac version ~
Prepare Java development environment with Atom
[Unity] Android development environment construction procedure
Play Framework 2.6 (Java) development environment creation
Java 15 implementation and VS Code preferences
About the current development environment (Java 8)
JSP + Eclipse + Jetty development environment construction that even Java beginners can do