Prior to Netbeans 6.1, I used the following recipe to change the PATH environment variable during run / debug / test tasks: in the build.xml file, I included:
<property environment = "env" />
<target name = "- init-macrodef-java">
<macrodef name = "java" uri = "http://www.netbeans.org/ns/j2se-project/1">
<attribute default = "$ {main.class}" name = "classname" />
<element name = "customize" optional = "true" />
<sequential>
<java classname = "@ {classname}" dir = "$ {work.dir}" fork = "true">
<jvmarg line = "$ {run.jvmargs}" />
<env key = "Path" path = "$ {work.dir} /../../ bin; $ {env.Path}">
...
(this was for windows machines). In Netbeans 6.5, this magic no longer works, not PATH or other environment variables (instead, the value key = "..." value = "..." is used). I am rebuilding NB projects from scratch to take advantage, and I am not an Ant expert for starters. Any pointers / suggestions?
source
share