Note that there are some explanatory texts on larger screens.

plurals
  1. POUnable to make ant script with swtjar
    text
    copied!<p>I am attempting to make a cross platform .jar of a program that uses SWT for its GUI. I stumbled upon <a href="https://stackoverflow.com/questions/2706222/create-cross-platform-java-swt-application/3204032#3204032">this</a> and <a href="http://mchr3k.github.com/swtjar/" rel="nofollow noreferrer">this</a>, and have tried to use it in my own program. I am not very experienced with ant scripts, and this program has a lot of other .jars in its build path, so I used eclipse to generate an ant build script, which I modified to include the swtjar task. However, when the script runs and gets to the swtjar task, it fails and says that <code>The archive swtjar.jar doesn't exist</code>. I also tried to make a legitimate build file earlier and also got this error. Is there something I'm missing? I've included swtjar.jar in the build path, and the taskdef at the top of the script.</p> <p>Here's the script:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt; &lt;project default="create_run_jar" name="Create Runnable Jar for Project kEllyIRClient"&gt; &lt;!--this file was created by Eclipse Runnable JAR Export Wizard--&gt; &lt;!--ANT 1.7 is required--&gt; &lt;taskdef name="swtjar" classname="org.swtjar.ant.SWTJarTask" classpath="./libs/swtjar.jar"/&gt; &lt;target name="create_run_jar"&gt; &lt;!--make the release directory if it doesn't exist--&gt; &lt;mkdir dir="./release/"/&gt; &lt;!--Create a temporary jar file with all the dependencies (i.e. the libs folder)--&gt; &lt;jar jarfile="./release/externalLibsTemp.jar"&gt; &lt;zipgroupfileset dir="./libs/"&gt; &lt;exclude name="swt/*swt*.jar"/&gt; &lt;exclude name="swtjar.jar"/&gt; &lt;include name="**/*.jar"/&gt; &lt;/zipgroupfileset&gt; &lt;/jar&gt; &lt;!--package with swt--&gt; &lt;swtjar jarfile="./release/KEllyIRC.jar" targetmainclass="shared.Initializer" swtversion="3.7.1"&gt; &lt;fileset dir="./bin"/&gt; &lt;!--Add the dependencies jar to the jar, but exclude the meta-inf/manifest stuff cause that screws stuff up.--&gt; &lt;zipfileset excludes="META-INF/*.SF" src="./release/externalLibsTemp.jar" /&gt; &lt;fileset dir="./libs/swt/" includes="swt-win32-3.7.1.jar"/&gt; &lt;/swtjar&gt; &lt;!--Delete temporary file--&gt; &lt;delete file="./release/externalLibsTemp.jar"/&gt; &lt;/target&gt; </code></pre> <p></p> <p>And this is the error:</p> <pre><code>D:\My Dropbox\Java\kEllyIRClient\swtjar-buildV2.xml:24: The archive swtjar.jar doesn't exist </code></pre>
 

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