简体   繁体   中英

How can I define environment variables for a Java project in NetBeans?

I need to define environment variables for my project since I will eventually want to deploy it to Heroku, or any other PaaS. What I am having trouble with is run the application from the NetBeans IDE with my environment variables.

Where can I enter them so I can test them? I use environment variables for MongoDB URI, different API keys, etc.

Edit: I am using OSX 10.10.2 with NetBeans 7.4.

I tried looking at this discussion but my version of NetBeans lacks the Set Properties: Add in the Run dialog.

You should look in the Actions dialog, not in Run. There you select 'Run project' and then click the Add button.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM