Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As a good practice you can use an <a href="http://ant.apache.org/" rel="noreferrer">Ant Script</a> (Eclipse comes with it) to generate your JAR file. Inside this JAR you can have all dependent libs.</p> <p>You can even set the MANIFEST's Class-path header to point to files in your filesystem, it's not a good practice though.</p> <p>Ant build.xml script example:</p> <pre><code>&lt;project name="jar with libs" default="compile and build" basedir="."&gt; &lt;!-- this is used at compile time --&gt; &lt;path id="example-classpath"&gt; &lt;pathelement location="${root-dir}" /&gt; &lt;fileset dir="D:/LIC/xalan-j_2_7_1" includes="*.jar" /&gt; &lt;/path&gt; &lt;target name="compile and build"&gt; &lt;!-- deletes previously created jar --&gt; &lt;delete file="test.jar" /&gt; &lt;!-- compile your code and drop .class into "bin" directory --&gt; &lt;javac srcdir="${basedir}" destdir="bin" debug="true" deprecation="on"&gt; &lt;!-- this is telling the compiler where are the dependencies --&gt; &lt;classpath refid="example-classpath" /&gt; &lt;/javac&gt; &lt;!-- copy the JARs that you need to "bin" directory --&gt; &lt;copy todir="bin"&gt; &lt;fileset dir="D:/LIC/xalan-j_2_7_1" includes="*.jar" /&gt; &lt;/copy&gt; &lt;!-- creates your jar with the contents inside "bin" (now with your .class and .jar dependencies) --&gt; &lt;jar destfile="test.jar" basedir="bin" duplicate="preserve"&gt; &lt;manifest&gt; &lt;!-- Who is building this jar? --&gt; &lt;attribute name="Built-By" value="${user.name}" /&gt; &lt;!-- Information about the program itself --&gt; &lt;attribute name="Implementation-Vendor" value="ACME inc." /&gt; &lt;attribute name="Implementation-Title" value="GreatProduct" /&gt; &lt;attribute name="Implementation-Version" value="1.0.0beta2" /&gt; &lt;!-- this tells which class should run when executing your jar --&gt; &lt;attribute name="Main-class" value="ApplyXPath" /&gt; &lt;/manifest&gt; &lt;/jar&gt; &lt;/target&gt; </code></pre> <p></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.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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