i use Eclipse Ide for my java work and i was working on a program and have some pictures which is in seperate folder and i have a database file when i run it everything is running and one thing more i am not using DSN for my JDBC connection i m using it directly
when i export it to runnable jar it shows me an error and it doent includes the picture folder and the database file
so please help me out i m in a big trouble because i have to show a demo to a college with presentation and my jar is not working so please help me out as soon as possible
what if you made the top level folder that contains the images be a "source folder" (even though it doesn' thave any code in it)
right click folder, build path, use as source folder .
For some reason anything that is a source folder, the contents get copied into the eclipse built classes folder, i use that to get .xml files in other non-src folders into the jar.
I have never used the eclipse export to jar file thing, it seems too rigid to a mold of what is a typical project, difficult to do special things like jam images in it.
if making the images folder a sources folder doesn't work, are you able to use ant. ?
something like a "package" target in an ant file, that does a compile, (or we can just take advantage of the eclipse building the .java files. and then do a copy image files into the target folder, and then ant the target folder.
in general, its more elegant to rely on ant to do the packaging of a project anyway (than eclipse project export), as it is more accessible to other people who don't use eclipse. but also, sometimes in a pinch its just faster to type something in a console to rebuild things than to boot up eclipse to quickly rebuild the project.
here is an example
eclipse even supports launching ant files from an integrated panel.