Note that there are some explanatory texts on larger screens.

plurals
  1. POError when running maven generated executable jar
    primarykey
    data
    text
    <p>I'm having (a strange) problem when executing a maven generated executable jar: </p> <pre><code>user@host$ java -server -jar MyJar.jar Error </code></pre> <p>(and nothing more than this!!!)</p> <p>Do you have any idea what this king of error comes from ? </p> <p>In my pom.xml, I copy all the dependencies to a lib folder with: </p> <pre><code>&lt;plugin&gt; &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt; &lt;executions&gt; &lt;execution&gt; &lt;phase&gt;install&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;copy-dependencies&lt;/goal&gt; &lt;/goals&gt; &lt;configuration&gt; &lt;outputDirectory&gt;${project.build.directory}/${artifactId}-${version}/${artifactId}-${version}/lib&lt;/outputDirectory&gt; &lt;/configuration&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; </code></pre> <p>And then I generate a .jar including the classpath (+ a prefix pointing to the lib folder): </p> <pre><code>&lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt; &lt;configuration&gt; &lt;outputDirectory&gt;${project.build.directory}/${artifactId}-${version}/${artifactId}-${version}/bin&lt;/outputDirectory&gt; &lt;finalName&gt;MyJar&lt;/finalName&gt; &lt;archive&gt; &lt;manifest&gt; &lt;mainClass&gt; com.company.package.Main &lt;/mainClass&gt; &lt;addClasspath&gt;true&lt;/addClasspath&gt; &lt;classpathPrefix&gt;../lib/&lt;/classpathPrefix&gt; &lt;/manifest&gt; &lt;/archive&gt; &lt;/configuration&gt; &lt;/plugin&gt; </code></pre> <p>The generated MANIFEST.MF seems to contain the proper classpath.</p> <p>Thanks a lot for your help!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload