title: Create JavaVM with bundled resources
body: <p>I have to edit the original post because it was misleading. I have an application that creates a JavaVM with JNI. It is written in C++ with QT5 framework. I have no problems creating the jvm and calling functions from my java application if I provide the .class and .jar files next to the .exe file of my application.
  Now since java applications can be decompiled my company's standards does not allow me to distribute this application to local users because it does contain critical passwords they can't access. Like this from the security collegues I got a response that they're happy with the application IF i bundle the java sources in the .exe file. The QT Resource files would be awesome for this job which I have defined as follows:</p>
  
  <pre><code>&lt;RCC&gt;
      &lt;qresource prefix="/javaApplication"&gt;
          &lt;file&gt;resources/bytecodes/helloworld/HelloWorld.class&lt;/file&gt;
          &lt;file&gt;resources/bytecodes/helloworld/HelloWorld.jar&lt;/file&gt;
      &lt;/qresource&gt;
  &lt;/RCC&gt;
  </code></pre>
  
  <p>and thus makes me able to access the files with the following paths:</p>
  
  <pre><code>:/javaApplication/resources/bytecodes/helloworld/HelloWorld.class
  :/javaApplication/resources/bytecodes/helloworld/HelloWorld.jar
  </code></pre>
  
  <p>Nice and smooth, but these paths doesn't seem to work with JavaVMArgs:</p>
  
  <pre><code>// Does work but violates security policies:
  options[1].optionString = "-Djava.class.path=C:/Users/johorvat/Documents/NetBeansProjects/HelloWorld/build/classes/helloworld/HelloWorld.class;C:/Users/johorvat/Documents/NetBeansProjects/HelloWorld/dist/HelloWorld.jar";
  // Does not work, sadly I try to achieve something like this:
  options[1].optionString = "-Djava.class.path=:/javaApplication/resources/bytecodes/helloworld/HelloWorld.class;:/javaApplication/resources/bytecodes/helloworld/HelloWorld.jar";
  </code></pre>
  
  <p>How could I achieve to have the second variant up and running?</p>