J
JavaEnquirer
I've had an Eclipse project for quite some time which successfully
loads images from an images folder. The class which loads the image
resides in an external jar, but the images themselves live in the main
project jar. Everything has been working fine, both when I deploy the
application in jars and when I run it in Eclipse.
However, I've recently made a change whereby the images only load when
I deploy the jar, not when I run from within Eclipse. That's all I have
done is move my top level source package from being directly under the
Project, to a sub folder called src/dev. The code still compiles
perfectly and runs up until the image load. This I can't understand
because the output folder location hasn't changed at all, so the
relative path between the class files and my images folder within the
project is exactly the same. I wouldn't have thought that moving the
source code should effect the "executables" and getting resources as
stream, but it does! Aarrghh! Any ideas anyone??
OLD:
MyProject
- images ( images folder )
- output ( class files )
- uk ( source package hierarchy )
- blah
NEW:
MyProject
- images ( images folder )
- output ( class files )
- src
- dev
- uk ( source package hierarchy )
- blah
loads images from an images folder. The class which loads the image
resides in an external jar, but the images themselves live in the main
project jar. Everything has been working fine, both when I deploy the
application in jars and when I run it in Eclipse.
However, I've recently made a change whereby the images only load when
I deploy the jar, not when I run from within Eclipse. That's all I have
done is move my top level source package from being directly under the
Project, to a sub folder called src/dev. The code still compiles
perfectly and runs up until the image load. This I can't understand
because the output folder location hasn't changed at all, so the
relative path between the class files and my images folder within the
project is exactly the same. I wouldn't have thought that moving the
source code should effect the "executables" and getting resources as
stream, but it does! Aarrghh! Any ideas anyone??
OLD:
MyProject
- images ( images folder )
- output ( class files )
- uk ( source package hierarchy )
- blah
NEW:
MyProject
- images ( images folder )
- output ( class files )
- src
- dev
- uk ( source package hierarchy )
- blah