Hi all. I have the following structure: Dir\src for source Dir\build for class files Dir\dist for storing the jar Dir\images images used by the application using ant, I want to create an executable jar file. I wrote :
but the problem is, ant doesn't create images directory inside the Jar file, so the application will not working. (when extracting the jar I found: com/*.class Meta-INF image1.gif image2.gif) how to create the images directory inside the jar ??
You need to include your "images" directory as part of the build. Right now you are just including all the files inside the "images" directory. Try something like this:
That should work for you if your "images" property is the value you want to show up in your JAR. If you need a different name, you'd have to do something like copy all your images to a temp directory whose name is the one you want, then do the same sort of thing.
Thanks you alot. but there is the last problem. I have the class Manager under the package com, and as you see I have specified it within the manifest tag: <attribute name="Main-Class" value="com.Manager"/> but the jar file don't launch (it launch if I put my class without a package).... so what is the problem ? I appreciate your help...