title: java.lang.ClassNotFoundException: io.quarkus.runtime.Quarkus
body: <p>I am trying to run runner jar of the quarkus application which would be listening over port 9411 on http.</p>
  <p>Programmatically using UrlClassLoader, when I try to load the jar it throws
  (also with java -jar)
  1.java.lang.ClassNotFoundException: io.quarkus.runtime.Quarkus</p>
  <p>2.java.lang.reflect.InvocationTargetException
  here is the snippet of code ,</p>
  <pre><code>        URLClassLoader loader = new URLClassLoader(
              new URL[]{ new File(&lt;location of runner jar&gt;).toURI().toURL()});
          Thread.currentThread().setContextClassLoader(loader);
          Class&lt;?&gt; mainClass = loader.loadClass(&quot;io.quarkus.runner.GeneratedMain&quot;); 
          Method mainMethod = mainClass.getMethod(&quot;main&quot;, String[].class);
          mainMethod.invoke(null, (Object) new String[]{});
  </code></pre>
  <p>another observation is when I place /lib folder at the runner jar location it loads successfully meaning it requires the lib folder altogether.</p>
  <p>How can I make my code work only with runner jar?</p>