title: How to pass List<T> from Java to a C++ std::vector function parameter using JNA
body: <p>I have a native function :</p>
  
  <pre><code>int NativeFunction(std::vector&lt;MyObject&gt;);
  </code></pre>
  
  <p>I am loading the Native dll using JNA and I am trying to call this function NativeFunction from Java like:</p>
  
  <pre><code>nativedlljnapointer.NativeFunction(List&lt;MyObject&gt;);
  </code></pre>
  
  <p>I am however running into "java.lang.IllegalArgumentException: Unsupported argument type ArrayList" exception. </p>
  
  <p>I al tried using java util vector when I am running into the same exception "java.lang.IllegalArgumentException: Unsupported argument type java.util.Vector"</p>
  
  <p>Can someone suggest me how I could pass List from my Java function to the native function which has vector&lt;> as an argument. </p>
  
  <p>Any help will be greatly appreciated. </p>