如何在 Netbeans 中设置环境变量? [英] How to set Environment Variable in Netbeans?

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

问题描述

我在 netbeans 中运行基于 maven 的 Spring 项目.我在我的项目配置文件中使用环境变量来根据该变量值打开特定文件.我可以在 Eclipse 中设置它,但不知道如何在 Netbeans 中设置.有人可以帮我吗?

I am running maven based Spring project in netbeans . I am using an environment variable in my project configurations file to Open specific file based on that variable value . I am able to set it In Eclipse but do not know how to set in Netbeans . Can any one help me?

推荐答案

System.getEnv("FOO") == "FOOVALUE"

netbeans 6.7+ -

netbeans 6.7+ -

右键单击项目

  • ->属性->动作->运行项目->设置属性:添加

Env.FOO=FOOVALUE

Env.FOO=FOOVALUE

注意:您可以将相同的技术应用于其他配置和其他操作,例如调试项目

Note: You can apply the same technique on other configurations and other actions like Debug project

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

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