Hello again,
This is the error I get when I try to run the jar-file:
Exception in thread "main" java.lang.NullPointerException
at javax.swing.ImageIcon.<init>(ImageIcon.java:138)
at MainFrame.initMenu(Unknown Source)
at MainFrame.<init>(Unknown Source)
at MainFrame.main(Unknown Source)
This must mean that it can't find the images?
Eirin
On 4. jun. 2004, at 11.36, Ivan Ivanov wrote:
Hi Eirin,
How do you search/load your images in your
application?
--- Eirin_�stvold_Bl�strud <[EMAIL PROTECTED]>
wrote:
Hi,
I'm trying to create a jar-file with ant.
The build is successful, but the application will
not start because it
can't find
the .gif files it needs. I have looked at the
jar-file, and it looks
like the gif-files
are in the right place.
Does anybody notice anything strange with this
build-file?
<?xml version="1.0" encoding="iso-8859-1"?>
<project name="Scrappy" default="ddo" basedir=".">
<!-- set global properties for this build -->
<property name="src" location="ddo"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<property name="lib" location="lib"/>
<property name="images" location="gui"/>
<target name="init">
<tstamp/>
<mkdir dir="${build}"/>
</target>
<target name="compile" depends="init"
description="compile the
source">
<!-- Compile the java code from ${src} into
${build} -->
<javac srcdir="${src}" destdir="${build}"/>
</target>
<target name="copy" depends="compile">
<!-- copy images necessary for the application -->
<copy todir="${build}">
<fileset dir="${images}"/>
</copy>
<!-- copy files necessary for the application-->
<copy todir="${build}">
<fileset dir="${lib}"/>
</copy>
<unzip dest="$build">
<fileset dir="${lib}">
<include name="*.jar"/>
</fileset>
</unzip>
</target>
<target name="dist" depends="copy"
description="generate the
distribution" >
<!-- Create the distribution directory -->
<mkdir dir="${dist}"/>
<jar manifest="manifest"
jarfile="${dist}/Scrappy-${DSTAMP}.jar"
basedir="${build}"/>
</target>
<!-- Delete the ${build} and ${dist} directory
trees -->
<target name="clean" description="clean up" >
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
</project>
Thanks,
Eirin
__________________________________
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]