A
andi0815
Gast
hi.
mein java projekt läut unter eclipse.
in der gui füge ich ein bild ein ala:
wenn ich das projekt unter eclipse starte werden die gifs normal angezeigt.
wenn ich das ding jedoch mit ant in ein jar umwandle findet er die bilder nicht mehr (null pointer exception)
mein build.xml schaut so aus:
was muss ich ändern?
vielen dank
andi
mein java projekt läut unter eclipse.
in der gui füge ich ein bild ein ala:
Code:
JLabel jLabel22 = new JLabel(new ImageIcon(MainGui.class.getClassLoader().getResource("pics/symbol_combi.gif")));
jPanel19.add(jLabel22);
wenn ich das ding jedoch mit ant in ein jar umwandle findet er die bilder nicht mehr (null pointer exception)
mein build.xml schaut so aus:
Code:
<project name="MyProject" default="dist" basedir=".">
<description>
simple example build file
</description>
<property name="src" location="."/>
<property name="lib" location="lib"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
<target name="init">
<tstamp/>
<mkdir dir="${build}"/>
</target>
<target name="compile" depends="init"
description="compile the source " >
<javac srcdir="${src}" destdir="${build}">
<classpath>
<pathelement path="${build}"/>
<pathelement path="${java.class.path}"/>
</classpath>
</javac>
</target>
<target name="dist" depends="compile"
description="generate the distribution" >
<mkdir dir="${dist}"/>
<jar jarfile="${dist}/FlashProtokoll.jar" basedir="${build}">
<fileset dir="pics">
<include name="pics/*.gif"/>
</fileset>
<manifest>
<attribute name="Main-Class" value="gui.MainGui"/>
</manifest>
</jar>
</target>
<target name="clean" description="clean up" >
<delete dir="${build}"/>
</target>
</project>
was muss ich ändern?
vielen dank
andi