How can I run/debug a program in NetBeans with certain environment variables set to necessary values?

(For example I often need to debug programs with the $DISPLAY variable set.)

A: you will need to copy the -init-macrodef-java and/or -init-macrodef-debug targets into build.xml from build-impl.xml and add one or more <env> parameters. See: Ant documentation for <java>

Be sure to uncheck Compile on Save in the Compiling tab of the project properties dialog.

Note: Ant does not currently provide the necessary machinery for you to configure these from a properties file. See: Ant bug #40448

See also FaqSysPropsDuringRun.

Applies to: NetBeans 6.5 and later

Platforms: all

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo