title: How to get nar classpath from Nifi custom Processor?
body: <p>I would like to get a classpath corresponding to the bundled dependencies included in my nar.</p>
  
  <p><strong>Context :</strong> </p>
  
  <p>I've coded a Custom Processor that runs a java application as a command line, like this :</p>
  
  <pre><code>java -cp &lt;classpath&gt; com.my.package.MainClass
  </code></pre>
  
  <p>My MainClass uses classes from a dependency of my nar, i.e included in the nar. </p>
  
  <p>I'm trying to get the nar classpath using the system property <code>java.class.path</code> :</p>
  
  <pre><code>String myclasspath = System.getProperty("java.class.path");
  </code></pre>
  
  <p><strong>Problem :</strong></p>
  
  <p>By doing so i'm not having the classpath expected. The jar included in my bundle dependencies does not appear. I get a <code>package com.my.dependency does not exist</code></p>
  
  <p>A workaround is to put the jar in the nifi "lib" folder directly, but I would like to have just one nar.</p>
  
  <p><strong>Question :</strong> </p>
  
  <p>If "java.class.path" doesn't return the classpath included in my nar, how do I get this classpath ?</p>