This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Apache Ant didn't include resource into my classpath?

 
Roger Lim
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic