在 IntelliJ Idea 中设置和使用环境变量 [英] Setting up and using environment variables in IntelliJ Idea

查看:39
本文介绍了在 IntelliJ Idea 中设置和使用环境变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

 APP_HOME = /path/to/app_home  

我的一个测试失败了,但是

One of my tests is failing however with

 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:

这篇关于在 IntelliJ Idea 中设置和使用环境变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆