Setting Environment Variables for NetBeans

If you use NetBeans IDE to build an application which reads environment variable, you will have to do these settings in your IDE. There is no GUI to set such variables in NetBeans while Eclipse provides you a “Run Configuration Dialog”. So just add the declaration in your netbeans.conf.

It is highly recommended to copy the configuration file to your home directory before you edit it.

cp -r /usr/local/netbeans-6.8/etc ~/.netbeans/6.8/

And append this line:

export YAN_RESOURCE=/home/sun/work/yan-resource

Then restart your IDE, it works. You can test/build/run your application with the environment variable $YAN_RESOURCE inside NetBeans IDE,

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>