在IntelliJ Idea中设置和使用环境变量

在IntelliJ Idea中设置和使用环境变量

问题描述:

我设置了一个环境变量(在IDE Settings -> Path Variables下)

I set up an environment variable (Under IDE Settings -> Path Variables)

 APP_HOME = /path/to/app_home  

我的一个测试失败了

 System.out.println("APP HOME: " + APP_HOME); 

使用

 APP HOME: null/ 

看起来不像正在读取env变量.我想念什么?

It does not look like that env variable is being read. What am i missing?

路径变量对话框与环境变量无关.

Path Variables dialog has nothing to do with the environment variables.

可以在操作系统中指定环境变量,也可以在运行"配置中自定义环境变量:

Environment variables can be specified in your OS or customized in the Run configuration: