title: Unexpected classpath behaviour remote deployment of Java application with Netbeans 13
body: <p>Can anyone help me understand the classpath logic when deploying Java applications to remote hosts?</p>
  <p>Netbeans will build, deploy and execute my Java application correctly on a remote Linux (Ubutntu 20.x) host.</p>
  <p>Lets say that the executable JAR is deployed and executed in:
  /home/user/project/dist</p>
  <p>With any supporting library files copied to:
  /home/user/project/dist/lib</p>
  <p>This all makes sense to me.</p>
  <p>However, I wish to read application and log4j2 configuration files. I would think that these should be placed in the same directory as the jar file. However they must be placed in the parent directory:</p>
  <p>/home/user/project</p>
  <p>Okay... BUT...</p>
  <p>If I amend my code to write out a text file (to the executable directory) the resulting text file is written to:</p>
  <p>/home/user/project/</p>
  <p>&lt;Edited 19Jun22&gt;</p>
  <p>I want my deployed application to read the log4j2.xml and configuration files from the same directory that my application writes to. What configuration settings must I change in Netbeans?</p>
  <p>Alternatively is there a way to make Netbeans deploy to /home/user/project instead of /home/user/project/dist?</p>