hi guys,
i have this package
view/MyFrame.java
view/res/home.gif
In MyFrame.java, i try to load the image using
ImageIcon ic = new ImageIcon("view/res/home.gif");
using eclipse
ide, everything works fine, but when i use
ant script to do the job, the image didn't appear.
my build xml
...
<property name="sourcedir" value="${basedir}/src"/>
<property name="targetdir" value="${basedir}/bin"/>
<target name="run" depends="compile">
<
java fork="true" classname="view.MyFrame">
<classpath>
<pathelement path="${targetdir}"/>
</classpath>
</java>
</target>
i did copy the resource to my targetdir during compilation. Anyone has any idea what is wrong? thank you!
[ September 22, 2007: Message edited by: Roger Lim ]