Use Relative Path in Free-form Netbeans Projects
For free-form projects, Netbeans uses absolute path for project directory in project.xml : <properties> <property name="project.dir">/Users/yili/Work/homecamera/WowzaStreaming</property> <property name="ant.script">${project.dir}/build.xml</property> <properties> All paths in project.xml are relative to the project folder, which is the folder that contains the nbproject folder. Thus changing the above to the following makes my project works on all platforms regardless where the project is located: <properties> <property name="project.dir">../../../WowzaStreaming</property> <property name="ant.script">${project.dir}/build.xml</property> <properties>