Netbeans 6.5: Change runtime environment variable / debug / test?

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?

+3
source share
1 answer

Try using

 <env key="PATH" path="..."/>

instead

 <env key="Path"  path="..."/>

it is case insensitive only for Windows and ant> 1.7

+2
source

Source: https://habr.com/ru/post/1704253/


All Articles