[JAVA] Setting project environment variables in intelliJ


I think you need to set project-specific environment variables when you are assigned to a new project. It is a memo of the setting method in intellij. Probably windows will not change, but the demo is for Mac.

Setting method

  1. Open the menu preference> Build, Execution, Deployment> Build Tools> Maven> Runner

  2. Click "..." at the right end of Environment Variables

スクリーンショット 2018-03-14 14.37.06.png
  1. Add from + at the bottom of the opened window
スクリーンショット 2018-03-14 14.37.32.png

that's all

The variables set here are automatically set in the environment variables of the Maven project set in Run. If you want to set for each type of Run, make the same setting for each Run from Edit Configuration of Run.

Recommended Posts

Setting project environment variables in intelliJ
Launch (old) Spring Boot project in IntelliJ
Create Java Spring Boot project in IntelliJ
How to use environment variables in RubyOnRails
(Basic authentication) environment variables in rails and Docker
When there are environment variables in Java tests
Replacing system environment variables by reflection in java
Prepare the execution environment of Tomcat in IntelliJ Community
How to create a Spring Boot project in IntelliJ
Add an external jar file in your IntelliJ project.
[PAY.JP] About setting environment variables-Courage to delete when in trouble-
Setting the baseURL in the axios module of Docker environment Nuxt
[Beginner] Environment variable setting -dotenv-rails-
[IntelliJ] Initial setting procedure of IntelliJ
Update Ruby in Unicorn environment
Use ruby variables in javascript.
[Environment variables] What are rails environment variables?
JavaFX environment construction in Java 13
How to create a new Gradle + Java + Jar project in Intellij 2016.03