Meaningless Drivel is fun!*
The moose likes Swing / AWT / SWT and the fly likes Apache Ant didn't include resource into my classpath? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Apache Ant didn Watch "Apache Ant didn New topic

Apache Ant didn't include resource into my classpath?

Roger Lim

Joined: May 14, 2006
Posts: 2
hi guys,

i have this package


In, 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">
<pathelement path="${targetdir}"/>

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 ]
I agree. Here's the link:
subject: Apache Ant didn't include resource into my classpath?
Similar Threads
Problem with Ant Build
Could not parse configuration: /hibernate.cfg.xml
could not find the main class
how to tell ant that some packages are needed?